Package com.solibri.geometry.primitive3d
Interface MRectangle3d
- All Superinterfaces:
Iterable<Vector3d>
,MPolygon3d
,Polygon3d
,Rectangle3d
Interface for handling rectangles in 3-dimensional space.
- Since:
- 9.10.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic MRectangle3d
create(Rectangle3d other)
Creates a new instance.static MRectangle3d
Creates a new instance from the given points.void
resize(double resize)
Resizes the rectangle by the given amount by adding the resize amount as tolerance to each side of the rectangle.boolean
Sets the given points to the rectangle.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface com.solibri.geometry.primitive3d.MPolygon3d
transform, translate
Methods inherited from interface com.solibri.geometry.primitive3d.Polygon3d
contains, contains, edgesIntersect, getArea, getBoundingBox, getCentroid, getEdgeIterator, getMean, getNormal, getVertexCount, getVertices, intersect, intersects, isConvex
Methods inherited from interface com.solibri.geometry.primitive3d.Rectangle3d
getLongerRectangleSegment, getLongerRectangleSegmentLength, getLongerRectangleSegments, getShorterRectangleSegment, getShorterRectangleSegmentLength, getShorterRectangleSegments
-
Method Details
-
resize
void resize(double resize)Resizes the rectangle by the given amount by adding the resize amount as tolerance to each side of the rectangle. If the amount is positive, the rectangle is enlarged. If the amount is negative, the rectangle is reduced in size.- Parameters:
resize
- the resize amount- Since:
- 9.10.2
-
setPoints
Sets the given points to the rectangle.- Parameters:
points
- list of points- Returns:
- true if the points form a rectangle and has been set, false otherwise.
- Since:
- 9.10.2
-
create
Creates a new instance from the given points.- Parameters:
vertices
- list of points to create the rectangle- Returns:
- a MRectangle3d instance
- Throws:
IllegalArgumentException
- if the points do not form a rectangle- Since:
- 9.10.2
-
create
Creates a new instance.- Parameters:
other
- the other rectangle- Returns:
- the newly created instance
- Since:
- 9.10.2
-