Closed Megidd closed 2 years ago
The function you are looking for is sdf.Offset3D() You can see an example of it's use in ./examples/offset_box. Note that the "hollowing out" operation just occurs on the SDF. It has nothing to do with the source being an STL.
Pseudo code is something like:
s0 := ImportSTL("file.stl) s1 = Offset3D(s0, thickness) s2 := Difference3D(s0, s1) Render(s2)
Thanks @deadsy I'm going to try it. Probably I'll be back with some questions :slightly_smiling_face:
PR #54 introduces an example to carve out the inside of the input STL surface mesh. The corresponding comments of PR #54 should be noted.
So, steps 1 and 2 of this algorithm can be done by this package:
Steps 3 and 4 are trivial.
Background
There is a Go source code already available. The source code imports 3D STL surface meshes and stores the
index
andvertex
buffers corresponding to the 3D STL surface mesh.It's desired to hollow out the imported 3D STL surface meshes by a thickness. To do so, this algorithm might be possible:
Question
It's noticed that this package may contain the necessary code for steps 1 and 2 above. Is it right? Is it possible to hollow out 3D STL surface meshes by this package? Can anyone provide a boilerplate code to do so?