If you like to code, OpenSCAD is really the best for simple shapes and my go-to tool for these situations, stuff like making a project box for an electronic contraption.
OpenSCAD however fails spectacularly for any kind of complex filetting situation when compared to tools like Fusion or even FreeCAD (FreeCAD's UI is an abomination though).
The morphological ops in OpenSCAD (minkowski type stuff) are a very poor substitute to real fillets, and are extremely slow (underlying algos are all polynomials in number of triangles) when your objects get complex, and they are global operations, it is extremely hard to limit their action to a localized part of your object.
Even Blender, which was truly never designed for this type of operations can sometimes do better than OpenSCAD for fillets.
Another thing that's a real pain in OpenSCAD: you cannot "probe" (measure) your existing object at a certain stage, grab the result of that measurement and re-use it in the rest of the code. MAJOR limitation.
>OpenSCAD however fails spectacularly for any kind of complex filetting situation when compared to tools like Fusion or even FreeCAD (FreeCAD's UI is an abomination though).
build123d[1] is based on the same kernel as FreeCAD and has full support for complex filleting situations. Furthermore it also has first class support for 1D and 2D primitives which enable a more flexible design approach.
> The morphological ops in OpenSCAD (minkowski type stuff) are a very poor substitute to real fillets, and are extremely slow (underlying algos are all polynomials in number of triangles) when your objects get complex, and they are global operations, it is extremely hard to limit their action to a localized part of your object.
Agreed.
> Another thing that's a real pain in OpenSCAD: you cannot "probe" (measure) your existing object at a certain stage, grab the result of that measurement and re-use it in the rest of the code. MAJOR limitation.
This is another area where build123d excels. You can create a line and query its length. You can create a face and query its area, position, size, bounding box, etc. You can select parts of a solid and perform operations on them (like a chamfer/fillet, or use them as a reference for positioning). You can query the geometric type of any topological entity; e.g. is this curve linear, a circular arc, elliptical, or a spline?
build123d is IMHO easily one of the most powerful CAD packages that are not well known by a wide audience (owing in part to its ~3 year history). OpenSCAD is a fantastic tool; it was my introduction to CodeCAD and I used it for years. Therefore, my objection isn't to OpenSCAD itself, but to the limitations inherent in any single tool -- and in this case, those limitations are quite significant.
I've long imagined something comparable in use to OpenSCAD, but where the primitives are tool-paths rather than shapes; you specify the cuts (or prints) the machine will make, and get a render of how the material will look afterwards.
This would, of course, be a great hassle to use, but I think I'd really enjoy being able to eg preview the texture different tool heads / cut patterns would leave. I imagine thinking in terms of "how the machine will cut this" would also improve my ability to reason about the machine.
Sounds like you just want to write GCode? There are some helpers to make it a little less tedious, like FullControllGcode. Gcode, especially for printers, is really 2 commands, G0 and G1, so writing your own helper is also pretty easy.
There is a lot more to it than that. For instance, for overhangs and bridges you need fairly fine control of the fan in relationship to the movement of the extruder head. You'll need to do circular interpolation in such a way that the toolhead does not slow down too much or you'll get really crappy corners and seams and other joints can be really hard to do properly if you are just using naive point-to-point moves rather than lots of little tweaks to get partial overlap between the two adjacent paths. And then there is control of the extruder retraction and pressure advance, which are pretty complex and difficult to get right for even a subset of the most common use cases, especially if you want to have a range of speed options. "pretty easy" does not match my experience so far, but then again, I am only using this when the regular slicer can't cope so there is a chance that the problem is me.
I want to _generate_ gcode (using a high-level language), then run it through a simulator which can show me what the results will look like (for a given tool head).
I never understood why this is such a deal breaker. I just export The stl from Openscad then do fillets in Fusion. It's another step but usually only a few mins of clicking.
Let me translate this to software engineering: "I never understood why people have such a problem with Windoze".
The answer to your question in the context of CAD modeling:
Fusion is closed-source.
Their model files are closed-source (specs aren't public)
AutoDesk is one of the worst company in the world when it comes to inter-operability, and this by design. It's just in the DNA of that company.
Their customers is their enemy, they know it full well, but they don't care because the walls of the prison are made of steel and one meter thick.
Your object construction pipeline is guaranteed to become obsolete at some point in the future.
Good luck grabbing an object you built 10 years ago and doing some light editing on it.
Good luck grabbing a parametric design and exporting it to something else, either another CAD package or something to do visualization and do further work on the model in there.
Fusion is a real nice tool. First taste is free. Then you're on the AutoDesk hook for ever.
You may not care about these things, especially in a commercial setup.
> OpenSCAD however fails spectacularly for any kind of complex filetting situation when compared to tools like Fusion or even FreeCAD (FreeCAD's UI is an abomination though).
I've never had a problem with this, but I build up from the ground with the edges the way I want them to be. The reason many people struggle with this is that they start from 'hard' primitives such as cubes and triangles and then they want to process the edges once the rough shape is there. That's all but impossible. But you don't have to do it that way at all.
> The morphological ops in OpenSCAD (minkowski type stuff) are a very poor substitute to real fillets, and are extremely slow (underlying algos are all polynomials in number of triangles) when your objects get complex, and they are global operations, it is extremely hard to limit their action to a localized part of your object.
That's because they're used as 'after the fact' tools. It's a bit like trying to change the shape of a folded piece of metal after the fact. It's much easier to shape it right the first time than to 'fix' it later on.
When I start working on a shape like that I use a truncated cube rotated 45/45/0, place copies of that cube on the vertices of the shape I want and then cover the whole thing with a hull. Instant chamfer. If I want to use fillets I'll use a sphere. That's much easier than to first create an arrangement of cubes and other primitives and then to decide where I want the fillets to go. Picking those initial shapes for the corners is the tricky part, after that it is very quick to make (and change) objects. I've done some pretty complex shapes like this, fully parametric that would have cost me days with a traditional workflow.
> Another thing that's a real pain in OpenSCAD: you cannot "probe" (measure) your existing object at a certain stage, grab the result of that measurement and re-use it in the rest of the code. MAJOR limitation.
Yes, agreed, this kind of second order primitive is not possible. I understand the reason for it (and the reason why you can't change variables on the fly) and it is a serious drawback. This makes it very hard to relate two non-trivial shapes to each other. Interactive CAD programs are better for things like that, but there - usually - the kind of change that takes a second in OpenSCAD means a whole pile of manual work. So my recipe is to stick to OpenSCAD for those things that I think I can make with it and to use an interactive tool for everything else.
One thing that OpenSCAD excels at is remixing stuff based on existing STLs, I've yet to find another tool that allows me to do that so easily and with such versatility. Before my 'serious' cad tools have imported a mesh the OpenSCAD workflow is already printing the remixed result. As with everything: the right tool for the job is the key.
> When I start working on a shape like that ... [goes on to explain CAD methodology]
Your way of building objects require a ton of very hard thinking.
Most folks I know doing CSG modeling don't think (or often: can't) this way.
The typical way folks model with CSG is the age-old "roughing-out then refine" technique, building a rough idea of the object with cubes spheres and cylinder in a CSG tree, and then adding details iteratively. A bit like folks who draw cartoons operate: start with drawing potatoes and then add the details.
In this approach fillets come in at the last step, when the object is "complete" and hard edges simply need to be softened.
Most people are incapable (I certainly know I am) of designing fillets in from the onset, especially if the object is going to be complex.
I don't dislike OpenSCAD, quite the contrary, it's just that all of the things I built with it always ended up with a fillet related headache.
OpenSCAD however fails spectacularly for any kind of complex filetting situation when compared to tools like Fusion or even FreeCAD (FreeCAD's UI is an abomination though).
The morphological ops in OpenSCAD (minkowski type stuff) are a very poor substitute to real fillets, and are extremely slow (underlying algos are all polynomials in number of triangles) when your objects get complex, and they are global operations, it is extremely hard to limit their action to a localized part of your object.
Even Blender, which was truly never designed for this type of operations can sometimes do better than OpenSCAD for fillets.
Another thing that's a real pain in OpenSCAD: you cannot "probe" (measure) your existing object at a certain stage, grab the result of that measurement and re-use it in the rest of the code. MAJOR limitation.