Hacker News new | ask | show | jobs
by s1mon 650 days ago
I've been using parametric CAD (Pro/E / Creo, Solidworks, and Onshape) for 30+ years. Automatically adding sketch constraints is nothing new. Just about any 2D sketching tool out there will have some sort of snapping and/or auto-constraint-adding system. What's often more frustrating is fixing things when they get accidentally over-constrained. Solidworks tries to help with this in the form of cycling through what it thinks are the most likely constraints to remove and then re-solving the sketch. It's OK, but that sort of tool could be better.

A number of popular CAD systems use the D-Cubed 2D sketch constraint solver [0]. Siemens owns this and the Parasolid kernel, along with NX. All have been in constant development since the 80's. I really question what major new problems a startup is going to fix in 2D sketching constraints. I'm sure there a bunch of small quality of life things which may be out there, but most of the hard issues are more 3D or spline related, not finding things which could be tangent or equal.

Probably the biggest paradigm shift with constraints that still hasn't really taken off is what Siemens is doing with SolidEdge. It allows for defining the 3D equivalent of constraints between surfaces, holes, edges, etc. and then using direct modeling techniques to modify solids. Perhaps adding more intelligence to that approach would make direct modeling more popular.

Onshape has innovated in the way that it's brought Google Docs-like collaboration and GITHub like versioning, branching and merging to parametric CAD. Nothing else has these capabilities at the moment. To me that has been one of the most innovative changes in the mechanical CAD industry.

Onshape also has FeatureScript, which is the programming language which describes all the parametric features. Right now, none of the LLMs know FeatureScript well enough to be the least bit useful. They hallucinate wildly. I'd be very happy to have a Copilot for FeatureScript.

[0] https://plm.sw.siemens.com/en-US/plm-components/d-cubed/

4 comments

> I've been using parametric CAD (Pro/E / Creo, Solidworks, and Onshape) for 30+ years.

True - I implemented the first Solidworks Autodimension sketch as a contractor around 2002 based upon earlier work that I'd done for a consultancy client at D-Cubed in the late 1990s. I'm sure it could be improved with AI and a large data set of sketches though.

> Solidworks tries to help with this in the form of cycling through what it thinks are the most likely constraints to remove and then re-solving the sketch. It's OK, but that sort of tool could be better.

I agree it could be better. The behavior with under-constrained sketches depends on D-Cubed's DCM, and I seem to recall they were rather floppy. It seems kind of ridiculous to make users jump through the hoops of making sketches fully constrained once they've added the constraints they care about.

I am not an expert but surely an under constrained sketch is not a completed sketch.

Does "fully constrained" mean the simplest set of constraints that yields a shape (volume/hypervolume)? Or something rather more complicated? A simple yes or no, with a pointer to a paper will do!

To add to delhanty's reply, a "degree of freedom" can be thought of as a dimension of the drawing that can be changed or "stretched" or moved without violating a constraint (this is slightly inaccurate, but it's a good start). In a CAD program, a fully constrained drawing can't be freely stretched or dragged around; the program won't let you and the drawing will feel "rigid".

It's very intuitive if you play around with a CAD program for a bit. There is a free (GPLv3) 2D and 3D CAD program called Solvespace (https://solvespace.com/) that is probably easiest one to obtain and learn. There are detailed tutorials on the website, and you could probably download it and finish the first tutorial in an hour.

In addition to Solvespace there is the nascent (but surprisingly polished):

https://dune3d.org/

the Github page of which has the following footnote:

>I ended up directly using solvespace's solver instead of the suggested wrapper code since it didn't expose all of the features I needed. I also had to patch the solver to make it sufficiently fast for the kinds of equations I was generating by symbolically solving equations where applicable. ↩

Which really impressed me because it was the first graphical and interactive 3D program I tried which felt sort of comfortable and understandable (which is why I mostly use OpenSCAD and similar programmatic approaches).

In Fusion 360, you can drag underconstrained parts of the sketch around with the mouse. So the “degree of freedom” is still specified, but by accidental placement of how you drew the sketch. Fully-constrained sketches show a black outline and can’t be changed without explicitly editing a constraint or dimension.

For a quick example, see slide 10 in https://docs.google.com/presentation/d/1TiVoKF7mLlF360Oxy8hN... This is just a quick doc I made to show a friend how to use Fusion 360.

"fully constrained" means that there are no degrees of freedom left so that there are only a finite number of valid solutions, which are then consequently disconnected in the space of possible solutions.

DCM then chooses one valid solution that it believes is "close" to initial supplied positions/directions/radii etc for the geometry.

i love onshape and the capabilities featurescript offers. I wish they had a hobbyist pricing that only provided minor QOL offerings like the ability to make some things private. As long as it remains free for public use though I am very happy using it.

I was wondering if AI might help with writing FeatureScript. I’ve only scratched the surface but have leaned heavily on what other people have written for documentation.

Your experience, I do not doubt. However, I believe you misrepresent what the authors are claiming. They do not claim that constraints are new, rather that setting all the constraints manually can be tedious, and tools that intelligently select sets of constraint options can be useful at the practical level.
Many of the existing tools will automatically add constraints as you go. Certainly the tangent, horizontal and vertical constraints can be done while sketching with a tiny amount of care. Some systems will look for other circles and try to set equal diameters. Most systems have shortcut keys which can be used to quickly set missing constraints - taking a similar number of clicks as the UI shown in the demo video. I hope there are cases where their tool is faster or smarter, but it wasn’t evident from the demo.
Agreed, sync modelling in Solid Edge and NX can be really powerful, especially when requirements change unexpectedly.