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_cylinder [2020/11/30 04:13] JSCAD Editor |
en:design_guide_cylinder [2022/04/13 06:54] (current) rozek included "require" statements |
||
|---|---|---|---|
| Line 16: | Line 16: | ||
| <code javascript> | <code javascript> | ||
| + | const { cylinder } = require(' | ||
| + | |||
| const myshape = cylinder({radius: | const myshape = cylinder({radius: | ||
| const myshape = cylinder({radius: | const myshape = cylinder({radius: | ||
| Line 22: | Line 24: | ||
| === Elliptical Cylinder === | === Elliptical Cylinder === | ||
| + | |||
| + | {{ : | ||
| Various cylindrical shapes can be created using the elliptical cylinder, including cylinders with changing radius (cones). | Various cylindrical shapes can be created using the elliptical cylinder, including cylinders with changing radius (cones). | ||
| Defaults: | Defaults: | ||
| - | * radius : 1 | ||
| * height : 2 | * height : 2 | ||
| - | * startRadius: | + | * startRadius : [1, 1] |
| - | * endRadius: [1, 1] | + | * endRadius : [1, 1] |
| * center : [0, 0, 0] | * center : [0, 0, 0] | ||
| * segments : 32 | * segments : 32 | ||
| - | * startAngle: 0 | + | * startAngle : 0 |
| - | * endAngle: PI * 2 | + | * endAngle : PI * 2 |
| <code javascript> | <code javascript> | ||
| - | let myshape = cylinderElliptic({height: | + | const { cylinderElliptic } = require(' |
| + | |||
| + | const myshape = cylinderElliptic({height: | ||
| </ | </ | ||
| === Rounded Cylinder === | === Rounded Cylinder === | ||
| + | |||
| + | {{ : | ||
| Cylinders can be created with rounded ends by specifying '' | Cylinders can be created with rounded ends by specifying '' | ||
| Line 51: | Line 58: | ||
| <code javascript> | <code javascript> | ||
| + | const { roundedCylinder } = require(' | ||
| + | |||
| const myshape = roundedCylinder({radius: | const myshape = roundedCylinder({radius: | ||
| const myshape = roundedCylinder({radius: | const myshape = roundedCylinder({radius: | ||
| </ | </ | ||