Class: Sketch
Defined in: sketches/Sketch.ts:26
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, __namedParameters): Sketch;
Defined in: sketches/Sketch.ts:39
Parameters
wire
__namedParameters
defaultDirection?
Point
= ...
defaultOrigin?
Point
= ...
Returns
Sketch
Properties
wire
wire: Wire;
Defined in: sketches/Sketch.ts:27
Accessors
baseFace
Get Signature
get baseFace(): undefined | null | Face;
Defined in: sketches/Sketch.ts:55
Returns
undefined
| null
| Face
Set Signature
set baseFace(newFace): void;
Defined in: sketches/Sketch.ts:59
Parameters
newFace
undefined
| null
| Face
Returns
void
defaultDirection
Get Signature
get defaultDirection(): Vector;
Defined in: sketches/Sketch.ts:88
Returns
Set Signature
set defaultDirection(newDirection): void;
Defined in: sketches/Sketch.ts:92
Parameters
newDirection
Returns
void
defaultOrigin
Get Signature
get defaultOrigin(): Vector;
Defined in: sketches/Sketch.ts:80
Returns
Set Signature
set defaultOrigin(newOrigin): void;
Defined in: sketches/Sketch.ts:84
Parameters
newOrigin
Returns
void
Methods
clone()
clone(): Sketch;
Defined in: sketches/Sketch.ts:71
Returns
Sketch
delete()
delete(): void;
Defined in: sketches/Sketch.ts:64
Returns
void
extrude()
extrude(extrusionDistance, __namedParameters): Shape3D;
Defined in: sketches/Sketch.ts:146
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
extrusionDistance
number
__namedParameters
extrusionDirection?
extrusionProfile?
origin?
twistAngle?
number
Returns
Implementation of
face()
face(): Face;
Defined in: sketches/Sketch.ts:99
Transforms the lines into a face. The lines should be closed.
Returns
Implementation of
faces()
faces(): Face;
Defined in: sketches/Sketch.ts:113
Returns
loftWith()
loftWith(
otherSketches,
loftConfig,
returnShell): Shape3D;
Defined in: sketches/Sketch.ts:243
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
otherSketches
Sketch
| Sketch
[]
loftConfig
LoftConfig
= {}
returnShell
boolean
= false
Returns
Implementation of
revolve()
revolve(revolutionAxis?, __namedParameters?): Shape3D;
Defined in: sketches/Sketch.ts:121
Revolves the drawing on an axis (defined by its direction and an origin (defaults to the sketch origin)
Parameters
revolutionAxis?
__namedParameters?
origin?
Returns
Implementation of
sweepSketch()
sweepSketch(sketchOnPlane, sweepConfig): Shape3D;
Defined in: sketches/Sketch.ts:208
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
sketchOnPlane
(plane
, origin
) => this
sweepConfig
GenericSweepConfig
= {}
Returns
wires()
wires(): Wire;
Defined in: sketches/Sketch.ts:109