In freecad you first just open the stl file, then Part -> Create part from mesh, then you have a solid you can modify.
intersection() { import("3DBenchy.stl"); sphere(30); }
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...
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`.
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.
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?