- Source
Members
centerOfMass
Computes the center of mass of the face.
- Source
edges
Retrieves all edges of the face.
- Source
innerWires
Retrieves all inner wires (holes) of the face.
- Source
normal
Computes the normal vector of the face.
- Source
orientation
Determines the orientation of the face.
- Source
outerWire
Retrieves the outer wire (boundry) of the face.
- Source
surfaceArea
Computes the surface area of the face.
- Source
type
Determines the type of the face's surface.
- Source
vertices
Retrieves all vertices of the face.
- Source
xDirection
Computes the x-direction vector of the face.
- Source
Methods
chamfer(parameters) → {Face}
Applies a chamfer (beveled edge) to selected vertices of the face.
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameters | Object | Chamfer parameters. Properties
|
- Source
A new Face
object with the chamfer applied.
- Type:
- Face
cut(…tools) → {Array.<Face>}
Cuts the face using one or more tools (other faces).
Name | Type | Attributes | Description |
---|---|---|---|
tools | Face | <repeatable> | One or more |
- Source
An array of Face
objects representing the result.
- Type:
- Array.<Face>
extrude(distance) → {Solid}
Extrudes the face by a specified distance to create a 3D solid.
Name | Type | Description |
---|---|---|
distance | number | The extrusion distance. |
- Source
A new Solid
object representing the extruded face.
- Type:
- Solid
fillet(parameters) → {Face}
Applies a fillet (rounded edge) to selected vertices of the face.
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameters | Object | Fillet parameters. Properties
|
- Source
A new Face
object with the fillet applied.
- Type:
- Face
intersect(…tools) → {Array.<Face>}
Intersects the face with one or more tools (other faces).
Name | Type | Attributes | Description |
---|---|---|---|
tools | Face | <repeatable> | One or more |
- Source
An array of Face
objects representing the result.
- Type:
- Array.<Face>
isParallel(direction) → {boolean|undefined}
Checks if the face is parallel to the given direction. Only applicable for planar faces.
Name | Type | Description |
---|---|---|
direction | Vector | The direction vector to test. |
- Source
true
if the face is parallel to the direction, false
otherwise, or undefined
if not a planar face.
- Type:
- boolean |
undefined
isPerpendicular(direction) → {boolean|undefined}
Checks if the face is perpendicular to the given direction. Only applicable for planar faces.
Name | Type | Description |
---|---|---|
direction | Vector | The direction vector to test. |
- Source
true
if the face is perpendicular to the direction, false
otherwise, or undefined
if not a planar face.
- Type:
- boolean |
undefined
join(…tools) → {Array.<Face>}
Joins the face with one or more tools (other faces).
Name | Type | Attributes | Description |
---|---|---|---|
tools | Face | <repeatable> | One or more |
- Source
An array of Face
objects representing the result.
- Type:
- Array.<Face>
mirror(plane) → {Face}
Mirrors the face across a specified plane.
Name | Type | Description |
---|---|---|
plane | Plane | The plane to mirror across. |
- Source
A new Face
object representing the mirrored face.
- Type:
- Face
offset(parameters) → {Face}
Offsets the face's outline by a specified distance. Face holes are also offset by a specified distance.
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters | Object | Offset parameters. Properties
|
- Source
A new Face
object representing the offset face.
- Type:
- Face
reverse() → {Face}
Reverses the orientation of the face.
- Source
A new Face
object with the reversed orientation.
- Type:
- Face
revolve(parameters) → {Solid}
Revolves the face around a specified axis by a given angle to create a 3D solid.
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameters | Object | Revolution parameters. Properties
|
- Source
A new Solid
object representing the revolved face.
- Type:
- Solid
rotate(parameters) → {Face}
Rotates the face around a specified axis by a given angle.
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameters | Object | Rotation parameters. Properties
|
- Source
A new Face
object representing the rotated face.
- Type:
- Face
scale(factor) → {Face}
Scales the face by a specified factor.
Name | Type | Description |
---|---|---|
factor | number | The scaling factor. |
- Source
A new Face
object representing the scaled face.
- Type:
- Face
split(plane) → {Array.<Face>}
Splits the face into multiple parts using a specified plane.
Name | Type | Description |
---|---|---|
plane | Plane | The plane to split the face with. |
- Source
An array of Face
objects representing the split parts.
- Type:
- Array.<Face>
translate(offset) → {Face}
Translates the face by a specified offset.
Name | Type | Description |
---|---|---|
offset | Vector | The translation offset. |
- Source
A new Face
object representing the translated face.
- Type:
- Face
(static) fromWire(wire) → {Face}
Creates a Face
object from a wire. The wire must be closed and form a valid boundary for the face.
Name | Type | Description |
---|---|---|
wire | Wire | The wire to create the face from. |
- Source
a new Face
object created from the given wire.
- Type:
- Face