You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thank you for implementing such a great feature! I was wondering if there is the ability to tag lines from CadQuery to use in Gmsh? I would like to apply transfinite meshing in Gmsh, and for my current geometry, I need to get the tagged lines as well as the tagged faces.
The plugin currently assumes 2D tagging just for surfaces, but in theory it could probably be done for 1D elements. This idea brings some questions to mind.
Does a CadQuery edge correspond to a 1D element in Gmsh? If so, wires would need to have their constituent edges extracted.
How do you handle tagged splines? Do you have to discretize them and associate all the individual segments with a physical group?
Are there edges from different faces/solids that will need to be grouped via tags, similar to how the tilde (~) tags work now for faces?
There is another use for transferring tagged edges to Gmsh: extruded meshes
Afaik, if we import a solid (or an assembly) in to Gmsh and mesh it, then the mesh will have a 3d structure.
If we would like to have a extruded mesh instead, one approach is to import the 3d object, keep the faces to extrude in gmsh, extrude them to regenerate the 3d object. To get physical groups in the extruded mesh, one would need to have tags on the edges (at least that's the easiest way I see).
(This is problably a question for cadquery)
Why this? I build a geometry using constraints, which currently I can't do in 2d objects. I can tag the faces in the assembly and then import to Gmsh to get the physical groups, but now I need an extruded mesh based on only the 2d projection of the imported assembly.
Other trick (that requieres quite some book-keeping) is to get the 3d solid with the physical groups in gmsh, extract the bounding boxes of the entities. Delete all entities and keep only the 2d projection, recreate the solid by extrusion, recreate the physical groups using the extracted bounding boxes.
@adam-urbanczyk It is a little off topic, might deserve a different issue: How can i tell gmsh that the geometry being imported was extruded (to generate an extruded mesh) and keep the tags as physical groups?
The need to get tagged lines was a workaround to re-do the 3d object in gmsh.
Activity
jmwright commentedon May 14, 2025
The plugin currently assumes 2D tagging just for surfaces, but in theory it could probably be done for 1D elements. This idea brings some questions to mind.
~) tags work now for faces?kakila commentedon Jun 3, 2026
There is another use for transferring tagged edges to Gmsh: extruded meshes
Afaik, if we import a solid (or an assembly) in to Gmsh and mesh it, then the mesh will have a 3d structure.
If we would like to have a extruded mesh instead, one approach is to import the 3d object, keep the faces to extrude in gmsh, extrude them to regenerate the 3d object. To get physical groups in the extruded mesh, one would need to have tags on the edges (at least that's the easiest way I see).
(This is problably a question for cadquery)
Why this? I build a geometry using constraints, which currently I can't do in 2d objects. I can tag the faces in the assembly and then import to Gmsh to get the physical groups, but now I need an extruded mesh based on only the 2d projection of the imported assembly.
Other trick (that requieres quite some book-keeping) is to get the 3d solid with the physical groups in gmsh, extract the bounding boxes of the entities. Delete all entities and keep only the 2d projection, recreate the solid by extrusion, recreate the physical groups using the extracted bounding boxes.
adam-urbanczyk commentedon Jun 3, 2026
@kakila what is the question for CQ actually?
kakila commentedon Jun 10, 2026
@adam-urbanczyk It is a little off topic, might deserve a different issue: How can i tell gmsh that the geometry being imported was extruded (to generate an extruded mesh) and keep the tags as physical groups?
The need to get tagged lines was a workaround to re-do the 3d object in gmsh.
jmwright commentedon Jun 16, 2026
Please try #29 to see if that does what is needed.