Class BoundaryConverter
java.lang.Object
org.episteme.core.mathematics.geometry.boundaries.BoundaryConverter
Utility class for converting between boundary dimensions.
Provides methods to:
- Lift 2D boundaries to 3D (on a plane)
- Project 3D boundaries to 2D
- Extrude 2D to 3D volumes
- Convert between coordinate systems
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionstatic Boundary3Dextrude(Boundary2D boundary2D, Real height) Extrudes a 2D boundary into a 3D prism.static Boundary3DextrudeAlong(Boundary2D boundary2D, Vector3D direction) Extrudes along a vector direction.static Boundary3DliftToXY(Boundary2D boundary2D) Lifts a 2D boundary onto the XY plane at z=0.static Boundary3DliftToXY(Boundary2D boundary2D, Real z) Lifts a 2D boundary onto a plane parallel to XY at given z.static Boundary3DliftToXZ(Boundary2D boundary2D) Lifts a 2D boundary onto the XZ plane at y=0.static Boundary3DliftToXZ(Boundary2D boundary2D, Real y) Lifts a 2D boundary onto a plane parallel to XZ at given y.static Boundary3DliftToYZ(Boundary2D boundary2D) Lifts a 2D boundary onto the YZ plane at x=0.static Boundary3DliftToYZ(Boundary2D boundary2D, Real x) Lifts a 2D boundary onto a plane parallel to YZ at given x.static Boundary2DprojectToPlane(Boundary3D boundary3D, Vector3D planeNormal) Projects a 3D boundary onto an arbitrary plane.static Boundary2DprojectToXY(Boundary3D boundary3D) Projects a 3D boundary onto the XY plane.static Boundary2DprojectToXZ(Boundary3D boundary3D) Projects a 3D boundary onto the XZ plane.static Boundary2DprojectToYZ(Boundary3D boundary3D) Projects a 3D boundary onto the YZ plane.static Boundary2DtoConvexHull(CompositeBoundary2D composite) Flattens a composite boundary to a single convex hull.static Boundary2DtoCrisp(FuzzyBoundary2D fuzzy, Real alpha) Converts a fuzzy 2D boundary to crisp by alpha-cut.static FuzzyBoundary2DtoFuzzy(Boundary2D crisp, Real bufferWidth) Creates a fuzzy boundary from a crisp boundary with a buffer.static List<Boundary2D> toIndividualRegions(CompositeBoundary2D composite) Splits a composite boundary into its individual regions.static Point2DProjects a 3D point to 2D on the XY plane.static Point2DtoPoint2DXZ(Point3D point3D) Projects a 3D point to 2D on the XZ plane.static Point2DtoPoint2DYZ(Point3D point3D) Projects a 3D point to 2D on the YZ plane.static Point3DConverts a 2D point to 3D on the XY plane (z=0).static Point3DConverts a 2D point to 3D with specified z.
-
Method Details
-
liftToXY
Lifts a 2D boundary onto the XY plane at z=0.- Parameters:
boundary2D- the 2D boundary- Returns:
- the 3D boundary on the XY plane
-
liftToXY
Lifts a 2D boundary onto a plane parallel to XY at given z.- Parameters:
boundary2D- the 2D boundaryz- the z-coordinate of the plane- Returns:
- the 3D boundary
-
liftToXZ
Lifts a 2D boundary onto the XZ plane at y=0.- Parameters:
boundary2D- the 2D boundary- Returns:
- the 3D boundary on the XZ plane
-
liftToXZ
Lifts a 2D boundary onto a plane parallel to XZ at given y.- Parameters:
boundary2D- the 2D boundaryy- the y-coordinate of the plane- Returns:
- the 3D boundary
-
liftToYZ
Lifts a 2D boundary onto the YZ plane at x=0.- Parameters:
boundary2D- the 2D boundary- Returns:
- the 3D boundary on the YZ plane
-
liftToYZ
Lifts a 2D boundary onto a plane parallel to YZ at given x.- Parameters:
boundary2D- the 2D boundaryx- the x-coordinate of the plane- Returns:
- the 3D boundary
-
extrude
Extrudes a 2D boundary into a 3D prism.- Parameters:
boundary2D- the 2D boundaryheight- the extrusion height- Returns:
- the 3D prism
-
extrudeAlong
Extrudes along a vector direction.- Parameters:
boundary2D- the 2D boundarydirection- the extrusion direction vector- Returns:
- the 3D boundary
-
projectToXY
Projects a 3D boundary onto the XY plane.- Parameters:
boundary3D- the 3D boundary- Returns:
- the 2D projection
-
projectToXZ
Projects a 3D boundary onto the XZ plane.- Parameters:
boundary3D- the 3D boundary- Returns:
- the 2D projection
-
projectToYZ
Projects a 3D boundary onto the YZ plane.- Parameters:
boundary3D- the 3D boundary- Returns:
- the 2D projection
-
projectToPlane
Projects a 3D boundary onto an arbitrary plane.- Parameters:
boundary3D- the 3D boundaryplaneNormal- the plane normal- Returns:
- the 2D projection
-
toPoint3D
-
toPoint3D
-
toPoint2D
-
toPoint2DXZ
-
toPoint2DYZ
-
toCrisp
Converts a fuzzy 2D boundary to crisp by alpha-cut.- Parameters:
fuzzy- the fuzzy boundaryalpha- the alpha threshold [0, 1]- Returns:
- the crisp boundary
-
toFuzzy
Creates a fuzzy boundary from a crisp boundary with a buffer.- Parameters:
crisp- the crisp boundarybufferWidth- the width of the fuzzy transition zone- Returns:
- the fuzzy boundary
-
toConvexHull
Flattens a composite boundary to a single convex hull.- Parameters:
composite- the composite boundary- Returns:
- the convex hull containing all regions
-
toIndividualRegions
Splits a composite boundary into its individual regions.- Parameters:
composite- the composite boundary- Returns:
- list of individual boundaries
-