- #1
cave_cat
- 41
- 0
I have seen the following said on a forum:
This makes good sense to me. To me, as a programmer, this sounds like he is asking for a better API to look up the coordinate at runtime; perhaps that would force the engine to evaluate expressions in a particular order, but then that's what functional programming is all about. But, in reply people talked about "constraints solver" for this purpose, e.g.:suppose I've got a triangle-shaped part, and stick the flat side of it on a square part. What's the distance from the tip of triangle to the opposite flat side of the square? OpenSCAD knows, in some sense, because it drew it. But inside my OpenSCAD script, I don't, and I have to calculate the geometry in my code.
Can somebody give a simple, toy example based explanation of what this "constraint solver" is about and how it is better than using a better object oriented API to access info about rendered 3d components?This is usually done by a constraint solver. The most popular one in the industry is D-Cubed 3D DCM by Siemens.