Face Operations

face

Creates a face from wire.

Syntax

cadlib.face(wires, supportFace, planer);

Parameters

Name Type Description
wires Array Array of Wire objects
face Face Optional. provides a support face

Returns

Face


faceFromBezierSurface

Creates face from bezier surface. Surface is defined using poles or control points.

Syntax

cadlib.faceFromBezierSurface(options);

Parameters

Name Type Description
rows Number Number of rows
columns Number Number of columns
tolDegen Number tolerance for degenerate edges. Default value: 0.00001
poles Object or Array [ array of {x, y,z} or [x,y,z] arrays]

Returns

Face


faceFromPoints

Returns a face from point grid

Syntax

cadlib.faceFromPoints(options);

Parameters

Name Type Description
rows Number Number of rows
columns Number Number of columns
tolDegen Number tolerance for degenerate edges. Default value: 0.00001
points Object or Array [ array of {x, y,z} or [x,y,z] arrays]

Returns

Face


faceFromConstraints

Syntax

cadlib.faceFromConstraints(initialFace, constraints, options);

Parameters

Name Type Description
initialFace Face Source face
constraints Object Specify constraints to use
options Object Specify options

Returns

Face


faceFromEdges

Create a face from specified edges

Syntax

cadlib.faceFromEdges(edges);

Parameters

Name Type Description
edges Array Array of edges to build the face

Returns

Face


faceWithHole

Syntax

cadlib.faceWithHole(outerWire, innerWire);

Parameters

Name Type Description
outerWire Wire Wire representing outer wire.
innerWire Wire Wire representing inner wire

Returns

Face


getFaceNormal

Get a face normal at given point

Syntax

cadlib.getFaceNormal(point, face);

Parameters

Name Type Description
point Point The point on the face where normal intersects plain
face Face The face to calculate its normal

Returns

Object {x,y,z}(../face)