I use OpenSCAD as my primary tool when I'm
designing objects for 3D printing. But it's also remarkably useful as
a non-linear editor for existing 3D objects.
For those who aren't familiar with the term: a non-linear editing
system, usually used for video or audio editing, is one that, rather
than modifying the original recording, stores that original and a list
of things to do to it, as it might be "reduce noise", "play this bit
followed by that bit", etc. The process of editing becomes much
faster, and even decisions made early in the process can easily be
un-done later.
The same concept applies to 3D modelling. I can take a mesh file and
load it into Blender, and muck about with it as
much as I like, but while I can undo changes in the reverse of the
order in which I did them, if I messed up something early in the
process everything I did later is wasted.
But OpenSCAD can import mesh files. So I can import a model (without
changing the original), select bits of it and remove or modify them,
and export the result as a new mesh.
For example, I was working on a mailbag token for the Colt Express
boardgame. (Other people had already uploaded three-dimensional
replacements for all the other tokens to
Thingiverse, and I wanted to complete
the set.)
I didn't fancy trying to make the whole thing, but there was already a
set of
dungeon loot markers on
Thingiverse, and I started by extracting one of those. (In Blender,
because that was easiest.)
Then it was OpenSCAD time to reshape the bag (to be more "mailbag" and
less "generic sack"), and to bring in the debossed text:
epsilon=0.001;
difference() {
scale([4,2,4]) import("mailbag.stl");
translate([0,0,-epsilon]) linear_extrude(height=0.6+epsilon) rotate([180,0,0]) text(text="$1200",size=5,halign="center",valign="center");
}
with the result:
Now, sure, I could have done that in Blender. But then I'd have had to
re-do it each time I wanted a new bit of text, or to change the size
or the font. This way I can have any text I like.
I did a similar thing with the existing loot markers to make Cursed
Loot, which looks identical to normal loot but has a much lower value.
That's just a matter of putting in new material to remove the existing
debossed text (with the union()
operator), then carving away at the
composite object (with difference()
, just as above) to put in the new
text label.
There are drawbacks to this. Models are often set up far away from the
coordinate origin, and need to be moved back into it. Some models are
too degenerate for OpenSCAD to render, even if the original can be fed
to a slicer with no problems. And, as OpenSCAD users will already
know, complex models often look odd in preview mode, with missing
front faces.
That's solved by not relying on preview mode, but checking that the
final render comes out in one piece.
Comments on this post are now closed. If you have particular grounds for adding a late comment, comment on a more recent post quoting the URL of this one.