[Gmsh] Abandoning transform and getting points/lines/surfaces instead

David Colignon david.colignon at ulg.ac.be
Thu May 28 11:22:12 CEST 2015


On 27/05/15 08:23, Paweł Maciakowski wrote:
> Hi all,
>
> Is there a way to abandon duplicate/extrude statements but keep points/lines/surfaces?
>
> For example:
> You extrude a line and get auto-generated numbering for new points, line and surface. I would like to give up on the possibility
> of changing extrude parameters and have access to the points and lines themselves.
>
> Start with that:
> Line(3) = {1, 2};
> Extrude {0, 0, 1}{
>      Line{3};
> }
>
> and instead get this:
> Line(3) = {1,2};
> Point(4) = {x1, y1, z1+1};
> Point(5) = {x2, y2, z2+1};
> Line(6) = {4,5};
> Line(7) = {1,4};
> Line(8) = {2,5};
> Line Loop(9) = {3,8, -6, -7};
> Plane Surface(10) = {9};
>
>
> Is that possible?

Hi Paweł,

yes, it is possible, just use the "-0" option and gmsh will output an "unrolled" version of your .geo file

Regards,

Dave

ace35:~ >  gmsh  ./gmsh/tutorial/t3.geo  -0

Info    : Running '/Applications/Gmsh.app/Contents/MacOS/gmsh gmsh/tutorial/t3.geo -0' [Gmsh 2.9.4, 1 node, max. 1 thread]
Info    : Started on Thu May 28 11:16:11 2015
Info    : Reading 'gmsh/tutorial/t3.geo'...
Info    : Reading 'gmsh/tutorial/t1.geo'...
Info    : Done reading 'gmsh/tutorial/t1.geo'
Info    : Done reading 'gmsh/tutorial/t3.geo'
Info    : Writing 'gmsh/tutorial/t3.geo_unrolled'...
#####################################################

Info    : Done writing 'gmsh/tutorial/t3.geo_unrolled'
Info    : Stopped on Thu May 28 11:16:11 2015

ace35:~ >  more gmsh/tutorial/t3.geo_unrolled

cl__1 = 0.01;
Point(1) = {0, 0, 0, 0.01};
Point(2) = {0.1, 0, 0, 0.01};
Point(3) = {0.1, 0.3, 0, 0.01};
Point(4) = {0, 0.3, 0, 0.01};
Point(5) = {0, 0.3, 0.1, 0.01};
Point(6) = {0, 0, 0.1, 0.01};
Point(10) = {0.1, 0, 0.1, 0.01};
Point(14) = {0.1, 0.3, 0.1, 0.01};
Point(15) = {-0.1, 0.3, 0.2, 0.01};
Point(16) = {-0.1, 0, 0.2, 0.01};
Point(20) = {-0.09999999999999999, 0, 0.3, 0.01};
Point(24) = {-0.09999999999999999, 0.3, 0.3, 0.01};
Point(36) = {-0.1, 0.3, 0.1, 0.01};
Point(38) = {-0.1, 0, 0.1, 0.01};
Point(39) = {-0.3, 0.2, 0.4, 0.01};
Point(40) = {-0.3, 0.2, 0.1, 0.01};
Point(44) = {-0.3, 0.09999999999999995, 0.1, 0.01};
Point(48) = {-0.3, 0.09999999999999995, 0.4, 0.01};
Point(59) = {-0.14, 0.3081093271630204, 0.2487997233414845, 0.01};
Point(60) = {-0.18, 0.3007418117708657, 0.2977169381251236, 0.01};
Point(61) = {-0.22, 0.2786186375626182, 0.3419632865416184, 0.01};
Point(62) = {-0.26, 0.2439053749709997, 0.3772076277255256, 0.01};
Point(64) = {-0.14, 0.02279237227447434, 0.1560946250290002, 0.01};
Point(65) = {-0.18, 0.05803671345838153, 0.1213813624373817, 0.01};
Point(66) = {-0.22, 0.1022830618748764, 0.09925818822913426, 0.01};
Point(67) = {-0.26, 0.1512002766585155, 0.09189067283697963, 0.01};
Point(78) = {-0.14, -0.008109327163020402, 0.2512002766585156, 0.01};
Point(79) = {-0.18, -0.000741811770865769, 0.2022830618748765, 0.01};
Point(80) = {-0.22, 0.02138136243738165, 0.1580367134583816, 0.01};
Point(81) = {-0.26, 0.05609462502900019, 0.1227923722744744, 0.01};
Point(92) = {-0.14, 0.2772076277255257, 0.3439053749709998, 0.01};
Point(93) = {-0.18, 0.2419632865416184, 0.3786186375626184, 0.01};
Point(94) = {-0.22, 0.1977169381251236, 0.4007418117708658, 0.01};
Point(95) = {-0.26, 0.1487997233414844, 0.4081093271630204, 0.01};
Line(1) = {1, 2};
Line(2) = {3, 2};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line(102) = {5, 6};
Line(103) = {6, 10};
Line(104) = {10, 14};
Line(105) = {14, 5};
Line(107) = {4, 5};
Line(108) = {1, 6};
Line(112) = {2, 10};
Line(116) = {3, 14};
Line(124) = {15, 16};
Line(125) = {16, 20};
Line(126) = {20, 24};
Line(127) = {24, 15};
Circle(129) = {5, 36, 15};
Circle(130) = {6, 38, 16};
Circle(134) = {10, 38, 20};
Circle(138) = {14, 36, 24};
Line(146) = {39, 40};
Line(147) = {40, 44};
Line(148) = {44, 48};
Line(149) = {48, 39};
Spline(151) = {15, 59, 60, 61, 62, 39};
Spline(152) = {16, 64, 65, 66, 67, 40};
Spline(156) = {20, 78, 79, 80, 81, 44};
Spline(160) = {24, 92, 93, 94, 95, 48};
Line Loop(6) = {4, 1, -2, 3};
Plane Surface(6) = {6};
Line Loop(109) = {4, 108, -102, -107};
Ruled Surface(109) = {109};
Line Loop(113) = {1, 112, -103, -108};
Ruled Surface(113) = {113};
Line Loop(117) = {-2, 116, -104, -112};
Ruled Surface(117) = {117};
Line Loop(121) = {3, 107, -105, -116};
Ruled Surface(121) = {121};
Line Loop(122) = {102, 103, 104, 105};
Plane Surface(122) = {122};
Line Loop(131) = {102, 130, -124, -129};
Ruled Surface(131) = {131};
Line Loop(135) = {103, 134, -125, -130};
Ruled Surface(135) = {135};
Line Loop(139) = {104, 138, -126, -134};
Ruled Surface(139) = {139};
Line Loop(143) = {105, 129, -127, -138};
Ruled Surface(143) = {143};
Line Loop(144) = {124, 125, 126, 127};
Plane Surface(144) = {144};
Line Loop(153) = {124, 152, -146, -151};
Ruled Surface(153) = {153};
Line Loop(157) = {125, 156, -147, -152};
Ruled Surface(157) = {157};
Line Loop(161) = {126, 160, -148, -156};
Ruled Surface(161) = {161};
Line Loop(165) = {127, 151, -149, -160};
Ruled Surface(165) = {165};
Line Loop(166) = {146, 147, 148, 149};
Plane Surface(166) = {166};
Surface Loop(1) = {6, 122, 109, 113, 117, 121};
Volume(1) = {1};
Surface Loop(2) = {122, 144, 131, 135, 139, 143};
Volume(2) = {2};
Surface Loop(3) = {144, 166, 153, 157, 161, 165};
Volume(3) = {3};
Physical Point(1) = {1, 2};
MyLine = 99;
Physical Line(MyLine) = {1, 2, 4};
Physical Surface("My fancy surface label") = {6};
Physical Volume(101) = {1, 2, 3};



-- 
David Colignon, Ph.D.
1er Logisticien de Recherche
Université de Liège
ACE - Applied & Computational Electromagnetics
Quartier POLYTECH 1 - Montefiore B28
Allée de la découverte 10
4000 Liège - BELGIQUE
Tél: +32 (0)4 366 37 32
http://www.ulg.ac.be/nic4

> Thanks,
> PM
>
>
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
>





More information about the gmsh mailing list