[Gmsh] Marking facets from a OpenCASCADE object

Christophe Geuzaine cgeuzaine at uliege.be
Wed Nov 13 07:25:11 CET 2019



> On 12 Nov 2019, at 22:53, Salazar De Troya, Miguel <salazardetro1 at llnl.gov> wrote:
> 
> Hello
>  
> I need to use the OpenCASCADE engine because I am interested in doing simple boolean operations (basically, stitching two rectangles through the facets they are in contact with). From there, I would like to mark certain facets as physical. I am writing the context here to see if there is an alternative to my problem of marking facets on OpenCASCADE objects. Consider the following .geo script
>  
> SetFactory("OpenCASCADE");
> Mesh.CharacteristicLengthMin = 0.02;
> Mesh.CharacteristicLengthMax = 0.02;
> s0 = news;
> Rectangle(s0) = {0.0, 0.0, 0.0, 1.2, 1.5};
> Physical Curve(1) = {?};
>  
> How can I know the curves the Rectangle s0 is made of? I can mark them on the GUI, but I am interested in doing so directly from the geo script.
>  


SetFactory("OpenCASCADE");
Mesh.CharacteristicLengthMin = 0.02;
Mesh.CharacteristicLengthMax = 0.02;
s0 = news;
Rectangle(s0) = {0.0, 0.0, 0.0, 1.2, 1.5};
Physical Curve(1) = Boundary{ Surface{s0}; };
Physical Surface(2) = s0;


> Thanks
> Miguel
>  
> Miguel A. Salazar de Troya
> Postdoctoral Researcher, Lawrence Livermore National Laboratory
> B141
> Rm: 1085-5
> Ph: 1(925) 422-6411
> _______________________________________________
> 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