new Factory(shell, coords)
Creates a new planar facet in the shall.
Parameters:
| Name | Type | Description |
|---|---|---|
shell |
PD.Shell | The shell to create the facet in. |
coords |
PD.LocalCoordinates | The local coordinates to create the facet in. |
Members
-
:number
contourIndex
-
Stores the ordinal index of the contour currently being added to.
Type
- number
-
:PD.LocalCoordinates
coords
-
Stores the local coordinates to use.
Type
-
:PD.Polygon
facet
-
Stores the polygon being created.
Type
-
:PD.Shell
shell
-
Stores the shell the facet is being added to.
Type
Methods
-
lineTo(x, y, z)
-
Appends a new vertex at the given local coordinates.
Parameters:
Name Type Description xnumber The new position in the local X axis.
ynumber The new position in the local Y axis.
znumber The new position in the local Z axis.
Returns:
Returns the newly added point.
- Type
- PD.Point
-
moveTo(x, y, z)
-
Creates a new contour and appends a new vertex at the given local coordinates.
Parameters:
Name Type Description xnumber The new position in the local X axis.
ynumber The new position in the local Y axis.
znumber The new position in the local Z axis.
Returns:
Returns the newly added point.
- Type
- PD.Point
-
update()
-
Finishes the facet and computes its properties.
Returns:
Returns the finished polygon.
- Type
- PD.Polygon