Skip to content

3D primitives

Saif Ahmed edited this page Apr 21, 2025 · 1 revision

OpenSCAD Built-in methods

3D Primitives

  • cube *new element created*

    Creates a cube element e.g. $scad->cube("bodyBase",[60,20,10],1). The first parameter is the name of the element (if the named element exists already, it will be over-written). The second parameter is an arrayref of three dimensions. The third parameter defines whether the element is centered in the origin (a true value here centers the element)

  • cylinder *new element created*

    Creates a cylinder element e.g. $scad->cylinder("wheel",{h=>2,r=>8},1). The first parameter is the name of the element (if the named element exists already, it will be over-written).The second parameter is a hashref defining radius and height. The third parameter defines whether the element is centered on the origin (a true value here centers the element)

  • sphere *new element created*

    Creates a sphere element e.g. $scad->cylinder("ball",{r=>8}). The first parameter is the name of the element (if the named element exists already, it will be over-written).The second parameter is a hashref of defining radius of the sphere.

Extras in CAD::OpenSCAD and associated modules

### Extras in CAD::OpenSCAD and associated modules

Contents

Clone this wiki locally