new ShellInsertApertures(curvePoints, facets, apertureUV, wallHeight)
Creates a new aperture insertion instance.
Parameters:
| Name | Type | Description |
|---|---|---|
curvePoints |
Array.<THREE.Vector3> | The points defining the curve. |
facets |
Array.<Array.<number>> | The facets of the shell. |
apertureUV |
Array.<Array.<number>> | The UV coordinates of the aperture. |
wallHeight |
number | The height of the wall. |
Methods
-
apertureToFacetUV(segIndex)
-
Converts aperture UV coordinates to facet-local UV coordinates.
Parameters:
Name Type Description segIndexnumber The index of the segment.
Returns:
The converted UV coordinates.
- Type
- Array.<{X: number, Y: number}>
-
clipFacet(facet, aperturePoly)
-
Clip a facet rectangle with aperture polygon using ClipperLib.
Parameters:
Name Type Description facetArray.<PD.Point> aperturePolyArray.<Array.<number>> Returns:
-
computeCurveLengths()
-
Computes the cumulative lengths along the curve points.
Returns:
Cumulative lengths along the curve points.
- Type
- Array.<number>
-
findSegment(u)
-
Finds the segment and local U for a given U value.
Parameters:
Name Type Description unumber The fractional U value along the entire curve (0 to 1).
Returns:
Segment index and local U within that segment.
- Type
- Object