Hacker News new | ask | show | jobs
by 7bees 63 days ago
I'm not sure I understand your comment; OpenSCAD has functions like sphere(), cylinder(), etc. Most OpenSCAD models I have seen are built up primarily from solid primitives combined using boolean operations, just as you describe for the other tools.

https://en.wikibooks.org/w/index.php?title=OpenSCAD_User_Man...

3 comments

OpenSCAD works natively with triangle meshes. sphere() will create a spherical triangle mesh.

These libraries on the other hand can natively represent a sphere for instance. This means that during CAD-ing you don't need to worry about resolution, that's a consideration for export only.

Do you mean that OpenScad performs boolean/other operations on triangle meshes, but these libraries don't until output? So they might instead use curved surfaces/edges etc as outputs for operations and only convert to triangles for output or export at the very end?
It isn't even necessary to create triangle meshes during export. You can export as step files. It is a commonly used brep based file format supported by almost any "proper" CAD software. Triangle mesh based modelers can't easily export good step files because they don't operate at that level of abstraction.
In professional CAD systems, geometry is not stored as triangle meshes but as mathematically defined surfaces (such as parametric and NURBS surfaces). Triangle meshes are only generated as approximations for rendering. This is analogous to vector graphics (SVG/EPS) versus raster images (PNG/JPG).

Any serious manufacturing will work require a STEP (or something equivalent) which stores these parametric surfaces rather than a mesh.

yes, exactly.
Theres a better description of the differences here: https://build123d.readthedocs.io/en/latest/OpenSCAD.html#tra...

Some of the differences may be in when you are trying to reference a face/edge to build off of, not just about the primitive function being used.

> I'm not sure I understand your comment

Try to do the following with OpenSCAD:

    1. put a sphere and a torus somewhat close to each other
    2. find the shortest segment between the two surfaces
    3. place an infinite cylinder whose axis is aligned with the segment you just found
    4. fillet the cylinder with both the torus and the sphere along its intersection curve with each surface
This is very, very hard to do with OpenSCAD.