Page 1 of 1

Merge Meshes

Posted: Wed Jan 08, 2020 7:30 pm
by spiderc3
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

Re: Merge Meshes

Posted: Wed Jan 08, 2020 10:33 pm
by UR_
ATM FEM WB does't support *TIE constraint (bonding), so meshes have to be conformal. :(

Re: Merge Meshes

Posted: Wed Jan 08, 2020 11:29 pm
by vocx
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.

Re: Merge Meshes

Posted: Thu Jan 09, 2020 12:21 am
by spiderc3
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

Re: Merge Meshes

Posted: Thu Jan 09, 2020 1:05 am
by vocx
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?

Re: Merge Meshes

Posted: Thu Jan 09, 2020 7:40 am
by UR_
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.

Re: Merge Meshes

Posted: Fri Jan 10, 2020 8:12 pm
by bernd
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.