Skip to main content

Class: CompoundBlueprint

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:14

Implements​

Constructors​

Constructor​

new CompoundBlueprint(blueprints): CompoundBlueprint;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:18

Parameters​

blueprints​

Blueprint[]

Returns​

CompoundBlueprint

Properties​

blueprints​

blueprints: Blueprint[];

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:15

Accessors​

boundingBox​

Get Signature​

get boundingBox(): BoundingBox2d;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:27

Returns​

BoundingBox2d

Implementation of​

DrawingInterface.boundingBox


repr​

Get Signature​

get repr(): string;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:36

Returns​

string

Methods​

clone()​

clone(): CompoundBlueprint;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:23

Returns​

CompoundBlueprint

Implementation of​

DrawingInterface.clone


mirror()​

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

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:77

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​

CompoundBlueprint

Implementation of​

DrawingInterface.mirror


punchHole()​

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

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:106

Parameters​

shape​

AnyShape

face​

SingleFace

options?​
draftAngle?​

number

height?​

number

origin?​

Point

Returns​

AnyShape


rotate()​

rotate(angle, center?): CompoundBlueprint;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:56

Parameters​

angle​

number

center?​

Point2D

Returns​

CompoundBlueprint

Implementation of​

DrawingInterface.rotate


scale()​

scale(scaleFactor, center?): CompoundBlueprint;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:62

Parameters​

scaleFactor​

number

center?​

Point2D

Returns​

CompoundBlueprint


sketchOnFace()​

sketchOnFace(face, scaleMode?): CompoundSketch;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:98

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​

CompoundSketch

Implementation of​

DrawingInterface.sketchOnFace


sketchOnPlane()​

sketchOnPlane(plane?, origin?): CompoundSketch;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:87

Returns the sketched version of the drawing, on a plane

Parameters​

plane?​

Plane | PlaneName

origin?​

number | Point

Returns​

CompoundSketch

Implementation of​

DrawingInterface.sketchOnPlane


stretch()​

stretch(
ratio,
direction,
origin): CompoundBlueprint;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:46

Parameters​

ratio​

number

direction​

Point2D

origin​

Point2D

Returns​

CompoundBlueprint

Implementation of​

DrawingInterface.stretch


toSVG()​

toSVG(margin?): string;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:130

Formats the drawing as an SVG image

Parameters​

margin?​

number = 1

Returns​

string

Implementation of​

DrawingInterface.toSVG


toSVGGroup()​

toSVGGroup(): string;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:126

Returns​

string


toSVGPaths()​

toSVGPaths(): string[];

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:122

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/CompoundBlueprint.ts:118

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): CompoundBlueprint;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:69

Parameters​
xDist​

number

yDist​

number

Returns​

CompoundBlueprint

Implementation of​

DrawingInterface.translate

Call Signature​

translate(translationVector): CompoundBlueprint;

Defined in: packages/replicad/src/blueprints/CompoundBlueprint.ts:70

Parameters​
translationVector​

Point2D

Returns​

CompoundBlueprint

Implementation of​

DrawingInterface.translate