meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
en:design_guide_linear_extrude [2020/11/28 03:25] JSCAD Editor |
en:design_guide_linear_extrude [2022/05/02 08:02] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Linear Extrude ==== | ==== Linear Extrude ==== | ||
| - | Extruding 2D shapes into 3D, given height, twist (degrees), and slices (if twist is made): | + | {{ :wiki: |
| - | <code javascript> | + | Extrude a two dimensional shape in an upward linear direction. |
| - | linear_extrude({ height: 10 }, square()); | + | |
| - | linear_extrude({ height: 10, twist: 90 }, square([1, | + | |
| - | linear_extrude({ height: 10, twist: 360, slices: 50}, circle().translate([1, | + | |
| - | linear_extrude({ | + | The two dimensional shape is extruded to the '' |
| - | linear_extrude({ height: 10, center: true, twist: 360, slices: 50}, square([1, | + | |
| - | </ | + | |
| - | Linear extrusion of 2D shape, with optional twist. | + | // |
| + | |||
| + | Defaults: | ||
| + | * height : 1 | ||
| + | * twist : 0 | ||
| + | * twistSteps : 1 (Note: Increasing | ||
| <code javascript> | <code javascript> | ||
| - | // CAG built in method | + | const { extrudeLinear } = require(' |
| - | var c = CAG.circle({radius: 3}); | + | |
| - | extruded | + | const myshape |
| + | const myshape | ||
| </ | </ | ||