Skip to content

Comment on SolveSpace – Parametric 2D/3D CAD

Comments

I have a big conceptual problem with these interactive editors: I'm a programmer and am very used to splitting things into functions and objects which can be then called with / have different parameters and be composed into another functions and objects.

So far my experience with both SolveSpace and FreeCAD have been: Even if you can reuse a part of your design multiple times (and even this is a nontrivial problem), you surely can't do that with different parameters!

My brain hurts from how it goes against all programming principles about DNRY, modularity, and composability.

Have you played around with OpenSCAD? That comes from the programmatic direction.

As a novice it does seem to me that there's room for an open source CAD tool that offers a bridge between the two approaches. For what it's worth my opinions on a few tools:

• SolveSpace - solid, but a bit limited in its capabilities (e.g. no fillets or chamfers)

• FreeCAD - very powerful but almost unusably buggy (others seem to have had better experiences)

• OpenSCAD - very powerful but requires coding for everything

Then there are various non-3D cad tools and a few online ones (of which I've got the most use out of TinkerCAD which is easy to use because it is very limited in its capabilities)

OpenSCAD is just a generator.

You cannot query generated or imported geometry in any way. Not even calculate bounding box which can come handy if you want to place something on top of your model etc..

Equally big problem is schizma between modules and functions. Functions can't draw anything but can return values. Modules can draw but can't return anything. So you cannot even calculate the bounding box (or anything similar) yourself even without STL import.

CadQuery on the other can do queries.. give me bounding box. give me a second face parallel with XY from this point in direction of +Z.

Btw. FreeCAD bugginess realy varies. I have had a much better experience with a package built from master on Gentoo and Nix than with the stable appimage.

OpenSCAD lacks a constraint solver so cannot, IMO, be called "very powerful".

It is great if your design consists of boolean operations of several independent components. But many designs require complex interdependent relationships between the component geometries. Your OpenSCAD file will begin to contain a lot of trigonometry, projections, linear solves, etc. Eventually you will need a nonlinear solver...

I really enjoyed writing OpenSCAD code when it was suitable, though. Now I want to learn if there are any code-based constraint-based CAD packages.

How does blender not meet these needs?

Blender is very very good for animation and 3d graphics. But it is not designed well for engineering and cad. It certainly can be used but many of the tooling is not designed for 3d printed parts for example.

My brain hurts from how it goes against all programming principles about DNRY, modularity, and composability.

This is really interesting point, and I understand how you feel like that, however I completely disagree.

I have both a software/programming and industrial/product design background with extensive experience of professional CAD tools such as SolidWorks and Creo(Pro/E).

Parametric CAD, in my view, is a perfect example of "visual programming", you have variables, iteration/patterning reducing repetition, composability of objects/sketches again reducing repetition, modularity of design though a hierarchy of assemblies. The alignment between programming principles and CAD modelling principles, while not immediately obvious, are very much there. An elegantly designed CAD model is just as beautiful (in its construction) as elegantly written code.

Also just as in software where there are "methodologies" and techniques such as TDD, with cad there are methodologies to constructing a model, such as "top down", "bottom up" and "skeleton modelling". All about ensuring your design intent is captured, the models are maintainable and will update successfully with parametric changes.

When modelling with parametric CAD you are not only designing the object, you are designing a cad model that represents the design intent in an elegant and maintainable way.

So far my experience with both SolveSpace and FreeCAD have been: Even if you can reuse a part of your design multiple times (and even this is a nontrivial problem), you surely can't do that with different parameters!

True SolveSpace and FreeCAD can't do this, however all professional CAD packages can and it's an important feature of them. In SolidWorks they are called "configurations" and can be driven by an excel spreadsheet, you can literally create thousands of variations from a single model.

> I have both a software/programming and industrial/product design background with extensive experience of professional CAD tools such as SolidWorks and Creo(Pro/E).

We can use more people with both backgrounds to work on Solvespace ;-)

There are ways to do this in FreeCAD. Including spreadsheets.

Look at OnShape. Freemium option available! You can make models that are parameter driven and then import those models elsewhere and use different parameters. It is fully DRY if you learn how to use it properly. There is even a JavaScript like language called feature script that allows you to design your own feature tree nodes parameterized and validated as you like with custom UI and custom geometry driven by the parameters. Amazing system. For kicks I wrote a surfboard design tool that generates a skeleton frame for hollow wood veneer surfboards. It was just an excercise in "can I do it" but it turned out well.

CadQuery is very nice except for its DevOps side. Its whole build system for producing Conda packages (some may consider Conda problem in itself) is super-dependent on Azure pipelines. Even bigger problem is that it's riddled with hardcoded paths, redundant copies of files, disregarding recommended usage notes of its 3rd party libraries.. basically it contains every DevOps related anti-pattern you can think of.

There seems to be just one maintainer dealing with build related things and he is of a very different opinion what is anti-pattern or just don't want absolutely anybody to touch his code into which he poured his hours.

https://github.com/CadQuery/OCP/pull/61 https://github.com/CadQuery/pywrap/pull/38

Yeah. I'm salty about it.

Yeah. I'm salty about it.

You're not the only one. CadQuery will never catch on until they sever conda with a chainsaw.

CadQuery is damn near impossible to install without ruining your system (drags in the whole ffing conda ecosystem).

Just not an option for most folks.

> Even if you can reuse a part of your design multiple times (and even this is a nontrivial problem), you surely can't do that with different parameters!

This is on the radar for Solvespace but it's going to be fairly major rework to get it right. I'm still learning how all the pieces of the code fit together. The group structure in Solvespace is kinda crap - groups are "solver groups" meaning each group is costraint-solved independently with parameters in other groups held constant. Named parameters will help and there is a branch, but we need to work out scoping rules and some other stuff.

What I'd really like is the ability to make assemblies with multiple parts linked in the same group. And ultimately to have free parameters in those linked parts, but that's really challenging. Expert coders welcome to have a look.

Would be interesting if something like OpenSCAD had an interactive editor that allowed for exporting to an openscad code module.

OpenSCAD is great, but sometimes I just want to fidget around with an object like in this SolveSpace demo video.

I find using spreadsheet functionality and referencing those values works pretty well. you might use something like assembly4 plugin as well.

It's not about reusing values. It's about reusing whole complex designs. I know that there is some very very new feature called Variant link but I haven't managed to comprehend it yet.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.