Comment by nynx
20 hours ago
Unfortunately, using a geometry kernel [1] that operates on triangle meshes means this is a no-go for serious CAD usage.
20 hours ago
Unfortunately, using a geometry kernel [1] that operates on triangle meshes means this is a no-go for serious CAD usage.
My whole CAD experience is with OpenSCAD, which apparently uses the same kernel; Honest question -- what is the alternative? I would assume the vast majority of 3D model processing relies on triangle meshes...
Meshes are an output, not a source, and not a good internal representation.
Meshes are only a lossy approximation of the actual geometry, and the errors accumulate as features reference off of earlier features.
A simple example is a line tangent to an arc. The line will only be the correct distance from the center of the arc at one point (one angle) per segment.
In openscad you don't notice the problem because since it's code and you have variables and programming ways of expressing relationships, you would usually not try to derive one thing from another by geometry, instead both things would reference a common ancestor variable. But that's a technical implimentation detail that works around the problem by just not doing a thing that doesn't work. The problem is still there that a valid geometry constraint would produce invalid results.
Breps. Nearly all commercial cad packages operate on boundary representations of objects.
Mesh is also a boundary representation. I think you meam NURBS.
1 reply →
I would start with CSG if you are new to these ideas:
https://en.wikipedia.org/wiki/Constructive_solid_geometry
SolveSpace is available in library form. It uses NURBS to represent surfaces, with triangles as a fallback.
https://solvespace.com/library.pl
Notably the library was used (at least for a while) in the development of Dune 3D:
https://dune3d.org/
but then the author used the source directly as noted in the Github 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.
OpenCASCADE?
https://dev.opencascade.org/
Notably wrapped by build123d into cad as a code package
pythonocc is a joy
https://github.com/tpaviot/pythonocc-core
libfive
I've built something very similar (also based on triangle meshes, but in TS), and while it wouldn't work for say 3D printing, my target is game object modeling. I guess people have specific use cases in mind when referring to "CAD".
In my mind, cad that you’re not going to manufacture is “modeling”. Not sure if that’s a common verbal distinction.
An example of common terms that disagrees with that somewhat, is "CAD/CAM" where the design component is clearly distinct from the manufacturing component.
I do agree that historically, software aimed at building 3d models for games/animations and other digital use was usually called modeling and not cad. I'm thinking of software like 3D Studio Max back in the 90s here.
https://en.wikipedia.org/wiki/CAD/CAM
I notice though that the Wikipedia article for CAD says: "This software is used to increase the productivity of the designer, improve the quality of design, improve communications through documentation, and to create a database for manufacturing."
https://en.wikipedia.org/wiki/Computer-aided_design
1 reply →
Not sure either but sharing the sentiment.