Existing package for basic mesh manipulation?

Hi all,

Just a quick question: is there a package out there that I can use to perform basic mesh manipulations such as subdivide, extrude, etc.? I see Meshes.jl, which has some triangulation functions, but I don’t see much else related to mesh manipulation.

Thanks!
Oliver

What kind of manipulation you have in mind @OliverEvans96 ? I am actively working on Meshes.jl and it is getting into a really good shape. The goal is to provide a flexible api to manipulate all kinds of meshes.

Oh, cool! Subdivide and extrude are on the top of my mind.

Basically, I’m thinking of doing basic mesh edits similar to what I would do manually in Blender, just programmatically in Julia.

Check out FinEtools.jl. Or, MeshCore/MeshSteward. Both combinations would allow you to refine meshes by subdivision and extrude. PetrKryslUCSD (Petr Krysl) · GitHub

@OliverEvans96 these operations are certainly interesting to have. Stay tuned for upcoming features :slight_smile:

1 Like

These look great, thanks! In FinETools.jl, I see T3refine for subdivision and H8extrudeQ4 for extrusion. I haven’t found equivalent functions in MeshCore/MeshSteward yet.

More importantly, is there currently any way to convert between a GeometryBasics mesh and a FinETools/MeshCore mesh? Or read a FinETools/MeshCore mesh from an obj?

Thanks!
Oliver

There is a Q4refine and T4refine and T10refine and T4refine20. This is an FinEtools, I haven’t had time to test properly the refinement in MeshSteward, so that isn’t publicly available yet. Sorry.

So your inputs are .obj files? Triangular meshes then?

And how do you want to process them?

Basically, I intend to load a set of rectangles from a .obj file, then extrude, subdivide and triangulate each one to produce something like this

which I will then perfom some light/shading calculations on with environmental obstacles loaded from another .obj.

If you wish to generate a tetrahedral mesh for a block, you can use a built-in function in FinEtools.
Either crossed mesh, or all diagonal edges the same direction. If you are interested only in the surface, simply generate the tetrahedral mesh and extract the boundary.

Thanks. In my case, I’m just interested in the surface. So is there any way to convert between GeometryBasics and FinEtools?

Of course. One way, or both ways?

Both ways

If you give me a better idea of what it is you wish to accomplish, I can be more helpful.

The conversion needs to be programmed, it is not built-in. The data is stored in FinEtools in a flat array for the node coordinates, and in a vector of tuples for the connectivities, but can be retrieved as a flat array.

Depending on what it is you wish to do, this double conversion may or may not be the way to go. For instance exports to format suitable for visualization are available. Import from a number of finite element format is available.

1 Like

I’m also interested in mesh manipulations, but in my case I need to add one or more points to a Delaunay mesh, and reconnect the vertices so that it stays a Delaunay mesh… Does Meshes.jl (or other package) have this kind of Delaunay mesh refinement?

1 Like

Thanks! It sounds like it should be easy for me to write the conversion functions given the coordinate array. I’m not using finite element methods, and I’ve been visualizing with Makie thus far. I’m just importing from .obj, manipulating the mesh, and running some other Julia code to analyze the light/shading. Thanks for your help!

No prob. Let me know if you get stuck.