[Gmsh] saving/reading meshed geometries from C code.
Christophe Geuzaine
cgeuzaine at uliege.be
Wed May 1 18:25:34 CEST 2019
> On 28 Apr 2019, at 11:20, walter steffe <walter.steffe at alice.it> wrote:
>
> Hello,
>
> I am using c library of gmsh in my EmCAD tool.
> The geometries are imported from step files using the OCC library and
> meshed with gmsh.
>
> I would like to do the following: First I would like to mesh an OCC
> model (IF_model) which contains a set of faces. Then I would like to
> mesh a second OCC model (solid_model) which includes all the faces of
> the IF_model and a few additional solid bodies. I need to have a 3D
> (tetraherdal) mesh for the solid_model and I need to share the 2D mesh
> with the IF_model.
>
> So I was thinking to import the mesh file associated with the IF_model
> and use the functions "void copyMesh(GEdge *from, GEdge *to, int
> direction)" and "static void copyMesh(GFace *source, GFace *target)" in
> order to copy mesh data from IF_model to solid_model.
>
> The problem is that copyMesh requires geometrical data (Gedge *from or
> GFace *source) and I do not know how to transfer these data from
> IF_model to solid_model.
>
> Is there a way to do that ?
I wouldn't use the (undocumented) private API anymore, and switch to the public API. Then if you are able to identify the faces in both models (by label, by tag, or simply geometrically through their bounding box), it would just be a matter of using gmsh.model.mesh.getElements/getNodes and gmsh.model.mesh.setElements/setNodes.
Christophe
>
> Thanks for your attention.
>
> Walter Steffè
>
>
>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
—
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
More information about the gmsh
mailing list