> On 2 Mar 2018, at 11:45, Sathyanarayan Rao <[email protected]> > wrote: > > Dear gmsh team, > > I am using wire function to create surfaces but somehow it creates surface > for downward lines (inclined dowward) but for upward line, it doesnt > work: A simple example below. I try to create two surfaces same way for two > set of points: X1,Y1 and X2,Y2 but only for {X1,Y1} it works. > For X2,Y2, I see that no surface is created. Can you please let me know what > is wrong with my code ? I thank you very much ! >
See https://gitlab.onelab.info/gmsh/gmsh/issues/373 : for some reason BRepOffsetAPI_MakePipe failed on this. I changed the pipe creation mode to "GeomFill_IsDiscreteTrihedron", which seems to behave better. If there are some OpenCASCADE gurus reading this, your guidance would be appreciated :-) Christophe > // mesh size description > > cl_1 = 2.000000e-01; > cl_2 = 1.000000e-01; > > SetFactory("OpenCASCADE"); > Rectangle(1) = {-1.100000e+00,-1.100000e+00,0,2.200000e+00,1.200000e+00,0}; > // Mesh Parameters > Mesh.CharacteristicLengthExtendFromBoundary = 1; > Mesh.CharacteristicLengthMax = 1.000000e-01; > > > Geometry.NumSubEdges = 100; > // no. of spline surfaces = 11 > > X1 ={-0.12158,0,0.24363,0.48725,0.73088,0.9745}; > Y1 ={-0.315,-0.2636,-0.3558,-0.448,-0.5402,-0.6324}; > > > X[] = X1[];Y[] = Y1[]; > d = 1.319954e-01; > //Printf("newp=", newp); > P1 = newp; P2 = newp+1;P3 = newl; Point(P1) = > {X[0],Y[0],0,cl_2}; Point(P2) = {X[1],Y[1],0,cl_2}; Line(P3) = {P1,P2}; > > nR = #X[ ];p0 = newp;p = p0; > For i In {1:nR-1} > Point(newp) = {X[i], Y[i], 0, cl_2}; > EndFor > > L1 = newl;L2 = newl+1; p2 = newp-1;Spline(L1) = {p0 : p0 + nR - 2}; > Wire(L2) = {L1};Extrude { Line{P3}; } Using Wire {L2} > > X2 > ={-0.7409,-0.676,-0.7078,-0.7396,-0.7714,-0.8032,-0.835,-0.8668,-0.8986,-0.9304,-0.9622,-0.994}; > Y2 > ={-0.70368,-0.6213,-0.60282,-0.58434,-0.56586,-0.54738,-0.5289,-0.51042,-0.49194,-0.47346,-0.45498,-0.4365}; > > > X[] = X2[];Y[] = Y2[]; > d = 1.048680e-01; > //Printf("newp=", newp); > P1 = newp; P2 = newp+1;P3 = newl; Point(P1) = > {X[0],Y[0],0,cl_2}; Point(P2) = {X[1],Y[1],0,cl_2}; Line(P3) = {P1,P2}; > > nR = #X[ ];p0 = newp;p = p0; > For i In {1:nR-1} > Point(newp) = {X[i], Y[i], 0, cl_2}; > EndFor > L1 = newl;L2 = newl+1; p2 = newp-1;Spline(L1) = {p0 : p0 + nR - 2}; > Wire(L2) = {L1};Extrude { Line{P3}; } Using Wire {L2} > > > > > 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 > [email protected] <mailto:[email protected]> > http://onelab.info/mailman/listinfo/gmsh > <http://onelab.info/mailman/listinfo/gmsh> — Prof. Christophe Geuzaine University of Liege, Electrical Engineering and Computer Science http://www.montefiore.ulg.ac.be/~geuzaine Free software: http://gmsh.info | http://getdp.info | http://onelab.info
_______________________________________________ gmsh mailing list [email protected] http://onelab.info/mailman/listinfo/gmsh
