<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_1509004484373_2633">Hi all,</div><div id="yui_3_16_0_ym19_1_1509004484373_18609"><br></div><div id="yui_3_16_0_ym19_1_1509004484373_18610" dir="ltr">it appears that my previous mail had some editing problems so I'm resending it, hoping that it will make a question clearer.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_18639"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_18671">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 id="yui_3_16_0_ym19_1_1509004484373_18676">I'm aware that the command Cylinder will give the same result but I'm really curious about ThruSections...<br id="yui_3_16_0_ym19_1_1509004484373_18677">My code is as follows:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_20321"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_20345">// Create base circle line loop<br id="yui_3_16_0_ym19_1_1509004484373_20386">base_circle = newl; Circle(newl) = {0,0,0, rd};<br id="yui_3_16_0_ym19_1_1509004484373_20387">base_circle_ll = newll; Line Loop (newll) = {base_circle};<br id="yui_3_16_0_ym19_1_1509004484373_20388"><br id="yui_3_16_0_ym19_1_1509004484373_20389">// Create base circle surface, this will be used to draw the wire connecting upper and base circle<br id="yui_3_16_0_ym19_1_1509004484373_20390">base_circle_surface = news; Plane Surface (news) = {base_circle_ll};<br id="yui_3_16_0_ym19_1_1509004484373_20391"><br id="yui_3_16_0_ym19_1_1509004484373_20392">// Create upper circle line loop<br id="yui_3_16_0_ym19_1_1509004484373_20393">upper_circle = Translate { 0, 0, .02 } { Duplicata{ Line { base_circle }; }};<br id="yui_3_16_0_ym19_1_1509004484373_20394">upper_circle_ll = newll; Line Loop (newll) = {upper_circle};<br id="yui_3_16_0_ym19_1_1509004484373_20395"><br id="yui_3_16_0_ym19_1_1509004484373_20396">// Create upper circle surface, this will be used to draw the wire connecting upper and base circle<br id="yui_3_16_0_ym19_1_1509004484373_20397">upper_circle_surface = news; Plane Surface (news) = {upper_circle_ll};<br id="yui_3_16_0_ym19_1_1509004484373_20398"><br id="yui_3_16_0_ym19_1_1509004484373_20399">// Build wire connectiong upper and base circle<br id="yui_3_16_0_ym19_1_1509004484373_20400">extrac_points() = PointsOf { Surface{ base_circle_surface, upper_circle_surface }; };<br id="yui_3_16_0_ym19_1_1509004484373_20401">line_cylinder = newl; Line (line_cylinder) = { extrac_points(0), extrac_points(1) };<br id="yui_3_16_0_ym19_1_1509004484373_20402">wire_cylinder = newl; Wire (wire_cylinder) = { line_cylinder };<br id="yui_3_16_0_ym19_1_1509004484373_20403"><br id="yui_3_16_0_ym19_1_1509004484373_20404">// Create ruled surface<br id="yui_3_16_0_ym19_1_1509004484373_20405">Ruled ThruSections { base_circle_ll, wire_cylinder, upper_circle_ll }</div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_20406"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_23787"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_23786">And the output log on a PC is:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_25440"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_25562">Info : Reading 'D:\Work area\Octave\GMSH\how_to_create_throughsection_OPENCASCADE_V06.c'...<br id="yui_3_16_0_ym19_1_1509004484373_25532">Info : Done reading 'D:\Work area\Octave\GMSH\how_to_create_throughsection_OPENCASCADE_V06.c'<br id="yui_3_16_0_ym19_1_1509004484373_25533">Info : Finalized high order topology of periodic connections<br id="yui_3_16_0_ym19_1_1509004484373_25534">Info : Meshing 1D...<br id="yui_3_16_0_ym19_1_1509004484373_25535">Info : Meshing curve 1 (Circle)<br id="yui_3_16_0_ym19_1_1509004484373_25536">Info : Meshing curve 2 (Circle)<br id="yui_3_16_0_ym19_1_1509004484373_25537">Info : Meshing curve 6 (Line)<br id="yui_3_16_0_ym19_1_1509004484373_25538">Info : Meshing curve 7 (BSpline)<br id="yui_3_16_0_ym19_1_1509004484373_25539">Info : Meshing curve 8 (BSpline)<br id="yui_3_16_0_ym19_1_1509004484373_25540">Info : Meshing curve 9 (BSpline)<br id="yui_3_16_0_ym19_1_1509004484373_25541">Info : Meshing curve 10 (BSpline)<br id="yui_3_16_0_ym19_1_1509004484373_25542">Info : Done meshing 1D (0 s)<br id="yui_3_16_0_ym19_1_1509004484373_25543">Info : Meshing 2D...<br id="yui_3_16_0_ym19_1_1509004484373_25544">Info : Meshing surface 3 (Plane, MeshAdapt)<br id="yui_3_16_0_ym19_1_1509004484373_25545">Info : Meshing surface 5 (Plane, MeshAdapt)<br id="yui_3_16_0_ym19_1_1509004484373_25546">Info : Meshing surface 6 (BSpline surface, MeshAdapt)<br id="yui_3_16_0_ym19_1_1509004484373_25547">.Error : Unable to recover the edge 9 (7/7) on GEdge 1 (on GFace 6)<br id="yui_3_16_0_ym19_1_1509004484373_25548">Info : Meshing surface 7 (BSpline surface, MeshAdapt)<br id="yui_3_16_0_ym19_1_1509004484373_25549">.Error : Unable to recover the edge 16 (7/7) on GEdge 2 (on GFace 7)<br id="yui_3_16_0_ym19_1_1509004484373_25550">Info : Done meshing 2D (0.015625 s)<br id="yui_3_16_0_ym19_1_1509004484373_25551">Info : Meshing 3D...<br id="yui_3_16_0_ym19_1_1509004484373_25552">Info : Done meshing 3D (0 s)<br id="yui_3_16_0_ym19_1_1509004484373_25553">Info : 49 vertices 74 elements<br id="yui_3_16_0_ym19_1_1509004484373_25554">.Error : ------------------------------<br id="yui_3_16_0_ym19_1_1509004484373_25555">.Error : Mesh generation error summary<br id="yui_3_16_0_ym19_1_1509004484373_25556">.Error : 0 warnings<br id="yui_3_16_0_ym19_1_1509004484373_25557">.Error : 2 errors<br id="yui_3_16_0_ym19_1_1509004484373_25558">.Error : Check the full log for details<br id="yui_3_16_0_ym19_1_1509004484373_25559">.Error : ------------------------------<br id="yui_3_16_0_ym19_1_1509004484373_25560">Info : Writing 'D:\Work area\Octave\GMSH\how_to_create_throughsection_OPENCASCADE_V06.output'...<br id="yui_3_16_0_ym19_1_1509004484373_25561"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_32233"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_32221">I hope somebody can give me a hand with this,</div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_32236"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_33989">Thanks,</div><div dir="ltr"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_33988">Marco<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_32240"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_28820">PS: I attach the script and the output log just in case unexpected problems happens again.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_28821"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_28822"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1509004484373_23785"><br></div></div></body></html>