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
Name | Type |
---|---|
wire | Wire |
«destructured» | Object |
› defaultDirection? | Point |
› defaultOrigin? | Point |
Defined in
Properties
wire
• wire: Wire
Defined in
Accessors
baseFace
• get
baseFace(): undefined
| null
| Face
Returns
undefined
| null
| Face
Defined in
• set
baseFace(newFace
): void
Parameters
Name | Type |
---|---|
newFace | undefined | null | Face |
Returns
void
Defined in
defaultDirection
• get
defaultDirection(): Vector
Returns
Defined in
• set
defaultDirection(newDirection
): void
Parameters
Name | Type |
---|---|
newDirection | Point |
Returns
void
Defined in
defaultOrigin
• get
defaultOrigin(): Vector
Returns
Defined in
• set
defaultOrigin(newOrigin
): void
Parameters
Name | Type |
---|---|
newOrigin | Point |
Returns
void
Defined in
Methods
clone
▸ clone(): Sketch
Returns
Defined in
delete
▸ delete(): void
Returns
void
Defined in
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
Name | Type |
---|---|
extrusionDistance | number |
«destructured» | Object |
› extrusionDirection? | Point |
› extrusionProfile? | ExtrusionProfile |
› origin? | Point |
› twistAngle? | number |
Returns
Implementation of
Defined in
face
▸ face(): Face
Transforms the lines into a face. The lines should be closed.
Returns
Implementation of
Defined in
faces
▸ faces(): Face
Returns
Defined in
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
Name | Type | Default value |
---|---|---|
otherSketches | Sketch | Sketch [] | undefined |
loftConfig | LoftConfig | {} |
returnShell | boolean | false |
Returns
Implementation of
Defined in
revolve
▸ revolve(revolutionAxis?
, «destructured»?
): Shape3D
Revolves the drawing on an axis (defined by its direction and an origin (defaults to the sketch origin)
Parameters
Name | Type |
---|---|
revolutionAxis? | Point |
«destructured» | Object |
› origin? | Point |
Returns
Implementation of
Defined in
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
Name | Type |
---|---|
sketchOnPlane | (plane : Plane , origin : Point ) => Sketch |
sweepConfig | GenericSweepConfig |
Returns
Defined in
wires
▸ wires(): Wire