Package com.solibri.geometry.primitive2d
Interface Rectangle2d
- All Known Subinterfaces:
- MRectangle2d
Read-only interface for handling rectangles in the XY-plane.
- Since:
- 9.10.2
- 
Method SummaryModifier and TypeMethodDescriptionstatic Rectangle2dcreate(Rectangle2d other) Creates a new instance.static Rectangle2dCreates a new instance from the given points.booleanequalsWithTolerance(Rectangle2d rectangle, double epsilon) Verifies if two 2D rectangles are equal (with epsilon difference).Returns the longer segment of the rectangle.doubleReturns the length of the longer rectangle segment.Returns the longer segments of the rectangle.Returns the shorter segment of the rectangle.doubleReturns the length of shorter rectangle segment.Returns the shorter segments of the rectangle.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- 
getLongerRectangleSegmentSegment2d getLongerRectangleSegment()Returns the longer segment of the rectangle.- Returns:
- segment the longer segment
- Since:
- 9.10.2
 
- 
getLongerRectangleSegmentsReturns the longer segments of the rectangle.- Returns:
- segments list with the longer segments
- Since:
- 9.10.2
 
- 
getLongerRectangleSegmentLengthdouble getLongerRectangleSegmentLength()Returns the length of the longer rectangle segment.- Returns:
- the length of the longer segment
- Since:
- 9.10.2
 
- 
getShorterRectangleSegmentSegment2d getShorterRectangleSegment()Returns the shorter segment of the rectangle.- Returns:
- segment the shorter segment
- Since:
- 9.10.2
 
- 
getShorterRectangleSegmentsReturns the shorter segments of the rectangle.- Returns:
- segments list with the shorter segments
- Since:
- 9.10.2
 
- 
getShorterRectangleSegmentLengthdouble getShorterRectangleSegmentLength()Returns the length of shorter rectangle segment.- Returns:
- the length of the shorter segment
- Since:
- 9.10.2
 
- 
equalsWithToleranceVerifies if two 2D rectangles are equal (with epsilon difference). It checks that the vertices of the rectangles are the same (or in the specified epsilon radius).- Parameters:
- rectangle- the rectangle to compare to
- epsilon- the tolerance radius
- Returns:
- true is they are epsilon equal, false otherwise
 
- 
createCreates a new instance from the given points.- Parameters:
- vertices- list of points to create the rectangle
- Returns:
- a Rectangle2d 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
 
 
-