dima634 / baby_shark

Geometry processing library in pure rust
MIT License
64 stars 7 forks source link

surface mesh (+others) #38

Open ThomasCartier opened 2 months ago

ThomasCartier commented 2 months ago

Hi, do you think we can:

  1. Create a surface mesh type: when using a difference for example, the mesh would still be empty inside. Nice for 3d printing as well.
  2. Have a way to thicken the mesh, as in Blender
  3. Have a way to create mesh from points memory, via a simpler API?

It's really nice to see geometric processing crates in Rust. Nice work!

dima634 commented 2 months ago

Hey,

  1. I'm not sure I understand the question. PolygonSoup and CornerTable are surface meshes approximated with triangles. Do you want to create a hollow inside of a model?
  2. Depending on what you mean by "thicken", volume offset could be a solution. See examples/offset.rs.
  3. CornerTable and PolygonSoup can be created from the list of vertices and face indices using the from_vertices_and_indices method. Are you looking for something that would accept just a list of vertices? I would appreciate suggestions on how to make API more intuitive.