OpenSCAD Primitives example

Beginner

Foundations

Lesson 2 of 22

Recognize the three basic solids and understand where their origins sit.

Try changing:

sizespacing

Low 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

Ctrl/Cmd+Enter or F5: preview · F6: render · Ctrl/Cmd+F: search · Ctrl+Space: complete · Tab: leave editor

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.

FAQ