-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
SDF support via libfive #4586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDF support via libfive #4586
Conversation
So uh, it segfaults. Gonna need some help on that one. I think the source may be the fact Parameters is being freed? |
Here's a test you can use:
Yeah, we should change the parameters around, so that the sdf comes last. |
I wonder if you are interested in trying the sdf function of manifold, which is already included in experimental features. It would also be interesting to compare the performance of manifold and libfive (we do not use eigen so it may be slower). |
Chun Kit,
libfive SDF is already included in my python fork
watch out my homepage for a demo
this is libfive side of SDF
https://guenther-sohler.net/openscad/pictures/collosseum.png
https://guenther-sohler.net/openscad/examples/collosseum.txt
lets also test Manifold SDF ...
…On Thu, Sep 21, 2023 at 8:43 AM Chun Kit LAM ***@***.***> wrote:
I wonder if you are interested in trying the sdf function of manifold,
which is already included in experimental features. It would also be
interesting to compare the performance of manifold and libfive (we do not
use eigen so it may be slower).
—
Reply to this email directly, view it on GitHub
<#4586 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCO4MSEBQIOYWHTYXQVII3X3POZZANCNFSM6AAAAAAWP7Z4OA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
OK thanks for the pointer. We currently don't have that many builtin functions for sdf in manifold, so porting the example to manifold will likely take a bit of time. Also, I originally thought that libfive does JIT, but it seems that they don't have this function (but should not be too hard to implement I guess, considering they are all numerical operations). Manifold currently has this nice SDF example: https://github.com/elalish/manifold/blob/master/samples/src/gyroid_module.cpp |
(the sdf example is available on manifoldcad.org as well) |
Hi, is this already available for use in OpenScad, or are you just saying it's doable because manifold supports it ubnder the hood ? |
Doable because manifold supports it under the hood. It is not yet supported by OpenSCAD for now. The Python PR by @gsohler provides libfive integration, but it is only exposed for python. |
From what we discussed in the IRC channels months ago, it seems manifold is quite slow compared to libfive. At the same time, it's not a good idea to duplicate functionality. So I'm not sure what should be done. The only reason I've abandoned this is because the lack of (understandable) motivation from others :) Feel free to pick up everything. |
Indeed, manifold is slower for more complicated cases (at least for now) as the SDF code is very simple. But we guarantee manifoldness and we have plans to make it faster. More users can help us improve better. |
All I can wish you is good luck 🙂 I did this for OpenSCAD out of the motivation to hopefully pull more people into code CAD, but extending the problem space OpenSCAD can solve. Given I've spent enough time on the proof of concept, all I can do is hope someone else (maybe you!) to continue. I'm working on my own code CAD system where SDFs are first class. OpenSCAD has been a deadend for me for many years now tool-wise. I still recommend OpenSCAD to those starting out regardless since the community is extremely nice and there's lots of resources :) |
The treading model of libfive makes it a bit difficult to call back into OpenSCAD expression evaluation. Depending on the API Manifold uses, it could be easier to integrate. |
the time is near for a new era of code cad