<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1509315464483_13100">Hi Christophe,</div><div id="yui_3_16_0_ym19_1_1509315464483_13101"><br id="yui_3_16_0_ym19_1_1509315464483_13102"></div><div id="yui_3_16_0_ym19_1_1509315464483_13103"><span id="yui_3_16_0_ym19_1_1509315464483_13104">thanks for clarifying.</span></div><div id="yui_3_16_0_ym19_1_1509315464483_13105"><br id="yui_3_16_0_ym19_1_1509315464483_13106"></div><div id="yui_3_16_0_ym19_1_1509315464483_13107">Regards,</div><div id="yui_3_16_0_ym19_1_1509315464483_13108"><br id="yui_3_16_0_ym19_1_1509315464483_13109"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509315464483_13110">Marco</div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> Il Giovedì 26 Ottobre 2017 19:49, Christophe Geuzaine <cgeuzaine@ulg.ac.be> ha scritto:<br></font></div> <br><br> <div class="y_msg_container"><div dir="ltr"><br clear="none">Hi Marco,<br clear="none"><br clear="none">No need to create the surfaces and the "spine": simply do<br clear="none"><br clear="none">SetFactory("OpenCASCADE");<br clear="none">// Create base circle line loop<br clear="none">rd = 0.1;<br clear="none">base_circle = newl; Circle(newl) = {0,0,0, rd};<br clear="none">base_circle_ll = newll; Line Loop (newll) = {base_circle};<br clear="none">// Create upper circle line loop<br clear="none">upper_circle = Translate { 0, 0, .02 } { Duplicata{ Line { base_circle }; }};<br clear="none">upper_circle_ll = newll; Line Loop (newll) = {upper_circle};<br clear="none">// Create cylinder<br clear="none">Ruled ThruSections(newv) = {base_circle_ll, upper_circle_ll};<br clear="none"><br clear="none">See demos/boolean/thrusections.geo for more examples.<br clear="none"><br clear="none">Christophe<br clear="none"><div class="yqt6927183106" id="yqtfd46691"><br clear="none">> On 26 Oct 2017, at 14:11, Marco Antolovic <<a shape="rect" ymailto="mailto:marco_antolovic@yahoo.it" href="mailto:marco_antolovic@yahoo.it">marco_antolovic@yahoo.it</a>> wrote:<br clear="none">> <br clear="none">> Hi all,<br clear="none">> <br clear="none">> it appears that my previous mail had some editing problems so I'm resending it, hoping that it will make a question clearer.<br clear="none">> <br clear="none">> The code below is trying to create a cylinder using ThruSections. I manage to create and mesh the cylinder but I always get an error during meshing (there is a strange curve inside the cylinder geometry...). To my knowledge there is no example on how to use so ThruSections I went on by trial & error.<br clear="none">> I'm aware that the command Cylinder will give the same result but I'm really curious about ThruSections...<br clear="none">> My code is as follows:<br clear="none">> <br clear="none">> // Create base circle line loop<br clear="none">> base_circle = newl; Circle(newl) = {0,0,0, rd};<br clear="none">> base_circle_ll = newll; Line Loop (newll) = {base_circle};<br clear="none">> <br clear="none">> // Create base circle surface, this will be used to draw the wire connecting upper and base circle<br clear="none">> base_circle_surface = news; Plane Surface (news) = {base_circle_ll};<br clear="none">> <br clear="none">> // Create upper circle line loop<br clear="none">> upper_circle = Translate { 0, 0, .02 } { Duplicata{ Line { base_circle }; }};<br clear="none">> upper_circle_ll = newll; Line Loop (newll) = {upper_circle};<br clear="none">> <br clear="none">> // Create upper circle surface, this will be used to draw the wire connecting upper and base circle<br clear="none">> upper_circle_surface = news; Plane Surface (news) = {upper_circle_ll};<br clear="none">> <br clear="none">> // Build wire connectiong upper and base circle<br clear="none">> extrac_points() = PointsOf { Surface{ base_circle_surface, upper_circle_surface }; };<br clear="none">> line_cylinder = newl; Line (line_cylinder) = { extrac_points(0), extrac_points(1) };<br clear="none">> wire_cylinder = newl; Wire (wire_cylinder) = { line_cylinder };<br clear="none">> <br clear="none">> // Create ruled surface<br clear="none">> Ruled ThruSections { base_circle_ll, wire_cylinder, upper_circle_ll }<br clear="none">> <br clear="none">> <br clear="none">> And the output log on a PC is:<br clear="none">> <br clear="none">> Info : Reading 'D:\Work area\Octave\GMSH\how_to_create_throughsection_OPENCASCADE_V06.c'...<br clear="none">> Info : Done reading 'D:\Work area\Octave\GMSH\how_to_create_throughsection_OPENCASCADE_V06.c'<br clear="none">> Info : Finalized high order topology of periodic connections<br clear="none">> Info : Meshing 1D...<br clear="none">> Info : Meshing curve 1 (Circle)<br clear="none">> Info : Meshing curve 2 (Circle)<br clear="none">> Info : Meshing curve 6 (Line)<br clear="none">> Info : Meshing curve 7 (BSpline)<br clear="none">> Info : Meshing curve 8 (BSpline)<br clear="none">> Info : Meshing curve 9 (BSpline)<br clear="none">> Info : Meshing curve 10 (BSpline)<br clear="none">> Info : Done meshing 1D (0 s)<br clear="none">> Info : Meshing 2D...<br clear="none">> Info : Meshing surface 3 (Plane, MeshAdapt)<br clear="none">> Info : Meshing surface 5 (Plane, MeshAdapt)<br clear="none">> Info : Meshing surface 6 (BSpline surface, MeshAdapt)<br clear="none">> .Error : Unable to recover the edge 9 (7/7) on GEdge 1 (on GFace 6)<br clear="none">> Info : Meshing surface 7 (BSpline surface, MeshAdapt)<br clear="none">> .Error : Unable to recover the edge 16 (7/7) on GEdge 2 (on GFace 7)<br clear="none">> Info : Done meshing 2D (0.015625 s)<br clear="none">> Info : Meshing 3D...<br clear="none">> Info : Done meshing 3D (0 s)<br clear="none">> Info : 49 vertices 74 elements<br clear="none">> .Error : ------------------------------<br clear="none">> .Error : Mesh generation error summary<br clear="none">> .Error : 0 warnings<br clear="none">> .Error : 2 errors<br clear="none">> .Error : Check the full log for details<br clear="none">> .Error : ------------------------------<br clear="none">> Info : Writing 'D:\Work area\Octave\GMSH\how_to_create_throughsection_OPENCASCADE_V06.output'...<br clear="none">> <br clear="none">> I hope somebody can give me a hand with this,<br clear="none">> <br clear="none">> Thanks,<br clear="none">> <br clear="none">> Marco<br clear="none">> <br clear="none">> PS: I attach the script and the output log just in case unexpected problems happens again.</div><br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> <how_to_create_throughsection_OPENCASCADE_V06.c><how_to_create_throughsection_OPENCASCADE_V06.output>_______________________________________________<br clear="none">> gmsh mailing list<br clear="none">> <a shape="rect" ymailto="mailto:gmsh@onelab.info" href="mailto:gmsh@onelab.info">gmsh@onelab.info</a><br clear="none">> <a shape="rect" href="http://onelab.info/mailman/listinfo/gmsh" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br clear="none"><br clear="none"><br clear="none">-- <br clear="none">Prof. Christophe Geuzaine<br clear="none">University of Liege, Electrical Engineering and Computer Science <br clear="none"><a shape="rect" href="http://www.montefiore.ulg.ac.be/~geuzaine" target="_blank">http://www.montefiore.ulg.ac.be/~geuzaine</a><br clear="none"><br clear="none">Free software: <a shape="rect" href="http://gmsh.info/" target="_blank">http://gmsh.info </a>| <a shape="rect" href="http://getdp.info/" target="_blank">http://getdp.info </a>| <a shape="rect" href="http://onelab.info/" target="_blank">http://onelab.info</a><div class="yqt6927183106" id="yqtfd66988"><br clear="none"></div></div><br><br></div> </div> </div> </div></div></body></html>