@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
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
distance
number
Returns
faceTrim()
faceTrim(
face,tool,side?):BrepData
Parameters
face
unknown
tool
unknown
side?
boolean = true
Returns
fill()
fill(
curve):BrepData
Parameters
curve
CurveData | PolyCurve | PolyCurve[] | CurveData[]
Returns
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?
Returns
groupedThickenPaths()
groupedThickenPaths(
input,distance,joinType,endType):BrepData[]
Parameters
input
unknown
distance
number
joinType
endType
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
planarIntersect()
planarIntersect(
a,other):BrepData
Parameters
a
other
unknown
Returns
planarOffsetAll()
planarOffsetAll(
faces,distance):BrepData
Parameters
faces
BrepData[]
distance
number
Returns
planarSubtract()
planarSubtract(
a,other):BrepData
Parameters
a
other
unknown
Returns
planarUnion()
planarUnion(
a,other):BrepData
Parameters
a
other
unknown
Returns
planarUnionAll()
planarUnionAll(
faces):BrepData
Parameters
faces
BrepData[]
Returns
planarUnionRegions()
planarUnionRegions(
faces):BrepData[]
Parameters
faces
BrepData[]
Returns
BrepData[]
planeMatrix()
planeMatrix(
face):Transformation
Parameters
face
Returns
planeNormal()
planeNormal(
face):Point
Parameters
face
Returns
reverseShape()
reverseShape(
e):BrepData
Parameters
e
Returns
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
distance
number
joinType
endType
Returns
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
Returns
string
toPolylines3D()
toPolylines3D(
s):PointPath[]
Parameters
s
Returns
straightSkeleton
Re-exports straightSkeleton