Closed xyzdcgan closed 5 years ago
editsdf isn't mesh modeling tool. but https://github.com/evanw/csg.js/ would be helpful
@disjukr How we can use that in sculptgl tool directly, means how to convert mesh to csg. as boolean operation can be performed in csg format.
need to implement that feature in sculptgl with csg.js
need to implement that feature in sculptgl with csg.js @disjukr Can you guide me for implementing that, or provide any demo for that. Any help would be great.
Thanks for your interest, but I'm not really active anymore on sculptgl, unless for bug fixes.
That being said I couldn't help myself to experiment a little bit with 2 (very) quick and dirty implementation:
Both branch are working but I probably won't polish it as it requires more work to really integrate it.
CSG branch I'm using https://github.com/evanw/csg.js/ for csg. Unsurprisingly, it's super slow, ~30s for 2 meshes of only 1k vertices. From what I can see the resulting topology can have T junction, so you can't sculpt anymore unless you post-process/clean the result (a voxel remesh could work but it'd kill the main advantage of CSG precision, fixing T-junction is probably a pain).
Voxel remesh grid sdf branch Similar to the current sculptgl remeshing functions (with same caveats, aka resampling/uniform topo but correct performance)
editsdf isn't mesh modeling tool.
True, it's just an experiment. However it's easy to produce a mesh from SDF tree (simply evaluate the sdf on a grid and then running marching cubes, like the voxel remesh). That's the whole UI/UX work that's hard... (and modeling with SDF is probably not a common paradigm)
Thank you so much @stephomi for your input i checked your both branch and got the result i wanted from remesh, as you said csg takes time about 20-30 seconds at 1k vertex and i tried that but it takes much time is there any thing to make that time less...??? And Thanks for your help it really made my work.
No easy solution for a robust boolean operation on polygonal mesh. It's certainly possible to get something faster but... I don't think we'll see a fast and robust (enough) implementation in javascript for this kind of problem. Maybe in the C++ realm you can find alternative... but probably a pain to turn into wasm and performance/robustness might be still an issue (CGAL?, https://github.com/gilbo/cork?)
http://www.meshmixer.com/ can do boolean operation and it's fast, looks like it's using a threshold to detect intersection (so it might not work well in every cases, but maybe good enough).
Yes @stephomi conversion is difficult and also not so sure that it will increase the speed of operation, surely will look into meshmixer for using threshold to increase speed of operation in csg. Thanks once again.
Hello, i want to perform boolean operation on stl/obj files can you help me on that. i saw editsdf which you created and in which boolean op are done, as there is no original source code how can i integrate and use/perform boolean op in sculptgl.