OpenSCAD From Profile to Solid example

OpenSCAD examples
/

From Profile to Solid

Beginner

Foundations

Lesson 4 of 22

Reuse a 2D module inside linear_extrude to make a slotted solid.

Try changing:

lengthwidththicknessslot_lengthslot_width

Low compile complexity. One planar boolean followed by a straight extrusion.

How this model works

The profile module remains entirely 2D. Wrapping it in linear_extrude produces a 3D part whose holes pass all the way through. Modeling complex constant-height outlines in 2D first is often cheaper than many 3D boolean operations.

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

Temporarily replace linear_extrude(height = thickness) profile(); with profile(); and switch to 2D/SVG. Restore extrusion and check that XY dimensions stay unchanged.

Change one parameter at a time and inspect the result. Use the workspace reset action to return to this lesson’s original model.

FAQ