Skip to main content

Class: Blueprint

Defined in: blueprints/Blueprint.ts:41

A Blueprint is an abstract Sketch, a 2D set of curves that can then be sketched on different surfaces (faces or planes)

You should create them by "sketching" with a BlueprintSketcher

Implements

Constructors

Constructor

new Blueprint(curves): Blueprint;

Defined in: blueprints/Blueprint.ts:46

Parameters

curves

Curve2D[]

Returns

Blueprint

Properties

curves

curves: Curve2D[];

Defined in: blueprints/Blueprint.ts:42

Accessors

boundingBox

Get Signature

get boundingBox(): BoundingBox2d;

Defined in: blueprints/Blueprint.ts:67

Returns

BoundingBox2d

Implementation of

DrawingInterface.boundingBox


firstPoint

Get Signature

get firstPoint(): Point2D;

Defined in: blueprints/Blueprint.ts:231

Returns

Point2D


lastPoint

Get Signature

get lastPoint(): Point2D;

Defined in: blueprints/Blueprint.ts:235

Returns

Point2D


orientation

Get Signature

get orientation(): "clockwise" | "counterClockwise";

Defined in: blueprints/Blueprint.ts:74

Returns

"clockwise" | "counterClockwise"


repr

Get Signature

get repr(): string;

Defined in: blueprints/Blueprint.ts:63

Returns

string

Methods

clone()

clone(): Blueprint;

Defined in: blueprints/Blueprint.ts:59

Returns

Blueprint

Implementation of

DrawingInterface.clone


delete()

delete(): void;

Defined in: blueprints/Blueprint.ts:54

Returns

void


intersects()

intersects(other): boolean;

Defined in: blueprints/Blueprint.ts:265

Parameters

other

Blueprint

Returns

boolean


isClosed()

isClosed(): boolean;

Defined in: blueprints/Blueprint.ts:261

Returns

boolean


isInside()

isInside(point): boolean;

Defined in: blueprints/Blueprint.ts:239

Parameters

point

Point2D

Returns

boolean


mirror()

mirror(
centerOrDirection,
origin,
mode): Blueprint;

Defined in: blueprints/Blueprint.ts:137

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

centerOrDirection

Point2D

origin

Point2D = ...

mode

"center" | "plane"

Returns

Blueprint

Implementation of

DrawingInterface.mirror


rotate()

rotate(angle, center?): Blueprint;

Defined in: blueprints/Blueprint.ts:118

Parameters

angle

number

center?

Point2D

Returns

Blueprint

Implementation of

DrawingInterface.rotate


scale()

scale(scaleFactor, center?): Blueprint;

Defined in: blueprints/Blueprint.ts:110

Parameters

scaleFactor

number

center?

Point2D

Returns

Blueprint


sketchOnFace()

sketchOnFace(face, scaleMode?): Sketch;

Defined in: blueprints/Blueprint.ts:168

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

face

Face

scaleMode?

ScaleMode

Returns

Sketch

Implementation of

DrawingInterface.sketchOnFace


sketchOnPlane()

sketchOnPlane(inputPlane?, origin?): Sketch;

Defined in: blueprints/Blueprint.ts:150

Returns the sketched version of the drawing, on a plane

Parameters

inputPlane?

Plane | PlaneName

origin?

number | Point

Returns

Sketch

Implementation of

DrawingInterface.sketchOnPlane


stretch()

stretch(
ratio,
direction,
origin): Blueprint;

Defined in: blueprints/Blueprint.ts:99

Parameters

ratio

number

direction

Point2D

origin

Point2D = ...

Returns

Blueprint

Implementation of

DrawingInterface.stretch


toSVG()

toSVG(margin): string;

Defined in: blueprints/Blueprint.ts:227

Formats the drawing as an SVG image

Parameters

margin

number = 1

Returns

string

Implementation of

DrawingInterface.toSVG


toSVGPath()

toSVGPath(): string;

Defined in: blueprints/Blueprint.ts:215

Returns

string


toSVGPathD()

toSVGPathD(): string;

Defined in: blueprints/Blueprint.ts:199

Returns

string


toSVGPaths()

toSVGPaths(): string[];

Defined in: blueprints/Blueprint.ts:223

Formats the drawing as a list of SVG paths

Returns

string[]

Implementation of

DrawingInterface.toSVGPaths


toSVGViewBox()

toSVGViewBox(margin): string;

Defined in: blueprints/Blueprint.ts:219

Returns the SVG viewbox that corresponds to this drawing

Parameters

margin

number = 1

Returns

string

Implementation of

DrawingInterface.toSVGViewBox


translate()

Call Signature

translate(xDist, yDist): Blueprint;

Defined in: blueprints/Blueprint.ts:125

Parameters
xDist

number

yDist

number

Returns

Blueprint

Implementation of

DrawingInterface.translate

Call Signature

translate(translationVector): Blueprint;

Defined in: blueprints/Blueprint.ts:126

Parameters
translationVector

Point2D

Returns

Blueprint

Implementation of

DrawingInterface.translate