[Gmsh] Cylinder in a box
Christophe Geuzaine
cgeuzaine at uliege.be
Wed Mar 6 19:06:23 CET 2019
> On 6 Mar 2019, at 18:47, Alexandre Warnier <warnier.alexandre at gmail.com> wrote:
>
> Hello,
>
> I'm trying to insert a cylinder in a box. I do not have any problem to create the box but I have problem creating the cylinder with a .geo.
> Everything seems to be working fine but I get the following error:
> Error : Line Loop 9 is wrong
Your line loop 9 indeed tries to group lines that are not connected... See attached picture.
You might find using the OpenCASCADE kernel simpler - with it you can just do
SetFactory("OpenCASCADE");
Box(1) = {0,0,0, 2,2,2};
Cylinder(2) = {1,0.5,1, 0,1,0, 0.5};
BooleanFragments{ Volume{1}; Delete; }{ Volume{2}; Delete; }
Christophe
> Error : Line Loop 10 is wrong
> Error : Line Loop 11 is wrong
> Error : Line Loop 12 is wrong
> with the last lines when I oppen it with gmsh.
>
> cl=50;
> x_min = -1000;
> x_max = 1000;
> y_min = -250;
> y_max = 250;
> z_min = -250;
> z_max = 250;
> disk_x = 0;
> disk_y = 0;
> disk_z = 0;
> disk_d = 126;
> th=10;
> Point(9) = {disk_x - th/2, disk_y, disk_z, cl/20};
> Point(10) = {disk_x - th/2, disk_y - disk_d/2, disk_z, cl/20};
> Point(11) = {disk_x - th/2, disk_y, disk_z + disk_d/2, cl/20};
> Point(12) = {disk_x - th/2, disk_y + disk_d/2, disk_z, cl/20};
> Point(13) = {disk_x - th/2, disk_y, disk_z - disk_d/2, cl/20};
>
> Point(14) = {disk_x + th/2, disk_y, disk_z, cl/20};
> Point(15) = {disk_x + th/2, disk_y - disk_d/2, disk_z, cl/20};
> Point(16) = {disk_x + th/2, disk_y, disk_z + disk_d/2, cl/20};
> Point(17) = {disk_x + th/2, disk_y + disk_d/2, disk_z, cl/20};
> Point(18) = {disk_x + th/2, disk_y, disk_z - disk_d/2, cl/20};
>
> Circle(13) = {13, 9, 12};
> Circle(14) = {12, 9, 11};
> Circle(15) = {11, 9, 10};
> Circle(16) = {10, 9, 13};
>
>
> Circle(17) = {18, 14, 17};
> Circle(18) = {17, 14, 16};
> Circle(19) = {16, 14, 15};
> Circle(20) = {15, 14, 18};
>
>
> Line Loop(7) = {-13, -14, -15, -16};
> Plane Surface(7) = {7};
>
>
> Line Loop(8) = {17, 18, 19, 20};
> Plane Surface(8) = {8};
>
> Line(21) = {11, 16};
> Line(22) = {12, 17};
> Line(23) = {13,18};
> Line(24) = {10, 15};
>
> Line Loop(9) = {16, 21, -18, -23};
> Plane Surface(9) = {9};
> Line Loop(10) = {15, 23, -17, -22};
> Plane Surface(10) = {10};
> Line Loop(11) = {14, 22, -20, -24};
> Plane Surface(11) = {11};
> Line Loop(12) = {13, 24, -19, -21};
> Plane Surface(12) = {12};
>
>
> Surface Loop(2) = {7, 8, 9, 10, 11, 12};
>
> Volume(2) = {2};
>
> Thank you for your help,
> Alexandre
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190306/5b1902ce/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error.png
Type: image/png
Size: 62354 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20190306/5b1902ce/attachment-0001.png>
More information about the gmsh
mailing list