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
Implementation of
firstPoint
Get Signature
get firstPoint(): Point2D;
Defined in: blueprints/Blueprint.ts:231
Returns
lastPoint
Get Signature
get lastPoint(): Point2D;
Defined in: blueprints/Blueprint.ts:235
Returns
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
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
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
origin
Point2D = ...
mode
"center" | "plane"
Returns
Blueprint
Implementation of
rotate()
rotate(angle, center?): Blueprint;
Defined in: blueprints/Blueprint.ts:118
Parameters
angle
number
center?
Returns
Blueprint
Implementation of
scale()
scale(scaleFactor, center?): Blueprint;
Defined in: blueprints/Blueprint.ts:110
Parameters
scaleFactor
number
center?
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:
- originaluses global coordinates (1mm in the drawing is 1mm on the face). This is the default, but currently supported only for planar and circular faces
- boundsnormalises the UV parameters on the face to [0,1] intervals.
- nativeuses the default UV parameters of opencascade
Parameters
face
scaleMode?
Returns
Implementation of
sketchOnPlane()
sketchOnPlane(inputPlane?, origin?): Sketch;
Defined in: blueprints/Blueprint.ts:150
Returns the sketched version of the drawing, on a plane
Parameters
inputPlane?
origin?
number | Point
Returns
Implementation of
DrawingInterface.sketchOnPlane
stretch()
stretch(
   ratio, 
   direction, 
   origin): Blueprint;
Defined in: blueprints/Blueprint.ts:99
Parameters
ratio
number
direction
origin
Point2D = ...
Returns
Blueprint
Implementation of
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
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
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
translate()
Call Signature
translate(xDist, yDist): Blueprint;
Defined in: blueprints/Blueprint.ts:125
Parameters
xDist
number
yDist
number
Returns
Blueprint
Implementation of
Call Signature
translate(translationVector): Blueprint;
Defined in: blueprints/Blueprint.ts:126
Parameters
translationVector
Returns
Blueprint