News for hackers. Stuff that matters.
Re:CadQuery is an open-source Python library for building 3D... by gcr on Thursday April 16, 2026 @11:30PM (#47802210)
OpenSCAD is all triangles and vertices. Fillets are difficult to do. Outputting circles/spheres generally requires you to for-loop over vertices a lot.

Libraries like build123d and cadquery use OpenCASCADE, a boundary representation kernel. You think in terms of the enclosed solid and perform operations - boolean add/subtract, fillet/chamfer, stamp text, etc - that return a new solid.

Re:CadQuery is an open-source Python library for building 3D... by 7bees on Friday April 17, 2026 @01:38AM (#47802743)
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...

Re:CadQuery is an open-source Python library for building 3D... by seltzered_ on Friday April 17, 2026 @02:22AM (#47802984)
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.

Re:CadQuery is an open-source Python library for building 3D... by Doxin on Friday April 17, 2026 @02:27AM (#47803006)
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.

Re:CadQuery is an open-source Python library for building 3D... by flowerbreeze on Friday April 17, 2026 @04:13AM (#47803618)
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?
Re:CadQuery is an open-source Python library for building 3D... by Doxin on Friday April 17, 2026 @04:57AM (#47803877)
yes, exactly.
Re:CadQuery is an open-source Python library for building 3D... by Karliss on Friday April 17, 2026 @07:11AM (#47804622)
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.
Re:CadQuery is an open-source Python library for building 3D... by rowanG077 on Friday April 17, 2026 @03:41PM (#47809757)
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.

Re:CadQuery is an open-source Python library for building 3D... by ur-whale on Friday April 17, 2026 @11:45AM (#47807184)
> 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.
Re:CadQuery is an open-source Python library for building 3D... by somat on Friday April 17, 2026 @06:54AM (#47804538)
While true your argument is weak, for example in pov-ray the shapes are pure exact mathematical concepts. But nobody is saying how great this is for 3d printing or general cad work because it's not. The real key benefit from these programs is the interchange format they can generate, something you can feed to a machine, this prevents it from ending up like pov-ray, a terminal process only fit for generating pictures. Fillets are difficult to do in openscsd because fillets are difficult to do in general. What your argument probably should have been is that if openscad had chosen a geometry kernel where fillets were already solved it could then do fillets. Which is the sort of obvious tautology that helps no one.

Now I am off to see if anyone has ever built an export plugin for pov-sdl, either a 3d rasterizer(g-code slicer) for 3d printing, or a boundary layer mesh generator for import into another program. language wise it is probably equivalent to or better than the openscad sdl,

One subtle advantage to using python as the sdl is that it gets access to the vast corpus of python modules out there. Most of which are probably useless. but one thing I want to try is to see if I can use sympy to define a more declarative style of constraint.

Re:CadQuery is an open-source Python library for building 3D... by Cargo4286 on Friday April 17, 2026 @07:42AM (#47804844)
Not perfectly relevant but build123d docs have an example using sympy as part of a solving constraints for a design. https://build123d.readthedocs.io/en/latest/tttt.html#t-24-cu...