OpenSCAD Primitives example
Foundations
Lesson 2 of 22
Recognize the three basic solids and understand where their origins sit.
Try changing:
sizespacingLow compile complexity. Three independent primitives; final sphere tessellation adds triangles.
How this model works
The cube and cylinder normally start at z = 0, while the sphere is centered at its origin. Translating the sphere upward by its radius puts its lowest point on the ground. The three separated bodies intentionally export as three shells. $preview uses fewer facets while editing than the final render.
main.scad
Loading draft
Ready
Z up · geometry preview
Your geometry will appear here
Preview or render the model to inspect it in 3D.
Geometry-only STL preview
Grid 10 units · Drag: orbit · Right-drag / two fingers: pan · Scroll / pinch: zoom
0 messages
Make it your own
Make all three solids the same height using size. Try center = true on the cube and explain why half of it drops below the ground.
Change one parameter at a time and inspect the result. Use the workspace reset action to return to this lesson’s original model.