Class: ShellInsertApertures

ShellInsertApertures

An internal class for inserting/cutting apertures into shell geometry.


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
segIndex number

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
facet Array.<PD.Point>
aperturePoly Array.<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
u number

The fractional U value along the entire curve (0 to 1).

Returns:

Segment index and local U within that segment.

Type
Object