Measurements

distanceF2F()

Creates a Face from specified edges

Syntax

cadlib.face(edges);

Parameters

Name Type Description
edges Array Array of Edge objects

Returns

Face


distanceE2F()

Creates a Face from specified edges

Syntax

cadlib.face(edges);

Parameters

Name Type Description
edges Array Array of Edge objects

Returns

Face


distanceE2E()

Creates a Face from specified edges

Syntax

cadlib.face(edges);

Parameters

Name Type Description
edges Array Array of Edge objects

Returns

Face


measureFace()

Measures given face. You can extract UV bounds information from the return value

Syntax

cadlib.measureFace(face);

Parameters

Name Type Description
face Face Face object

Returns

Object An object with following information

{
	surfaceType: string 
	area: number
	bounds: { u1, u2, v1, v2},
	center: { x, y, z}
	centerOfMass: { x, y, z}
}


measureRadius()

Measures Radius

Syntax

cadlib.measureRadius(edges);

Parameters

Name Type Description
edges Array Array of Edge objects

Returns

Face


measureLength()

Measures length of an edge, wire’s edges or face’s edges.

Syntax

cadlib.measureLength(shape);

Parameters

Name Type Description
shape Shape A Wire or Face object

Returns

Object - An object with