Edge Operations

edge

Creates a new edge.

Syntax

cadlib.edge()

Parameters

Takes no parameters

Returns

Edge


arc2p

Creates an edge representing an arc passing thru two points.

Syntax

cadlib.arc2p(center, axis, radius, p1,p2)

Parameters

Name Type Description
center
axis
radius
p1
p2

Returns


arcEllipse

Creates an edge representing an ellipitcal arc.

Syntax

cadlib.ellipse(center, axis, majorRadius, minorRadius, p1,p2)

Parameters

Name Type Description
center
axis
majorRadius
minorRadius
p1
p2

Returns

Edge


_bezierCurve

Creates an edge representing bezier curve

Syntax

cadlib.bezierCurve(poles, weights)

Parameters

Name Type Description
poles Array array of startpoint, control-points and endpoint
weights

Returns

Edge


helix

Creates an edge representing helix.

Syntax

cadlib.helix(options)

Parameters

Options object -

Name Type Description
pitch Number Defaults to 1.0
height Number Defaults to 5.0
face {Face}[./]
radius Number Defaults to 5
leftHanded Boolean True, if left handeded helix
longVersion Boolean True, if it is a long version

Returns

Edge


bsplineCurve

Creates an edge from the spline curve.

Syntax

cadlib.helix(poles, weights, knots, multiplicities, degree, rational);

Parameters

Options object -

Name Type Description

Returns

Edge


interpolateSplineCurve

Creates an edge from a spline built by interpolating the points.

Syntax

cadlib.helix(points, periodic, tolerance, startTangent, endTangent);

Parameters

Options object -

Name Type Description

Returns

Edge


edgesFromSVG

edgeFromSVGPath