[Gmsh] help finding line-point connectivity for imported geometry

Terrence Moran tpm92 at cornell.edu
Tue Dec 4 21:56:22 CET 2018


Hello all,

I am new to gmsh and I am struggling to find what points make up a line
from an imported .iges file. The goal is to import an .iges file then use a
script to find which points are on the top layer and then find which lines
make that surface so I can refine the mesh along that surfaces boundary. So
far I can extract the point's x-y-z coordinates but I cannot find which
points make up a line. I have tried this:
***********
//+
SetFactory("OpenCASCADE");
ShapeFromFile("box.iges")
//+
coords[] = Point{7};
*point_nums[] = Line{1} // this does not work*
c = #a[];

Printf("x coord = %g", coords[0]);
Printf("y coord = %g", coords[1]);
Printf("z coord = %g", coords[2]);
**************
The point_nums comment does not work.
I was wondering if it was possible to output the label of the two points
that define a line.  I plan to find out 1) which points define the 1-D
boundary I care about 2) which lines are made with those points so I can
refine along the line. Or maybe there is a better way to do this all
together? I essentially need the mesh to be fine along the defined line and
coarse everywhere else.

The reason I am not doing this manually is because I have 1000+ .iges files
to mesh due to the scope of my project.

any help would be greatly appreciated!
Thanks,
Terrence
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20181204/82579f3b/attachment.html>


More information about the gmsh mailing list