Skip to content
Shapemetry

@huukhanhnguyen/model / nodeMethods/face

nodeMethods/face

asPaths()

asPaths(input): PointPath[]

Every open/closed path in a value. A FACE contributes its boundary loops (already closed); a curve contributes its own topology.

Parameters

input

unknown

Returns

PointPath[]


asShapes()

asShapes(input): BrepData[]

Parameters

input

unknown

Returns

BrepData[]


coplanarGroups()

coplanarGroups(regions): BrepData[][]

Partition regions into coplanar groups (first member = the group's plane representative). A plane-aware boolean runs per group — regions on different planes never silently merge or drop.

Parameters

regions

BrepData[]

Returns

BrepData[][]


faceOffset()

faceOffset(face, distance): BrepData

Parameters

face

BrepData

distance

number

Returns

BrepData


faceTrim()

faceTrim(face, tool, side?): BrepData

Parameters

face

unknown

tool

unknown

side?

boolean = true

Returns

BrepData


fill()

fill(curve): BrepData

Parameters

curve

CurveData | PolyCurve | PolyCurve[] | CurveData[]

Returns

BrepData


fromCurve2d()

fromCurve2d(regionJson, uvMatrix?): BrepData

Sample the region's boundary to polygon VERTICES (any arc segment is tessellated at a sane chord tolerance), unproject 2D→3D via the frame, producing 3D world loops.

Parameters

regionJson

string

uvMatrix?

Transformation

Returns

BrepData


groupedThickenPaths()

groupedThickenPaths(input, distance, joinType, endType): BrepData[]

Parameters

input

unknown

distance

number

joinType

OffsetJoinType

endType

OffsetEndType

Returns

BrepData[]


newellNormal()

newellNormal(loop): Point

Unit normal of a CLOSED loop by Newell's method. [0, 0, 1] when the loop encloses no area — the single spelling for solid.ts, planarize.ts, section.ts and importFaces.ts, which each carried an identical copy.

Parameters

loop

Point[]

Returns

Point


planarIntersect()

planarIntersect(a, other): BrepData

Parameters

a

BrepData

other

unknown

Returns

BrepData


planarOffsetAll()

planarOffsetAll(faces, distance): BrepData

Parameters

faces

BrepData[]

distance

number

Returns

BrepData


planarSubtract()

planarSubtract(a, other): BrepData

Parameters

a

BrepData

other

unknown

Returns

BrepData


planarUnion()

planarUnion(a, other): BrepData

Parameters

a

BrepData

other

unknown

Returns

BrepData


planarUnionAll()

planarUnionAll(faces): BrepData

Parameters

faces

BrepData[]

Returns

BrepData


planarUnionRegions()

planarUnionRegions(faces): BrepData[]

Parameters

faces

BrepData[]

Returns

BrepData[]


planeMatrix()

planeMatrix(face): Transformation

Parameters

face

BrepData

Returns

Transformation


planeNormal()

planeNormal(face): Point

Parameters

face

BrepData

Returns

Point


reverseShape()

reverseShape(e): BrepData

Parameters

e

BrepData

Returns

BrepData


thickenPaths()

thickenPaths(paths, distance, joinType, endType): BrepData

Stroke a coplanar group of paths into ONE filled face. Each path keeps its own open/closed flag, so an open path strokes with end caps instead of becoming a thin closed ring.

Parameters

paths

PointPath[]

distance

number

joinType

OffsetJoinType

endType

OffsetEndType

Returns

BrepData


toCurve2d()

toCurve2d(face): string

Build a Curve2d from a face: project each 3D loop to 2D via the face frame (drop z). Closed polygon rings for boolean / offset / triangulation.

Parameters

face

BrepData

Returns

string


toPolylines3D()

toPolylines3D(s): PointPath[]

Parameters

s

BrepData

Returns

PointPath[]


straightSkeleton

Re-exports straightSkeleton

Last updated: 📖 3 min readEdit on GitHub