editor › Globals › CutOutlineFinder
Class: CutOutlineFinder
Hierarchy
- CutOutlineFinder
Index
Properties
Methods
- _getIntersectionLineSegments
- _getSplitPlaneOutlineWithoutEdgeCaseHandling
- _holeIntersectionPointsPerPlate
- _outlineIntersectionPointsPerPlate
- areHolesSplit
- getSplitPlaneOutline
Properties
Static Readonly cutOutlineTolerance
▪ cutOutlineTolerance: 1 = 1
Defined in src/util/CutOutlineFinder.ts:13
Methods
Static Private _getIntersectionLineSegments
▸ _getIntersectionLineSegments(intersectionsByPlate: Vector3[][]): Vector3[][]
Defined in src/util/CutOutlineFinder.ts:183
Generates the intersection line segments from the given intersection points
Parameters:
| Name | Type |
|---|---|
intersectionsByPlate |
Vector3[][] |
Returns: Vector3[][]
Static Private _getSplitPlaneOutlineWithoutEdgeCaseHandling
▸ _getSplitPlaneOutlineWithoutEdgeCaseHandling(mesh: Mesh, plane: Plane, pointNearOutline: Vector3): Vector3[]
Defined in src/util/CutOutlineFinder.ts:135
This method DOES NOT handle edge cases where the mesh contains plates that are coplanar to the plane. For correct handling of these edge cases use getSplitPlaneOutline instead.
Finds the outline of the cut at the splitPlane through the mesh. If there are multiple cut outlines the one nearest to the pointNearOutline is returned. Returning all outlines is not implemented yet.
Parameters:
| Name | Type | Description |
|---|---|---|
mesh |
Mesh | - |
plane |
Plane | - |
pointNearOutline |
Vector3 | the outline this point is closest to will be returned |
Returns: Vector3[]
the cut outline in assembly space
Static Private _holeIntersectionPointsPerPlate
▸ _holeIntersectionPointsPerPlate(plate: Plate, cuttingPlane: Plane): Vector3[]
Defined in src/util/CutOutlineFinder.ts:218
Determines the intersection points of a given plate's holes with a given plane
Parameters:
| Name | Type |
|---|---|
plate |
Plate |
cuttingPlane |
Plane |
Returns: Vector3[]
Static Private _outlineIntersectionPointsPerPlate
▸ _outlineIntersectionPointsPerPlate(plate: Plate, cuttingPlane: Plane): Vector3[]
Defined in src/util/CutOutlineFinder.ts:205
Determines the intersection points of a given plate outline with a given plane
Parameters:
| Name | Type |
|---|---|
plate |
Plate |
cuttingPlane |
Plane |
Returns: Vector3[]
Static areHolesSplit
▸ areHolesSplit(mesh: Mesh, plane: Plane): boolean
Defined in src/util/CutOutlineFinder.ts:111
Determines whether the plane splits a hole of a plate of the mesh
Parameters:
| Name | Type |
|---|---|
mesh |
Mesh |
plane |
Plane |
Returns: boolean
Static getSplitPlaneOutline
▸ getSplitPlaneOutline(mesh: Mesh, plane: Plane, pointNearOutline: Vector3, rasterize: boolean): Vector3[] | RasterizedPolygon3D
Defined in src/util/CutOutlineFinder.ts:25
Finds the outline of the cut at the splitPlane through the mesh. If there are multiple cut outlines the one nearest to the pointNearOutline is returned. Returning all outlines is not implemented yet.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
mesh |
Mesh | - | - |
plane |
Plane | - | - |
pointNearOutline |
Vector3 | - | the outline this point is closest to will be returned |
rasterize |
boolean | false | Whether the RasterizedPolygonClipper should be used for better performance. Falls back to polygon clipping if the polygons can't get rasterized properly (e.g. because one polygon is much smaller than the other one). |
Returns: Vector3[] | RasterizedPolygon3D
the cut outline in assembly space