Skip to main content

Blueprints

Implements​

Constructors​

constructor​

• new Blueprints(blueprints)

Parameters​

NameType
blueprints(CompoundBlueprint | Blueprint)[]

Defined in​

blueprints/Blueprints.ts:17

Properties​

blueprints​

• blueprints: (CompoundBlueprint | Blueprint)[]

Defined in​

blueprints/Blueprints.ts:15

Accessors​

boundingBox​

• get boundingBox(): BoundingBox2d

Returns​

BoundingBox2d

Implementation of​

DrawingInterface.boundingBox

Defined in​

blueprints/Blueprints.ts:30


repr​

• get repr(): string

Returns​

string

Defined in​

blueprints/Blueprints.ts:22

Methods​

clone​

▸ clone(): Blueprints

Returns​

Blueprints

Implementation of​

DrawingInterface.clone

Defined in​

blueprints/Blueprints.ts:26


mirror​

▸ mirror(centerOrDirection, origin?, mode?): Blueprints

Returns the mirror image of this drawing made with a single point (in center mode, the default, or a plane, (plane mode, with both direction and origin of the plane).

Parameters​

NameType
centerOrDirectionPoint2D
origin?Point2D
mode?"center" | "plane"

Returns​

Blueprints

Implementation of​

DrawingInterface.mirror

Defined in​

blueprints/Blueprints.ts:66


rotate​

▸ rotate(angle, center?): Blueprints

Parameters​

NameType
anglenumber
center?Point2D

Returns​

Blueprints

Implementation of​

DrawingInterface.rotate

Defined in​

blueprints/Blueprints.ts:45


scale​

▸ scale(scaleFactor, center?): Blueprints

Parameters​

NameType
scaleFactornumber
center?Point2D

Returns​

Blueprints

Defined in​

blueprints/Blueprints.ts:51


sketchOnFace​

▸ sketchOnFace(face, scaleMode?): Sketches

Returns the sketched version of the drawing, on a face.

The scale mode corresponds to the way the coordinates of the drawing are interpreted match with the face:

  • original uses global coordinates (1mm in the drawing is 1mm on the face). This is the default, but currently supported only for planar and circular faces
  • bounds normalises the UV parameters on the face to [0,1] intervals.
  • native uses the default UV parameters of opencascade

Parameters​

NameType
faceFace
scaleMode?ScaleMode

Returns​

Sketches

Implementation of​

DrawingInterface.sketchOnFace

Defined in​

blueprints/Blueprints.ts:82


sketchOnPlane​

▸ sketchOnPlane(plane?, origin?): Sketches

Returns the sketched version of the drawing, on a plane

Parameters​

NameType
plane?Plane | PlaneName
origin?number | Point

Returns​

Sketches

Implementation of​

DrawingInterface.sketchOnPlane

Defined in​

blueprints/Blueprints.ts:76


stretch​

▸ stretch(ratio, direction, origin): Blueprints

Parameters​

NameType
rationumber
directionPoint2D
originPoint2D

Returns​

Blueprints

Implementation of​

DrawingInterface.stretch

Defined in​

blueprints/Blueprints.ts:39


toSVG​

▸ toSVG(margin?): string

Formats the drawing as an SVG image

Parameters​

NameTypeDefault value
marginnumber1

Returns​

string

Implementation of​

DrawingInterface.toSVG

Defined in​

blueprints/Blueprints.ts:96


toSVGPaths​

▸ toSVGPaths(): string[][]

Formats the drawing as a list of SVG paths

Returns​

string[][]

Implementation of​

DrawingInterface.toSVGPaths

Defined in​

blueprints/Blueprints.ts:92


toSVGViewBox​

▸ toSVGViewBox(margin?): string

Returns the SVG viewbox that corresponds to this drawing

Parameters​

NameTypeDefault value
marginnumber1

Returns​

string

Implementation of​

DrawingInterface.toSVGViewBox

Defined in​

blueprints/Blueprints.ts:88


translate​

▸ translate(xDist, yDist): Blueprints

Parameters​

NameType
xDistnumber
yDistnumber

Returns​

Blueprints

Implementation of​

DrawingInterface.translate

Defined in​

blueprints/Blueprints.ts:58

▸ translate(translationVector): Blueprints

Parameters​

NameType
translationVectorPoint2D

Returns​

Blueprints

Implementation of​

DrawingInterface.translate

Defined in​

blueprints/Blueprints.ts:59