Hacker News new | past | comments | ask | show | jobs | submit | guso78's comments login

This is not true anymore with PythonSCAD. There is a mesh() function which can yield the points and triangles from any Object. The User is free to modify these points and faces and finally create a new solid from it "polyhedron" You could use this to skew your model in a fancy way by altering the point coordinates but it might be more difficult to alter on the triangles.


By "faces" I don't mean triangles. I mean the true geometry of the object.

Say for example a single six-sided die: six faces, twelve edges.

But this would be twelve mesh triangles, right? None of which individually represent a face -- and six of the mesh edges are not edges in the true geometry.

A rounded six-sided die might have 26 faces (including the curved edges, rounded corners). 48 edges between them. etc. But the number of mesh triangles and edges will vary according to the precision.

bRep kernels can give you the geometry information, not just the mesh information.

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


Triangles quite low level internal data. mesh could output also 4 point polygons on occasion. of course we can add an parameter to mesh to let pythonscad combine the faces as mush as possible(sub-faces are coplanar) and you would actually get 6 squares for a dice), even polygon would accept faces with n points as input.

however, openscad does not have an internal B-REP kernel and you would have to rewrite the program to change that.


What if I tend to import STLs from thing verse and modify them?

IIRC STLs are triangular meshes. Would bRep programs like build123d able to "convert" them to "true geometric objects"?

I would presume the answer is no.


Conversely, what if I want to import STEP files and modify them?

You can make an almost perfect analogy with raster and vector image formats. They both have their niches; however: it's trivial to rasterize a vector drawing, but it's a ton of work to vectorize an raster image well.

So, all things being equal, it makes sense to start your designs at the 'high ground'.


> Conversely, what if I want to import STEP files and modify them?

Right. OpenSCAD can import and mesh STEP files. But the process throws away the true geometry.

I agree that the raster/vector analogy is strong!


bRep apps can handle and work with meshes (though it's probably not the most efficient way to work with them) but no, generally speaking extracting the real geometry requires redrawing them. You can get a long way by decimating meshes and using various tools but you're going to end up breaking the result down and partly redrawing.

Plasticity (the sorta-CAD-sorta-modeller app) has seemingly just added some logic to the recent version to help with extracting the true geometry from meshes. I want to like Plasticity but it's not enough CAD for me right now.


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: