[Gmsh] Importing 2D step as a hole in square

Christophe Geuzaine cgeuzaine at ulg.ac.be
Sat Feb 2 22:23:26 CET 2013


Hugo - Can you try again with the latest nightly build?

On 02 Feb 2013, at 21:29, Hugo Fernando Maia Milan <hugomaiamilan at hotmail.com> wrote:

> Hi to all,
> 
> I'm creating a 2D surface in CAD and importing to Gmsh how step file.
> 
> I have created a geo file to define a square surrounded the surface. I want to define CAD surface and square as different things. Meshing this file, Gmsh create a mesh superposing both surfaces, without connections between this surfaces.
> 
> So, the possible way is to define the 2D surface as a hole of square in the geo file. However making this Gmsh Crash. When a try to define, in geo file, the lines of 2D as a surface, Gmsh crash.
> 
> If I don't define the surface and use the surface number provided by importing the step file and try to define this surface as hole in square, the Gmsh crash too.
> 
> I don't know any way to solve this problem. Someone know how to solve this problems?
> 
> I'm using gmsh-2.6.1-Windows in Windows 7.
> 
> Thanks,
> 
> Hugo Milan.
> 
> Follow the geo file:
> 
> Merge "180AD02step2D.step";
> nponts = 8;
> nlines = 8;
> Line Loop(2) = {1:nlines};
> Plane Surface(2) = {1};
> 
> lpontcel = 1;
> 
> Characteristic Length {1:nponts} = lpontcel;
> 
> xmin = General.MinX;
> xmax = General.MaxX;
> ymin = General.MinY;
> ymax = General.MaxY;
> zmax = General.MaxZ;
> 
> lc = 25;
> lx = (xmax - xmin)*6;
> ly = (ymax - ymin)*6;
> 
> 
> Point(10001) = { (xmax + xmin)/2 - lx, (ymax + ymin)/2 - ly, 0, lc};
> Point(10002) = { (xmax + xmin)/2 + lx, (ymax + ymin)/2 - ly, 0, lc};
> Point(10003) = { (xmax + xmin)/2 + lx, (ymax + ymin)/2 + ly, 0, lc};
> Point(10004) = { (xmax + xmin)/2 - lx, (ymax + ymin)/2 + ly, 0, lc};
> 
> Line(10001) = {10004, 10003};
> Line(10002) = {10003, 10002};
> Line(10003) = {10002, 10001};
> Line(10004) = {10001, 10004};
> Line Loop(10005) = {10002, 10003, 10004, 10001};
> Plane Surface(10006) = {10005, 2};
> 
> Characteristic Length {10001:10004} = lc;
> 
> Mesh.CharacteristicLengthFromCurvature = 1;
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine