debugging tip. I wrote a small helper function which creates 3 cones among each axis, in different colors. Anytime I'm lost (mostly because of rotations) I just call this function, and use it as a reference for everything what's below.

Here's the code, I made it a bit less redundant.

Remember to set debugEnabled=true; if you want the XYZ gizmo be rendered.

module debug(size = 1) {
l = 10;
$fn=5;
if (debugEnabled) {
for (a=[[[0,0,0], "blue"], [[0,90,0], "red"], [[-90,0,0], "green"]])
color(a[1])
rotate(a[0])
cylinder(d1=size, d2=0, h=l*size);
} else {
echo("Model debugging disabled");
}
}

Follow

This is so helpful, I really wish this was built-in.
You can also look up the built-in debug tools: # ! % *
- extremely useful! en.wikibooks.org/wiki/OpenSCAD

· · Web · 0 · 3 · 5
Sign in to participate in the conversation
chaos.social

chaos.social – a Fediverse instance for & by the Chaos community