Skip to main content

DrawingInterface

Implemented by​

Properties​

boundingBox​

• boundingBox: BoundingBox2d

Defined in​

blueprints/lib.ts:138

Methods​

clone​

▸ clone(): DrawingInterface

Returns​

DrawingInterface

Defined in​

blueprints/lib.ts:137


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:151


rotate​

▸ rotate(angle, center): DrawingInterface

Parameters​

NameType
anglenumber
centerPoint2D

Returns​

DrawingInterface

Defined in​

blueprints/lib.ts:141


sketchOnFace​

▸ sketchOnFace(face, scaleMode): SketchInterface | 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
scaleModeScaleMode

Returns​

SketchInterface | Sketches

Defined in​

blueprints/lib.ts:182


sketchOnPlane​

▸ sketchOnPlane(inputPlane): SketchInterface | Sketches

Returns the sketched version of the drawing, on a plane

Parameters​

NameType
inputPlanePlane

Returns​

SketchInterface | Sketches

Defined in​

blueprints/lib.ts:160

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

Parameters​

NameType
inputPlane?PlaneName
origin?number | Point

Returns​

SketchInterface | Sketches

Defined in​

blueprints/lib.ts:161

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

Parameters​

NameType
inputPlane?Plane | PlaneName
origin?number | Point

Returns​

SketchInterface | Sketches

Defined in​

blueprints/lib.ts:165


stretch​

▸ stretch(ratio, direction, origin): DrawingInterface

Parameters​

NameType
rationumber
directionPoint2D
originPoint2D

Returns​

DrawingInterface

Defined in​

blueprints/lib.ts:139


toSVG​

▸ toSVG(margin): string

Formats the drawing as an SVG image

Parameters​

NameType
marginnumber

Returns​

string

Defined in​

blueprints/lib.ts:187


toSVGPaths​

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

Formats the drawing as a list of SVG paths

Returns​

string[] | string[][]

Defined in​

blueprints/lib.ts:197


toSVGViewBox​

▸ toSVGViewBox(margin?): string

Returns the SVG viewbox that corresponds to this drawing

Parameters​

NameType
margin?number

Returns​

string

Defined in​

blueprints/lib.ts:192


translate​

▸ translate(xDist, yDist): DrawingInterface

Parameters​

NameType
xDistnumber
yDistnumber

Returns​

DrawingInterface

Defined in​

blueprints/lib.ts:143

▸ translate(translationVector): DrawingInterface

Parameters​

NameType
translationVectorPoint2D

Returns​

DrawingInterface

Defined in​

blueprints/lib.ts:144