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

Questions about STL files for simulation #147

Closed
zhulidong12138 opened this issue Jul 18, 2024 · 1 comment
Closed

Questions about STL files for simulation #147

zhulidong12138 opened this issue Jul 18, 2024 · 1 comment

Comments

@zhulidong12138
Copy link

zhulidong12138 commented Jul 18, 2024

Hello, I'm new to Julia and WaterLily. WaterLily is very good and perform excellent simulation!
I would like to use WaterLily to simulate some underwater bionic robots, but defining the model through SDF is too complicated. Is it possible to use 3D STL files exported from SolidWorks for the simulation? Or is there an easy way to transform complicated 3D STL files to signed distance function?
Thank you!

@weymouth
Copy link
Collaborator

"Too complicated"?! What's complicated about them!?!? https://youtu.be/8--5LwHRhjk?si=GGiQ8j3N0U3dUdtJ

I'm just kidding. We've got two options currently:

  1. First, there is https://github.com/WaterLily-jl/ParametricBodies.jl, which allows you to import any parametrically defined curve as a geometry. It's limited to curves, but they can live in a 3D space either as a space curve, a planar membrane, or a body of revolution.
  2. Second, there is a link with https://gismo.github.io/ which is a fully 3D NURBS modelling framework. @marinlauber should have some examples from his own work linking WaterLily to G+Smo available soon.

Neither of these are a typical STL reader. You could write a simple for loop yourself to check the SDF from each of a million triangles in an STL - but that simulation would be very slow. Instead, this is the sort of thing which should be handled by a meshing package like https://github.com/JuliaGeometry/Meshing.jl or https://github.com/juliageometry/descartes.jl or maybe something else @sjkelly has developed.

I decided to focus on the parametric geometries myself, but I'm super interested to see someone add fast STL measuring to WaterLily.

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

2 participants