Skip to main content

Interface: DrawingInterface

Implemented by

Properties

boundingBox

boundingBox: BoundingBox2d

Defined in

blueprints/lib.ts:136

Methods

clone

clone(): DrawingInterface

Returns

DrawingInterface

Defined in

blueprints/lib.ts:135


mirror

mirror(centerOrDirection, origin?, mode?): DrawingInterface

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

DrawingInterface

Defined in

blueprints/lib.ts:147


rotate

rotate(angle, center): DrawingInterface

Parameters

NameType
anglenumber
centerPoint2D

Returns

DrawingInterface

Defined in

blueprints/lib.ts:139


sketchOnFace

sketchOnFace(face, scaleMode): Sketches | SketchInterface

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
scaleModeScaleMode

Returns

Sketches | SketchInterface

Defined in

blueprints/lib.ts:178


sketchOnPlane

sketchOnPlane(inputPlane): Sketches | SketchInterface

Returns the sketched version of the drawing, on a plane

Parameters

NameType
inputPlanePlane

Returns

Sketches | SketchInterface

Defined in

blueprints/lib.ts:156

sketchOnPlane(inputPlane?, origin?): Sketches | SketchInterface

Parameters

NameType
inputPlane?PlaneName
origin?number | Point

Returns

Sketches | SketchInterface

Defined in

blueprints/lib.ts:157

sketchOnPlane(inputPlane?, origin?): Sketches | SketchInterface

Parameters

NameType
inputPlane?Plane | PlaneName
origin?number | Point

Returns

Sketches | SketchInterface

Defined in

blueprints/lib.ts:161


stretch

stretch(ratio, direction, origin): DrawingInterface

Parameters

NameType
rationumber
directionPoint2D
originPoint2D

Returns

DrawingInterface

Defined in

blueprints/lib.ts:137


toSVG

toSVG(margin): string

Formats the drawing as an SVG image

Parameters

NameType
marginnumber

Returns

string

Defined in

blueprints/lib.ts:183


toSVGPaths

toSVGPaths(): string[] | string[][]

Formats the drawing as a list of SVG paths

Returns

string[] | string[][]

Defined in

blueprints/lib.ts:193


toSVGViewBox

toSVGViewBox(margin?): string

Returns the SVG viewbox that corresponds to this drawing

Parameters

NameType
margin?number

Returns

string

Defined in

blueprints/lib.ts:188


translate

translate(xDist, yDist): DrawingInterface

Parameters

NameType
xDistnumber
yDistnumber

Returns

DrawingInterface

Defined in

blueprints/lib.ts:140