Skip to main content

Class: Blueprint

Defined in: packages/replicad/src/blueprints/Blueprint.ts:42

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: packages/replicad/src/blueprints/Blueprint.ts:47

Parameters​

curves​

Curve2D[]

Returns​

Blueprint

Properties​

curves​

curves: Curve2D[];

Defined in: packages/replicad/src/blueprints/Blueprint.ts:43

Accessors​

boundingBox​

Get Signature​

get boundingBox(): BoundingBox2d;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:68

Returns​

BoundingBox2d

Implementation of​

DrawingInterface.boundingBox


firstPoint​

Get Signature​

get firstPoint(): Point2D;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:280

Returns​

Point2D


lastPoint​

Get Signature​

get lastPoint(): Point2D;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:284

Returns​

Point2D


orientation​

Get Signature​

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

Defined in: packages/replicad/src/blueprints/Blueprint.ts:75

Returns​

"clockwise" | "counterClockwise"


repr​

Get Signature​

get repr(): string;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:64

Returns​

string

Methods​

clone()​

clone(): Blueprint;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:60

Returns​

Blueprint

Implementation of​

DrawingInterface.clone


delete()​

delete(): void;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:55

Returns​

void


intersects()​

intersects(other): boolean;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:314

Parameters​

other​

Blueprint

Returns​

boolean


isClosed()​

isClosed(): boolean;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:310

Returns​

boolean


isInside()​

isInside(point): boolean;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:288

Parameters​

point​

Point2D

Returns​

boolean


mirror()​

mirror(
centerOrDirection,
origin?,
mode?): Blueprint;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:138

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


punchHole()​

punchHole(
shape,
face,
__namedParameters?): AnyShape;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:211

Parameters​

shape​

AnyShape

face​

SingleFace

__namedParameters?​
draftAngle?​

number = 0

height?​

number | null = null

origin?​

Point | null = null

Returns​

AnyShape


rotate()​

rotate(angle, center?): Blueprint;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:119

Parameters​

angle​

number

center?​

Point2D

Returns​

Blueprint

Implementation of​

DrawingInterface.rotate


scale()​

scale(scaleFactor, center?): Blueprint;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:111

Parameters​

scaleFactor​

number

center?​

Point2D

Returns​

Blueprint


sketchOnFace()​

sketchOnFace(face, scaleMode?): Sketch;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:169

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: packages/replicad/src/blueprints/Blueprint.ts:151

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: packages/replicad/src/blueprints/Blueprint.ts:100

Parameters​

ratio​

number

direction​

Point2D

origin?​

Point2D = ...

Returns​

Blueprint

Implementation of​

DrawingInterface.stretch


subFace()​

subFace(face, origin?): Face;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:200

Parameters​

face​

Face

origin?​

Point | null

Returns​

Face


toSVG()​

toSVG(margin?): string;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:276

Formats the drawing as an SVG image

Parameters​

margin?​

number = 1

Returns​

string

Implementation of​

DrawingInterface.toSVG


toSVGPath()​

toSVGPath(): string;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:264

Returns​

string


toSVGPathD()​

toSVGPathD(): string;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:248

Returns​

string


toSVGPaths()​

toSVGPaths(): string[];

Defined in: packages/replicad/src/blueprints/Blueprint.ts:272

Formats the drawing as a list of SVG paths

Returns​

string[]

Implementation of​

DrawingInterface.toSVGPaths


toSVGViewBox()​

toSVGViewBox(margin?): string;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:268

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: packages/replicad/src/blueprints/Blueprint.ts:126

Parameters​
xDist​

number

yDist​

number

Returns​

Blueprint

Implementation of​

DrawingInterface.translate

Call Signature​

translate(translationVector): Blueprint;

Defined in: packages/replicad/src/blueprints/Blueprint.ts:127

Parameters​
translationVector​

Point2D

Returns​

Blueprint

Implementation of​

DrawingInterface.translate