Remix.run Logo
bigfishrunning 19 hours ago

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...

Brian_K_White 17 hours ago | parent | next [-]

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.

nynx 18 hours ago | parent | prev | next [-]

Breps. Nearly all commercial cad packages operate on boundary representations of objects.

pca006132 10 hours ago | parent | next [-]

Mesh is also a boundary representation. I think you meam NURBS.

MITSardine 2 hours ago | parent [-]

It's just the name, BREP stands for Boundary REPresentation.

bob1029 18 hours ago | parent | prev [-]

I would start with CSG if you are new to these ideas:

https://en.wikipedia.org/wiki/Constructive_solid_geometry

avhon1 7 hours ago | parent | prev | next [-]

SolveSpace is available in library form. It uses NURBS to represent surfaces, with triangles as a fallback.

https://solvespace.com/library.pl

WillAdams 5 hours ago | parent [-]

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.

nicr_22 18 hours ago | parent | prev | next [-]

OpenCASCADE?

https://dev.opencascade.org/

jf___ 9 hours ago | parent | next [-]

pythonocc is a joy

https://github.com/tpaviot/pythonocc-core

zokier 18 hours ago | parent | prev [-]

Notably wrapped by build123d into cad as a code package

autumn-antlers 18 hours ago | parent | prev [-]

libfive