Face
A planar face bounded by one outer loop and any number of hole loops.
Extends
Section titled “Extends”Properties
Section titled “Properties”
readonlyarea:number
Area in the face’s own context, in square meters.
backMaterial
Section titled “backMaterial”
readonlybackMaterial:Material|null
The back material, or null.
entityId
Section titled “entityId”
readonlyentityId:number
Identifier that stays the same for the entity’s lifetime, including across undo and redo.
Inherited from
Section titled “Inherited from”hidden
Section titled “hidden”hidden:
boolean
The element’s own hidden flag; assign inside Model.operation. Hidden ancestors are not taken into account; use Model.isDrawingElementVisible for that.
Inherited from
Section titled “Inherited from”isDeleted
Section titled “isDeleted”
readonlyisDeleted:boolean
Whether the entity was deleted, for example by an edit or by undo.
Inherited from
Section titled “Inherited from”isValid
Section titled “isValid”
readonlyisValid:boolean
Whether the entity still exists in the model.
Inherited from
Section titled “Inherited from”
readonlyloops: readonlyLoop[]
All boundary loops: the outer loop and every hole.
material
Section titled “material”
readonlymaterial:Material|null
The front material, or null.
normal
Section titled “normal”
readonlynormal:Vector3d|null
Unit front normal in the face’s own context, or null for a degenerate face.
outerLoop
Section titled “outerLoop”
readonlyouterLoop:Loop
The outer boundary loop.
readonlytype:"Face"
The concrete class name, for narrowing unions such as AnyElement.
Overrides
Section titled “Overrides”visible
Section titled “visible”visible:
boolean
The inverse of hidden; assign inside Model.operation.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”extrude()
Section titled “extrude()”extrude(
distance):Face|null
Extrudes the face by a signed distance in meters, like the Extrude tool. Positive distances follow normal. Call it inside Model.operation.
Returns the cap face, the same face when distance is zero, or null when the
extrusion cuts through an opposite face. Other faces may be replaced, so keep the
returned cap for further edits. Throws ModelError when the distance goes beyond
the first parallel opposite face or the geometry isn’t supported.
Parameters
Section titled “Parameters”distance
Section titled “distance”number
Returns
Section titled “Returns”Face | null