I also tried using wire function which looks better than extrusion but I am unable to fuse two surfaces together to form a single surface
Wire code: SetFactory("OpenCASCADE"); // mesh size description cl_1 = 5; cl_2 = 3.000000e-01; r = 0.5; // Define Segment coordinates X1 ={0,0.000811,0.001097,0.001233,0.00129,0.001325,0.001335,0.001343,0.001346,0.001347,0.001348,0.001348,0.001349,0.001349,0.001349,0.001349,0.001349,0.001349,0.001349,0.0013487}; Y1 ={0,-2.4,-4,-5.6,-7.2,-8.8,-10.4,-12,-13.6,-15.2,-16.8,-18.4,-20,-21.6,-23.2,-24.8,-26.4,-28,-28.96,-29.118}; X2 ={0.0002703,1.276,1.564,1.433,1.302,1.171,1.04,0.9087,0.7122,0.71171}; Y2 ={-0.8,-0.8009,-1.366,-2.351,-3.335,-4.32,-5.305,-6.29,-7.767,-7.7709}; // Define 1 segment LN = 90; nR = #X1[]; p0 = newp; p = p0; For i In {0:nR-1} Point(newp) = {X1[i], Y1[i], 0, cl_2}; EndFor p2 = newp-1; Spline(LN) = {p:p2}; // Define 2 segment LN = 95; nR = #X2[]; p0 = newp; p = p0; For i In {0:nR-1} Point(newp) = {X2[i], Y2[i], 0, cl_2}; EndFor p2 = newp-1; Spline(LN) = {p:p2}; //+ Translate {0, -0.1, 0} { Duplicata { Point{21}; } } //+ Line(96) = {21, 31}; Wire(1) = {95}; Extrude { Line{96}; } Using Wire {1} Translate {0.1, 0.1, 0} { Duplicata { Point{1}; } } Line(101) = {1, 36}; Wire(10) = {90}; Extrude { Line{101}; } Using Wire {10} Mesh.CharacteristicLengthMax = 0.1; BooleanUnion(1000) = { Surface {1}; Delete; }{ Surface {2}; Delete; }; Physical Surface(1) = {1000}; ________________________________ Best Regards, Sathyanarayan Rao, PhD student Earth and Life Institute/Environmental Sciences (ELI-e) Université catholique de Louvain c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium Phone: 010473827 ( intercom 73827) ________________________________ ________________________________ From: Sathyanarayan Rao Sent: 12 February 2018 12:07:49 To: gmsh@onelab.info Subject: Merging two interesting surfaces as one surface Dear Gmsh team, I am trying to transform a set of spline function into thin surfaces that can be given one physical group. I am using extrude function to make these splines to have specific thickness so that it becomes a surface. However the resulting surface from extrude cannot be fused together. My problem in a simplified code: Is there a easy way in gmsh to convert set of splines to become surface with specific thickness ? Kindly let me know ? SetFactory("OpenCASCADE"); // mesh size description cl_1 = 5; cl_2 = 3.000000e-01; r = 0.5; // Define Segment coordinates X1 ={0,0.000811,0.001097,0.001233,0.00129,0.001325,0.001335,0.001343,0.001346,0.001347,0.001348,0.001348,0.001349,0.001349,0.001349,0.001349,0.001349,0.001349,0.001349,0.0013487}; Y1 ={0,-2.4,-4,-5.6,-7.2,-8.8,-10.4,-12,-13.6,-15.2,-16.8,-18.4,-20,-21.6,-23.2,-24.8,-26.4,-28,-28.96,-29.118}; X2 ={0.0002703,1.276,1.564,1.433,1.302,1.171,1.04,0.9087,0.7122,0.71171}; Y2 ={-0.8,-0.8009,-1.366,-2.351,-3.335,-4.32,-5.305,-6.29,-7.767,-7.7709}; // Define 1 segment LN = 90; nR = #X1[]; p0 = newp; p = p0; For i In {0:nR-1} Point(newp) = {X1[i], Y1[i], 0, cl_2}; EndFor p2 = newp-1; Spline(LN) = {p:p2}; Extrude {r, r, 0} { Line{LN};} // Define 2 segment LN = 95; nR = #X2[]; p0 = newp; p = p0; For i In {0:nR-1} Point(newp) = {X2[i], Y2[i], 0, cl_2}; EndFor p2 = newp-1; Spline(LN) = {p:p2}; Extrude {r, r, 0} { Line{LN};} BooleanUnion(100) = { Surface {1}; Delete; }{ Surface {2}; Delete; }; Physical Surface(1) = {100}; ________________________________ Best Regards, Sathyanarayan Rao, PhD student Earth and Life Institute/Environmental Sciences (ELI-e) Université catholique de Louvain c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium Phone: 010473827 ( intercom 73827) ________________________________
_______________________________________________ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh