Package com.solibri.geometry.primitive2d
Interface MRectangle2d
- All Superinterfaces:
- Iterable<Vector2d>,- MPolygon2d,- Polygon2d,- Rectangle2d
Interface for handling rectangles in the XY-plane.
- Since:
- 9.10.2
- 
Method SummaryModifier and TypeMethodDescriptionstatic MRectangle2dcreate(Rectangle2d other) Creates a new instance.static MRectangle2dCreates a new instance from the given points.voidresize(double resize) Resizes the rectangle by the given amount by adding the resize amount as tolerance to each side of the rectangle.booleanSets the given points to the rectangle.Methods inherited from interface java.lang.IterableforEach, iterator, spliteratorMethods inherited from interface com.solibri.geometry.primitive2d.MPolygon2dsimplify, translateMethods 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, toAreaMethods inherited from interface com.solibri.geometry.primitive2d.Rectangle2dequalsWithTolerance, getLongerRectangleSegment, getLongerRectangleSegmentLength, getLongerRectangleSegments, getShorterRectangleSegment, getShorterRectangleSegmentLength, getShorterRectangleSegments
- 
Method Details- 
resizevoid 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.- Specified by:
- resizein interface- MPolygon2d
- Parameters:
- resize- the resize amount
- Since:
- 9.10.2
 
- 
setPointsSets 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
 
- 
createCreates a new instance from the given points.- Parameters:
- vertices- list of points to create the rectangle
- Returns:
- a MRectangle2d instance
- Throws:
- IllegalArgumentException- if the points do not form a rectangle
- Since:
- 9.10.2
 
- 
createCreates a new instance.- Parameters:
- other- the other rectangle
- Returns:
- the newly created instance
- Since:
- 9.10.2
 
 
-