Skip to main content

Sketch

A line drawing to be acted upon. It defines directions to be acted upon by definition (extrusion direction for instance).

Note that all operations will delete the sketch

Implements

Constructors

constructor

new Sketch(wire, «destructured»?)

Parameters

NameType
wireWire
«destructured»Object
› defaultDirection?Point
› defaultOrigin?Point

Defined in

sketches/Sketch.ts:39

Properties

wire

wire: Wire

Defined in

sketches/Sketch.ts:27

Accessors

baseFace

get baseFace(): undefined | null | Face

Returns

undefined | null | Face

Defined in

sketches/Sketch.ts:55

set baseFace(newFace): void

Parameters

NameType
newFaceundefined | null | Face

Returns

void

Defined in

sketches/Sketch.ts:59


defaultDirection

get defaultDirection(): Vector

Returns

Vector

Defined in

sketches/Sketch.ts:88

set defaultDirection(newDirection): void

Parameters

NameType
newDirectionPoint

Returns

void

Defined in

sketches/Sketch.ts:92


defaultOrigin

get defaultOrigin(): Vector

Returns

Vector

Defined in

sketches/Sketch.ts:80

set defaultOrigin(newOrigin): void

Parameters

NameType
newOriginPoint

Returns

void

Defined in

sketches/Sketch.ts:84

Methods

clone

clone(): Sketch

Returns

Sketch

Defined in

sketches/Sketch.ts:71


delete

delete(): void

Returns

void

Defined in

sketches/Sketch.ts:64


extrude

extrude(extrusionDistance, «destructured»?): Shape3D

Extrudes the sketch to a certain distance.(along the default direction and origin of the sketch).

You can define another extrusion direction or origin,

It is also possible to twist extrude with an angle (in degrees), or to give a profile to the extrusion (the endFactor will scale the face, and the profile will define how the scale is applied (either linarly or with a s-shape).

Parameters

NameType
extrusionDistancenumber
«destructured»Object
› extrusionDirection?Point
› extrusionProfile?ExtrusionProfile
› origin?Point
› twistAngle?number

Returns

Shape3D

Implementation of

SketchInterface.extrude

Defined in

sketches/Sketch.ts:146


face

face(): Face

Transforms the lines into a face. The lines should be closed.

Returns

Face

Implementation of

SketchInterface.face

Defined in

sketches/Sketch.ts:99


faces

faces(): Face

Returns

Face

Defined in

sketches/Sketch.ts:113


loftWith

loftWith(otherSketches, loftConfig?, returnShell?): Shape3D

Loft between this sketch and another sketch (or an array of them)

You can also define a startPoint for the loft (that will be placed before this sketch) and an endPoint after the last one.

You can also define if you want the loft to result in a ruled surface.

Note that all sketches will be deleted by this operation

Parameters

NameTypeDefault value
otherSketchesSketch | Sketch[]undefined
loftConfigLoftConfig{}
returnShellbooleanfalse

Returns

Shape3D

Implementation of

SketchInterface.loftWith

Defined in

sketches/Sketch.ts:243


revolve

revolve(revolutionAxis?, «destructured»?): Shape3D

Revolves the drawing on an axis (defined by its direction and an origin (defaults to the sketch origin)

Parameters

NameType
revolutionAxis?Point
«destructured»Object
› origin?Point

Returns

Shape3D

Implementation of

SketchInterface.revolve

Defined in

sketches/Sketch.ts:121


sweepSketch

sweepSketch(sketchOnPlane, sweepConfig?): Shape3D

Sweep along this sketch another sketch defined in the function sketchOnPlane.

TODO: clean the interface of the sweep config to make it more understandable.

Parameters

NameType
sketchOnPlane(plane: Plane, origin: Point) => Sketch
sweepConfigGenericSweepConfig

Returns

Shape3D

Defined in

sketches/Sketch.ts:208


wires

wires(): Wire

Returns

Wire

Defined in

sketches/Sketch.ts:109