[Gmsh] Need help with boolean operations

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Jun 9 12:04:55 CEST 2017


I don't know why but the the opencascade "common" (intersection) algorithm does not behave as expected here; however the general "fragment" operator gives the expected result:

SetFactory("OpenCASCADE");
cl__1 = 1;
Point(1) = {0, 0, 0, 1};
Point(2) = {20, 0, 0, 1};
Point(3) = {0, 3, 0, 1};
Point(4) = {10, -4, 0, 1};
Line(1) = {3, 4};
Line(2) = {1, 2};
BooleanFragments{ Line{1}; }{ Line{2}; }
Delete{ Line{1,2}; }
Point (6) = {10, 10, 0, 1};
Line(7) = {5,6};



> On 8 Jun 2017, at 18:35, Sergio Logrosán <sergiologrosan at gmail.com> wrote:
> 
> Dear service attendant,
> 
> I am using your great GMSH software for my bachelor's degree thesis. I am writing to you because I have a question. I need to create points of elementary geometry from intersections of lines or other 2D elements. I have tested with Boolean operations without success. Attached you will find an example .geo file of what I mean. 
> 
> My intention in the example is to create a line (3) being one of its points the intersection between lines 1 and 2.
> 
> Thank you very much for your time. 
> 
> I am looking forward to your response,
> 
> Kind regards,
> Sergio Logrosán 
> 
> 
> 
> 
> <untitled2.geo>_______________________________________________
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the gmsh mailing list