Package com.solibri.geometry.primitive2d
Interface Area
- All Known Subinterfaces:
- MArea
public interface Area
Read-only interface for handling areas in XY-plane. The area object is an
 enclosed area of 2D space that can have holes.
- Since:
- 9.10.2
- 
Method SummaryModifier and TypeMethodDescriptionbooleanChecks if the area contains the given point.static Areacreate()Returns an empty area.static AreaCreates an area with the given area.static AreaCreates an area with the given polygon and resize value.static AreaCreates an area with the givenShape.static Areacreate(Collection<? extends Area> areas) Creates an union area with the given areas.static AreaCreates an area with the given polygon points.Returns a copy of a bounding rectangle which has minimum area and is axis aligned.Returns the centroid of this area.getHoles()Returns a list of holes in the area.Returns the largest outer polygon of the area.Returns the minimum area bounding rectangle.Returns a list of polygons in the area.doublegetSize()Returns the size of the area.Returns a list of vertices in the area.booleanisEmpty()Tests whether this area object encloses any area.booleanTests whether this area is comprised of a single closed subpath.
- 
Method Details- 
createReturns an empty area.- Returns:
- an empty area.
- Since:
- 9.10.2
 
- 
createCreates an area with the given polygon points. The area does not take ownership of the given points.- Parameters:
- polygonPoints- the points used for creating the area
- Returns:
- an area with the given polygon points
- Since:
- 9.10.2
 
- 
createCreates an area with the given area. The returned area does not take ownership of the given area.- Parameters:
- area- the area used for creating the returned area
- Returns:
- an area with the given area
- Since:
- 9.10.2
 
- 
createCreates an area with the given polygon and resize value. The returned area does not take ownership of the given polygon.- Parameters:
- polygon- the polygon used for creating the returned area
- resize- the amount of resize used for creating the returned area
- Returns:
- the area with the given resized polygon
- Since:
- 9.10.2
 
- 
createCreates an union area with the given areas. The returned area does not take ownership of the given areas. The resulting shape of this area will include the union of all shapes, or all areas that were contained in either this or the specified areas.- Parameters:
- areas- the areas used for creating the returned area
- Returns:
- an area with the given area
- Since:
- 9.10.2
 
- 
createCreates an area with the givenShape. The returned area does not take ownership of the given area.- Parameters:
- shape- the shape used for creating the returned area
- Returns:
- an area with the given area
- Since:
- 9.10.2
 
- 
containsChecks if the area contains the given point.- Parameters:
- point- the point
- Returns:
- true if the point is located inside the area, false otherwise
- Since:
- 9.10.2
 
- 
getMinimumBoundingRectangleRectangle2d getMinimumBoundingRectangle()Returns the minimum area bounding rectangle. Note: Don't use this with empty areas.- Returns:
- the minimum area bounding rectangle
- Since:
- 9.10.2
 
- 
getSizedouble getSize()Returns the size of the area.- Returns:
- the size of the area
- Since:
- 9.10.2
 
- 
getHolesList<MPolygon2d> getHoles()Returns a list of holes in the area.- Returns:
- list of holes in the area
- Since:
- 9.10.2
 
- 
getLargestPolygonMPolygon2d getLargestPolygon()Returns the largest outer polygon of the area.- Returns:
- the largest polygon
- Since:
- 9.10.2
 
- 
getPolygonsList<MPolygon2d> getPolygons()Returns a list of polygons in the area.- Returns:
- list of polygons in the area
- Since:
- 9.10.2
 
- 
getVerticesReturns a list of vertices in the area.- Returns:
- list of vertices in the area
- Since:
- 9.10.2
 
- 
isEmptyboolean isEmpty()Tests whether this area object encloses any area.- Returns:
- true if this area represents an empty area, false otherwise
- Since:
- 9.10.2
 
- 
isSingularboolean isSingular()Tests whether this area is comprised of a single closed subpath. This method returns true if the path contains 0 or 1 subpaths, or false if the path contains more than 1 subpath.- Returns:
- true if the area is comprised of a single basic geometry, false otherwise
- Since:
- 9.10.2
 
- 
getBoundingRectangleMAABB2d getBoundingRectangle()Returns a copy of a bounding rectangle which has minimum area and is axis aligned.- Returns:
- bounding rectangle
- Since:
- 9.10.2
 
- 
getCentroidMVector2d getCentroid()Returns the centroid of this area. The centroid is the center of mass. For an empty area this returns (0, 0).- Returns:
- the centroid of this area
- Since:
- 9.10.2
 
 
-