DrawingInterface
Implemented by
Properties
boundingBox
• boundingBox: BoundingBox2d
Defined in
Methods
clone
▸ clone(): DrawingInterface
Returns
Defined in
mirror
▸ mirror(centerOrDirection
, origin?
, mode?
): DrawingInterface
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
Name | Type |
---|---|
centerOrDirection | Point2D |
origin? | Point2D |
mode? | "center" | "plane" |
Returns
Defined in
rotate
▸ rotate(angle
, center
): DrawingInterface
Parameters
Name | Type |
---|---|
angle | number |
center | Point2D |
Returns
Defined in
sketchOnFace
▸ sketchOnFace(face
, scaleMode
): SketchInterface
| Sketches
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 facesbounds
normalises the UV parameters on the face to [0,1] intervals.native
uses the default UV parameters of opencascade
Parameters
Name | Type |
---|---|
face | Face |
scaleMode | ScaleMode |
Returns
Defined in
sketchOnPlane
▸ sketchOnPlane(inputPlane
): SketchInterface
| Sketches
Returns the sketched version of the drawing, on a plane
Parameters
Name | Type |
---|---|
inputPlane | Plane |
Returns
Defined in
▸ sketchOnPlane(inputPlane?
, origin?
): SketchInterface
| Sketches
Parameters
Name | Type |
---|---|
inputPlane? | PlaneName |
origin? | number | Point |
Returns
Defined in
▸ sketchOnPlane(inputPlane?
, origin?
): SketchInterface
| Sketches
Parameters
Name | Type |
---|---|
inputPlane? | Plane | PlaneName |
origin? | number | Point |
Returns
Defined in
stretch
▸ stretch(ratio
, direction
, origin
): DrawingInterface
Parameters
Name | Type |
---|---|
ratio | number |
direction | Point2D |
origin | Point2D |
Returns
Defined in
toSVG
▸ toSVG(margin
): string
Formats the drawing as an SVG image
Parameters
Name | Type |
---|---|
margin | number |
Returns
string
Defined in
toSVGPaths
▸ toSVGPaths(): string
[] | string
[][]
Formats the drawing as a list of SVG paths
Returns
string
[] | string
[][]
Defined in
toSVGViewBox
▸ toSVGViewBox(margin?
): string
Returns the SVG viewbox that corresponds to this drawing
Parameters
Name | Type |
---|---|
margin? | number |
Returns
string
Defined in
translate
▸ translate(xDist
, yDist
): DrawingInterface
Parameters
Name | Type |
---|---|
xDist | number |
yDist | number |
Returns
Defined in
▸ translate(translationVector
): DrawingInterface
Parameters
Name | Type |
---|---|
translationVector | Point2D |