Skip to main content

Interface: DrawingInterface

Defined in: packages/replicad/src/blueprints/lib.ts:136

Properties​

boundingBox​

boundingBox: BoundingBox2d;

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

Methods​

clone()​

clone(): DrawingInterface;

Defined in: packages/replicad/src/blueprints/lib.ts:137

Returns​

DrawingInterface


mirror()​

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

Defined in: packages/replicad/src/blueprints/lib.ts:151

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​

DrawingInterface


rotate()​

rotate(angle, center): DrawingInterface;

Defined in: packages/replicad/src/blueprints/lib.ts:141

Parameters​

angle​

number

center​

Point2D

Returns​

DrawingInterface


sketchOnFace()​

sketchOnFace(face, scaleMode): 
| SketchInterface
| Sketches;

Defined in: packages/replicad/src/blueprints/lib.ts:182

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​

| SketchInterface | Sketches


sketchOnPlane()​

Call Signature​

sketchOnPlane(inputPlane): 
| SketchInterface
| Sketches;

Defined in: packages/replicad/src/blueprints/lib.ts:160

Returns the sketched version of the drawing, on a plane

Parameters​
inputPlane​

Plane

Returns​

| SketchInterface | Sketches

Call Signature​

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

Defined in: packages/replicad/src/blueprints/lib.ts:161

Parameters​
inputPlane?​

PlaneName

origin?​

number | Point

Returns​

| SketchInterface | Sketches

Call Signature​

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

Defined in: packages/replicad/src/blueprints/lib.ts:165

Parameters​
inputPlane?​

| Plane | PlaneName

origin?​

number | Point

Returns​

| SketchInterface | Sketches


stretch()​

stretch(
ratio,
direction,
origin): DrawingInterface;

Defined in: packages/replicad/src/blueprints/lib.ts:139

Parameters​

ratio​

number

direction​

Point2D

origin​

Point2D

Returns​

DrawingInterface


toSVG()​

toSVG(margin): string;

Defined in: packages/replicad/src/blueprints/lib.ts:187

Formats the drawing as an SVG image

Parameters​

margin​

number

Returns​

string


toSVGPaths()​

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

Defined in: packages/replicad/src/blueprints/lib.ts:197

Formats the drawing as a list of SVG paths

Returns​

string[] | string[][]


toSVGViewBox()​

toSVGViewBox(margin?): string;

Defined in: packages/replicad/src/blueprints/lib.ts:192

Returns the SVG viewbox that corresponds to this drawing

Parameters​

margin?​

number

Returns​

string


translate()​

Call Signature​

translate(xDist, yDist): DrawingInterface;

Defined in: packages/replicad/src/blueprints/lib.ts:143

Parameters​
xDist​

number

yDist​

number

Returns​

DrawingInterface

Call Signature​

translate(translationVector): DrawingInterface;

Defined in: packages/replicad/src/blueprints/lib.ts:144

Parameters​
translationVector​

Point2D

Returns​

DrawingInterface