[Gmsh] OpenCascase Wire

Sathyanarayan Rao sathyanarayan.rao at uclouvain.be
Fri Mar 2 11:45:29 CET 2018


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 !


// 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)

________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180302/970743c6/attachment.html>


More information about the gmsh mailing list