Solid geometries from 3D mesh.

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
josegegas
Posts: 241
Joined: Sat Feb 11, 2017 12:54 am
Location: New Zealand

Solid geometries from 3D mesh.

Post by josegegas »

Hello.
Here is a quick question. If I mesh a geometry using any of the meshing tools from Fem WB, and obtaining 3D elements, say thetraedral or anything; is there a way to convert each of these 3D elements into a solid CAD, keeping its position?

Thanks in avance.
User avatar
NewJoker
Veteran
Posts: 3014
Joined: Sun Oct 11, 2020 7:49 pm

Re: Solid geometries from 3D mesh.

Post by NewJoker »

This is typically done by converting the FEM mesh to surface mesh (FEM FemMesh2Mesh) and then turning it into a solid (Part ShapeFromMesh and Part MakeSolid).
Last edited by NewJoker on Wed May 31, 2023 6:48 pm, edited 1 time in total.
josegegas
Posts: 241
Joined: Sat Feb 11, 2017 12:54 am
Location: New Zealand

Re: Solid geometries from 3D mesh.

Post by josegegas »

I tried this but did not work. The thing is that, even though the FEM mesh I use has 3D elements, when I convert it into a mesh I only get the outside surfaces, and when I convert it into a solid, I get only one solid. What I need is a set of solids, one for each 3D element of the FEM mesh...
User avatar
NewJoker
Veteran
Posts: 3014
Joined: Sun Oct 11, 2020 7:49 pm

Re: Solid geometries from 3D mesh.

Post by NewJoker »

I don’t think it’s possible in FreeCAD. Normally, it’s sufficient to obtain a surface geometry from finite element mesh and convert it to solid (the aforementioned procedure). Why do you need all solid elements to be converted to CAD geometry ?
josegegas
Posts: 241
Joined: Sat Feb 11, 2017 12:54 am
Location: New Zealand

Re: Solid geometries from 3D mesh.

Post by josegegas »

NewJoker wrote: Wed May 31, 2023 8:44 pm I don’t think it’s possible in FreeCAD. Normally, it’s sufficient to obtain a surface geometry from finite element mesh and convert it to solid (the aforementioned procedure). Why do you need all solid elements to be converted to CAD geometry ?
I need all the elements to be converted, each into a separate solid, so I can use them as rigid bodies to model a flexible body using beam elements from MBDyn solver. Beam elements could be used this way to model more complex flexible bodies. The idea is the next. Once each 3D element from the mesh has been converted into a solid CAD geometry, I can assign a material and obtain the volume, mass and inertia of each body, and assign a node to each. Then connect adjacenct nodes through beam elements and provide addequate constitutive propeties. The whole body will then defform under applied forces, and the beam elements can yield the stresses, as with the FEM workbench. The advantage of this, over FEM, is that such a flexible body could be part of a more complex assembly of several rigid or other flexible bodies, and stresses and deformations could be obtained under the forces resulting from the dynamics of the whole mechanism.
josegegas
Posts: 241
Joined: Sat Feb 11, 2017 12:54 am
Location: New Zealand

Re: Solid geometries from 3D mesh.

Post by josegegas »

What is strange is that according to the documentation found in (https://wiki.freecad.org/FEM_FemMesh2Mesh):

"This tool converts surfaces of 3D elements of a selected FEM mesh to mesh, or converts 2D FEM mesh to mesh. Internally it picks FEM mesh element faces which are unique (not shared by two elements) and uses them to create faces of a mesh."

So if I do not misunderstand it should work. It should create the internal faces of the 3D elements as well as the external ones, so I should be able to recreate 3D solid volumes from the 3D elements of the mesh. Not sure what am I getting wrong...
User avatar
NewJoker
Veteran
Posts: 3014
Joined: Sun Oct 11, 2020 7:49 pm

Re: Solid geometries from 3D mesh.

Post by NewJoker »

josegegas wrote: Thu Jun 01, 2023 1:07 pm So if I do not misunderstand it should work. It should create the internal faces of the 3D elements as well as the external ones, so I should be able to recreate 3D solid volumes from the 3D elements of the mesh. Not sure what am I getting wrong...
It only uses the free (unique, as they call them) faces of solid elements so those that are not shared with any other elements and thus lie on the outer surface of the model.

Perhaps Salome or Gmsh could do what you want to achieve. Or you would need a custom script for that. It doesn't seem difficult to realize but it's just so uncommon that there are no tools dedicated for this purpose in CAD software.
Post Reply