my FreeCAD experience (was Re: Anelok: the 2015 case 1/2: background)
werner at almesberger.net
Tue Jan 20 00:51:47 UTC 2015
Paul Boddie wrote:
> I found FreeCAD to be fairly unstable and counterintuitive,
It didn't crash too often at me :) But the sketcher can enter weird
states where I found it safer to exit and start over again than to
try to solve the developing problem. I found the concept of
workbenches confusing but it's something one can get used to.
As I said, my experience with trying to construct things though the
GUI was not very good. For example, I drew a rectangle with rounded
corners for the outline. This only takes a minute or two in the
sketcher. Then I extruded it to form the bottom of the case. Also
this is easy.
Next, I placed a sketch on top of the extruded surface to build the
next layer (some wall). In this sketch, I reused ("imported")
positions from the underlying rectangle. Then I extruded this
layer. So far, it all worked very nicely.
Then I decided to move the coordinate origin of the sketch at the
bottom from the center of the rectangle to where the PCB's lower
left corner would be. It was easy enough to change the sketch, by
just modifying the constraints of the elements within. I.e., I
didn't delete or add any lines or arcs.
When I finished the sketch and got back to the 3D view, I found
that the extrusion directly based on the sketch had been updated,
but the one on top of that hadn't. That's where the first bubble of
nice parametric design burst.
I didn't give up so quickly, though, because this could have just
been a stray mishap. So I started over again, this time with the
coordinate system where I wanted it to be. I got as far as adding
the lanyard hole, which was - in this case - an arc for the outer
wall, line segments to connect the arc to the straight walls, and a
circle for the hole, concentric to the arc.
The arc went into one sketch (which I extruded) while the circle for
the hole went into another sketch that sat on top of the
extrusion and from which I "pocketed" the hole. Again, everything
Then I realized that the geometry I had planned for the lanyard had
always been wrong and that I had to change the wall thickness to
actually make it fit. A change in thickness also meant that the
center would move. But that was okay, since it's all expressed in
the sketch in terms of how things relate to each other. Right ?
Well, the center moved willingly enough, but then I had again the
problem that the dependent sketch wasn't updated and the hole ended
up off-center. So I re-exported the new positions, aligned things
again, and redid the pocketing.
Then I found some more issues with the geometry ...
So in the end I gave up on trying to use sketch-based construction
and thought some vengeful thoughts on what it would take to make
fped better at 3D. Before opening that can of worms, I decided to
give Python scripting in FreeCAD a try.
This turned out to work quite well, and I also find it reassuring
that it would let me go well beyond mere drawing tasks, as
illustrated by the slicer. (Try doing that in OpenSCAD ;-)
The main problem there is the state of the documentation. There is
just enough material to find one's way, possibly with some trial
and error until one guesses the method names and data structures
right, and a lot of googling.
> It looks quite clean, and it makes me consider it instead of OpenSCAD for
> future stuff. Certainly, the style is similar enough.
What's good in FreeCAD is that most things behave in a reasonable
way by default. When I tried to use OpenSCAD for the Anelok case a
while ago, I found that items never seemed to end up where I thought
they should be.
I found FreeCAD also to be a lot more robust than OpenSCAD when it
comes to visualization. This is consistent with what I saw in
experiments a few years ago when systems based on OpenCASCADE
worked very nicely while CGAL-based OpenSCAD had no end of trouble
with coincident faces and such.
> Very nice! I particularly like the shading. You may have mentioned this
> already, but how do you generate these nice previews?
They're just cropped screenshots, in one case with the contrast
stretched by GIMP. The model is displayed like this in FreeCAD.
(That is, if you change the color of solids to have transparency -
the default is that they're opaque.)
> It's interesting how Python finds its way into the CAD process.
Yeah, it's everywhere :) FreeCAD, HeeksCAD, ...
Oh, and with Blender. Livingstone and Shackleton had nothing on
this guy ;-)
More information about the discussion