Skip to content
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 Custom 3D Mesh? #15

Open
enzyme69 opened this issue Mar 2, 2021 · 8 comments
Open

SDF Custom 3D Mesh? #15

enzyme69 opened this issue Mar 2, 2021 · 8 comments

Comments

@enzyme69
Copy link

enzyme69 commented Mar 2, 2021

Is there a plan to add ability to import 3D mesh as custom starting volume for SDF?

@thegnarwhals
Copy link

You might find this handy: https://github.com/marian42/mesh_to_sdf
Once you have your sdf as a numpy array you can create a lookup function and decorate it with sdf.sdf3

@tjusxh
Copy link

tjusxh commented Nov 15, 2021

@thegnarwhals I have a complicated numpy array sdf from mesh_to_sdf. How to translate to sdf.sdf3?

@thegnarwhals
Copy link

@tjusxh hi, you will need to create a function that takes in the coordinates and returns the SDF value, and then decorate it with @sdf.sdf3. I’m on my phone right now but let me know if you’re still having trouble tomorrow and I can try point you to some examples when I’m back at my desk. If you look through the source code you should be able to find some examples, for example the sphere.

@thegnarwhals
Copy link

thegnarwhals commented Nov 15, 2021

@tjusxh you may need to implement some tri-linear interpolation in your function.

@emilche
Copy link

emilche commented Jun 21, 2022

I am quite stuck on this one as well.
Do you have any pointers in how you would interpolate the outcome. cause it just complains on me that my size of the sdf from the mesh is to big compared to the one that is already there.

@VladStojDev
Copy link

Hi,

Could you please provide a minimal working example how to load a SDF that is generated from a mesh using the mesh_to_sdf library? I am currently trying to do this, but I don't know how to parse the generated numpy array with SDF values and create a new SDF3 object that I can further manipulate.

Any help would be much appreciated!

@rawwerks
Copy link

(this repo is so cool!)

+1 for an example of loading a mesh.

the closest i found is this repo, which can use SDF on a STL mesh to create a "TPMS scaffold" => https://github.com/nodtem66/Scaffolder

@rawwerks
Copy link

rawwerks commented Dec 21, 2023

@enzyme69 - i also found these, some are new since your question. sharing the references now because i probably won't have time to try any of these until after the holidays:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants