Merge Meshes

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
spiderc3
Posts: 7
Joined: Mon Nov 25, 2019 6:35 pm

Merge Meshes

Post by spiderc3 » Wed Jan 08, 2020 7:30 pm

Hello alltegether,

I am having problems to merge meshes. Normally - as far as I know - it would work in WB Mesh Design-->Mesh-->Merge OR WB Mesh Design-->Mesh--> Boolean --> Union.
Both options are not working with my file.
I created the mesh external with Gmsh and imported it back to freecad. Calculation of one mesh only works fine.
Alternativly I would love to use a 1D simulation with the geometrical moment of inertia properties of the profil.

Cheers,

PJ

_________
Freecad Version 0.18
RevNo 4
Win10
64-bit
Attachments
MergeMesh_v1.FCStd
(629.14 KiB) Downloaded 4 times
Meshes.PNG
Meshes.PNG (248.36 KiB) Viewed 221 times
_________
Freecad Version 0.18
RevNo 4
Win10
64-bit
UR_
Posts: 1147
Joined: Tue Jan 03, 2017 8:42 pm

Re: Merge Meshes

Post by UR_ » Wed Jan 08, 2020 10:33 pm

ATM FEM WB does't support *TIE constraint (bonding), so meshes have to be conformal. :(
vocx
Posts: 2718
Joined: Thu Oct 18, 2018 9:18 pm

Re: Merge Meshes

Post by vocx » Wed Jan 08, 2020 11:29 pm

spiderc3 wrote:
Wed Jan 08, 2020 7:30 pm
I am having problems to merge meshes. Normally - as far as I know - it would work in WB Mesh Design...
I am not an expert on the Mesh Workbench, but I think these tools don't work with meshes created from the FEM Workbench.

As far as I can tell, the FEM Workbench creates its own mesh objects which are different from the generic mesh objects created from the Mesh Workbench. The Mesh Workbench is used to import generic meshes like STL files, while the meshes produced by FEM are solely for FE analysis.

There seems to be a command called femmesh_2_mesh which maybe helps you turn one object into the other.

Code: Select all

import femmesh

femmesh.femmesh2mesh(myFemMesh, myResults=None)
You could ask Bernd in the FEM subforum for more information.
To support the documentation effort, and code development, your donation is appreciated: paypal.
spiderc3
Posts: 7
Joined: Mon Nov 25, 2019 6:35 pm

Re: Merge Meshes

Post by spiderc3 » Thu Jan 09, 2020 12:21 am

Hello and thank You for the fast responses!
as far as I understood, if a mesh is imported, tools in the mesh design WB do not apply.
If that´s true I feel as if I have 2 options:
1. Build the design completly in Freecad and mesh it enterirly in Gmsh.exe and import the whole mesh
2. Built the design in Gmsh and mesh it in Gmesh and import the whole mesh

I was hoping to use one meshed part to built an entire construction in Freecad - my questions to that:
1. Is it possible by alterning the optins in gmsh.exe or import in freecad?
2. Is it possible by coding in freecad?

@UR_: I am sorry I didn´t understand Your answer fully :roll: :oops: (. I thought about a tie constraint, but for now a union of the meshes would be suffiecent
@vocx: Do You know wheteher it does work with objects in freecad or only during import? I will try to generate an .STL file and check whether it works better.

From my point of view Gmsh is implemented in Freecad and it must be possible to generate an conformal mesh with Freecad :D
Yet, my scripting capabilities are limited (na). But I want to learn :)

Cheers,

PJ
_________
Freecad Version 0.18
RevNo 4
Win10
64-bit
vocx
Posts: 2718
Joined: Thu Oct 18, 2018 9:18 pm

Re: Merge Meshes

Post by vocx » Thu Jan 09, 2020 1:05 am

spiderc3 wrote:
Thu Jan 09, 2020 12:21 am
...
I was hoping to use one meshed part to built an entire construction in Freecad - my questions to that:
1. Is it possible by alterning the optins in gmsh.exe or import in freecad?
2. Is it possible by coding in freecad?
...
Sorry, I don't understand what you really try to achieve. You should describe what you want with much more detail.

You should use FreeCAD to model any 3D solid that you can think of. Then this 3D solid can be exported to a simple mesh format (STL, OBJ, etc.), or if you intend to perform finite element analysis, it can be exported as Step, and meshed outside of FreeCAD using Gmsh, or Netgen, or any other finite element mesher. This meshing can also be done inside the FEM Workbench because this workbench calls the external meshing tools. The resulting finite element mesh can be used in a finite element analysis inside FreeCAD.

Do you want to do finite element analysis, or do you just need a mesh (STL)? What do you want to do exactly? What are the objects that you are meshing?
To support the documentation effort, and code development, your donation is appreciated: paypal.
UR_
Posts: 1147
Joined: Tue Jan 03, 2017 8:42 pm

Re: Merge Meshes

Post by UR_ » Thu Jan 09, 2020 7:40 am

spiderc3 wrote:
Thu Jan 09, 2020 12:21 am
I thought about a tie constraint, but for now a union of the meshes would be suffiecent
That "union" can only be done by Gmsh, not by FreeCAD.
MeshWB supports only meshed surfaces, no solid elements.

But therefore meshes has to be conformal.
That means adjacent faces has to share same nodes, and that's simply impossible with extruded meshes.
User avatar
bernd
Posts: 8959
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Merge Meshes

Post by bernd » Fri Jan 10, 2020 8:12 pm

if you exchange meshes and geometry between FreeCAD and gmsh make sure to use brep for geometry and unv for meshes. These are the only formats supporting all FreeCAD and occt supports.

BTW this is what FreeCAD does too, write geometry to brep call gmsh with the options the user made in FreeCAD and read back the unv which was created by gmsh.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest