<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_1508825378615_9859">Dear all,</div><div id="yui_3_16_0_ym19_1_1508825378615_9860"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_9861">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.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_9861"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_9861">I'm aware that the command Cylinder will give the same result but I'm really curious about ThruSections...</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_9861"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_9861">My code is as follows:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_9861"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11654">// define constants</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11655">lc0 = 0.0025;</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11656">rd = .0025;</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11657">Mesh.CharacteristicLengthMin = lc0;</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11658">Mesh.CharacteristicLengthMax = lc0;</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11659"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11663">// Create base circle line loop</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11664">base_circle = newl; Circle(newl) = {0,0,0, rd};</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11665">base_circle_ll = newll; Line Loop (newll) = {base_circle};</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11666"><br id="yui_3_16_0_ym19_1_1508825378615_11667"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11668">// Create base circle surface, this will be used to draw the wire connecting upper and base circle</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11669">base_circle_surface = news; Plane Surface (news) = {base_circle_ll};</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11670"><br id="yui_3_16_0_ym19_1_1508825378615_11671"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11672">// Create upper circle line loop</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11673">upper_circle = Translate { 0, 0, .02 } { Duplicata{ Line { base_circle }; }};</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11674">upper_circle_ll = newll; Line Loop (newll) = {upper_circle};</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11675"><br id="yui_3_16_0_ym19_1_1508825378615_11676"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11677">// Create upper circle surface, this will be used to draw the wire connectiong upper and base circle</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11678">upper_circle_surface = news; Plane Surface (news) = {upper_circle_ll};</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11679"><br id="yui_3_16_0_ym19_1_1508825378615_11680"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11681">// Build wire connectiong upper and base circle</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11682">extrac_points() = PointsOf { Surface{ base_circle_surface, upper_circle_surface }; };</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11683">line_cylinder = newl; Line (line_cylinder) = { extrac_points(0), extrac_points(1) };</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11684">wire_cylinder = newl; Wire (wire_cylinder) = { line_cylinder };</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11685"><br id="yui_3_16_0_ym19_1_1508825378615_11686"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11687">// Create ruled surface</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11688">Ruled ThruSections { base_circle_ll, upper_circle_ll, wire_cylinder }</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11688"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11688"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11688"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11688">And the error log can be found here:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11688"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11980">how_to_create_throughsection_OPENCASCADE_V06.c'</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11981">Info : Finalized high order topology of periodic connections</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11982">Info : Meshing 1D...</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11983">Info : Meshing curve 1 (Circle)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11984">Info : Meshing curve 2 (Circle)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11985">Info : Meshing curve 6 (Line)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11986">Info : Meshing curve 7 (Bezier)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11987">Info : Meshing curve 8 (BSpline)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11988">Info : Meshing curve 9 (BSpline)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11989">Info : Done meshing 1D (0.011603 s)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11990">Info : Meshing 2D...</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11991">Info : Meshing surface 3 (Plane, MeshAdapt)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11992">Info : Meshing surface 5 (Plane, MeshAdapt)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11993">Info : Meshing surface 6 (Unknown, MeshAdapt)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11994">Info : 0 points that are duplicated for Delaunay meshing</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11995">Info : Meshing surface 7 (BSpline surface, MeshAdapt)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11996">Error : Could not open file 'debugp.pos'</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11997">Error : Could not open file 'debugr.pos'</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11998">Error : Unable to recover the edge 16 (7/7) on GEdge 2 (on GFace 7)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11999">Error : Could not open file 'wrongmesh.pos'</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12000">Error : Could not open file 'wrongparam.pos'</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12001">Info : Done meshing 2D (0.07397 s)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12002">Info : Meshing 3D...</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12003">Info : Done meshing 3D (7e-06 s)</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12004">Info : 126 vertices 258 elements</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12005">Error : ------------------------------</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12006">Error : Mesh generation error summary</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12007">Error : 0 warnings</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12008">Error : 5 errors</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12009">Error : Check the full log for details</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12010">Error : ------------------------------</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12011"><br id="yui_3_16_0_ym19_1_1508825378615_12012"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12011">Any suggestion on how to make this work is much appreciated.<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12011"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12011">Many thanks,</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12011"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_12011">Marco</div><div dir="ltr" id="yui_3_16_0_ym19_1_1508825378615_11688"><br></div></div></body></html>