> You can even load an existing 3D mesh and operate on it as an SDF. Great for hollowing, chopping, eroding/dilating, etc. existing models.
This has my instant interest. Multiple times I have wanted to take an existing .STL file and cut a hole on it or add another object to it and have never had success.
I've tried things like Meshlab, but while the interface has what appears to be a hundred different functions, attempting to use anything returns some error code that requires a PhD to understand and none of the "repair" functions seem to help.
I mean seriously: Mesh inputs must induce a piecewise constant winding number field.
How the hell am I supposed to accomplish that on a STL file?
People should share the original files or at least step files along with the stl files. But if you must work with stl, Fusion works brilliantly for this. You can open the stl file, which gives you the usual mesh that's hard to work with. You then convert that mesh to a solid object, on which you can use "direct modeling". It's not the same as a parametric object, but the editing features are quite powerful and sort of mindblowing. [1]
If you have the paid version of Fusion, you can run "feature detection" to turn things like holes, fillets, extrusions etc. into dedicated features which are even easier to edit. [2]
[1] https://www.autodesk.com/learn/ondemand/curated/direct-model...
[2] https://www.autodesk.com/learn/ondemand/curated/direct-model...
If it's a one-time thing, Prusa Slicer (and some other slicers too, probably) allow adding and subtracting simple shapes. So if, for example, you need to add a hole for a screw, you can do it directly in the slicer without messing with (and breaking the mesh of) an STL.
That feature requires getting pyopenvdb installed, which can be a headache, and I never really updated the README with examples, but it does work. There is one example script:
https://github.com/fogleman/sdf/blob/main/examples/mesh.py
You basically just say:
f = Mesh.from_file(path).sdf(voxel_size=0.25, half_width=1)
Then you can operate on `f`.
Blender also has a high learning curve but you typically don't need a PhD to understand the errors (instead you just watch youtube videos and copy what they do).
Removing faces from an STL and adding other objects is quite straightforward. Previously, Autodesk had Meshmixer and 123D, I guess Meshmixer is still available: https://meshmixer.org/ and I found it to be great for quick editing of the type you're describing.
OpenSCAD can load STLs and cut holes in them.
Tinkercad is a very low-barrier-to-entry option here
You can do that effortlessly right in openscad itself or in freecad for a more visual way, or in every single cad app in existence I think.
In freecad you first just open the stl file, then Part -> Create part from mesh, then you have a solid you can modify.