Package com.solibri.geometry.primitive2d
Interface MPolygon2d
- All Known Subinterfaces:
- MRectangle2d,- MTriangle2d
Interface for handling simple polygons without holes in the XY-plane.
- Since:
- 9.10.2
- 
Method SummaryModifier and TypeMethodDescriptionstatic MPolygon2dCreates a 2-dimensional polygon with the contents deep copied from the given polygon.static MPolygon2dCreates a 2-dimensional polygon with the given vertices.voidresize(double resizeAmount) Resizes this polygon by the given amount.voidsimplify(double distance) Simplifies this polygon by replacing closely grouped vertices with a single vertex.voidTranslates the polygon by the given vector in the XY-plane.Methods inherited from interface java.lang.IterableforEach, iterator, spliteratorMethods inherited from interface com.solibri.geometry.primitive2d.Polygon2dcontains, contains, distance, distance, distance, distanceSquared, distanceSquared, distanceSquared, getArea, getBoundingRectangle, getCentroid, getEdgeIterator, getOrientedBoundingRectangle, getPerimeter, getVertexCount, getVertices, intersectEdges, intersects, isConvex, isCounterClockwise, shortestSegmentTo, toArea
- 
Method Details- 
simplifyvoid simplify(double distance) Simplifies this polygon by replacing closely grouped vertices with a single vertex. Vertices that are within the given distance of each other are considered closely grouped.- Parameters:
- distance- the distance used for checking if vertices are closely grouped
- Since:
- 9.10.2
 
- 
resizevoid resize(double resizeAmount) Resizes this polygon by the given amount. If the amount is positive, the polygon is enlarged. If the amount is negative, the polygon is reduced in size.- Parameters:
- resizeAmount- the amount the polygon is resized
- Since:
- 9.10.2
 
- 
translateTranslates the polygon by the given vector in the XY-plane.- Parameters:
- translator- the vector used for translation
- Since:
- 9.10.2
 
- 
createCreates a 2-dimensional polygon with the given vertices. The returned polygon does not take ownership of the given vertices.- Parameters:
- vertices- the vertices used for creating the returned polygon
- Returns:
- a polygon with the given vertices
- Since:
- 9.10.2
 
- 
createCreates a 2-dimensional polygon with the contents deep copied from the given polygon. The returned polygon does not take ownership of the given vertices.- Parameters:
- polygon- the polygon whose contents are deep copied into the returned polygon
- Returns:
- a polygon with the contents deep copied from the given polygon
- Since:
- 9.10.2
 
 
-