Open Cascade wire behaves differently with different splines
Dear Gmsh team,
I am using wire function to create different surfaces. What I noticed here is, for different lines, the code behaves differently. For example, I consider two cases where I have a set of points. In case 1, I get what I want but in case two, the internal surface by wire command doesn't work although I changed nothing in the code except the distribution points from which the line is created.
Case 1:
X1 ={-0.72813,-0.72683,-0.75863,-0.85403,-0.88583,-0.91763,-0.94943,-0.98123};
Y1 ={-0.69091,-0.57157,-0.55309,-0.49765,-0.47917,-0.46069,-0.44221,-0.42373};
Case 2:
X1 ={0.1001,-0.060661,-0.122,-0.18333,-0.70763,-0.73993,-0.77223,-0.90416,-0.93169,-0.95923};
Y1 ={-0.087195,-0.28886,-0.3148,-0.34073,-0.66163,-0.70263,-0.74363,-0.90176,-0.93099,-0.96023};
Then I use the following code to generate a surface within a surface:
// mesh size description
cl_1 = 2.000000e-01;
cl_2 = 1.000000e-01;
SetFactory("OpenCASCADE");
// boundary points that forms Rhizotron
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 = 1
X[] = X1[];Y[] = Y1[];
d = 9.942868e-02;
//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}
Characteristic Length { PointsOf{ Surface{2};} } = cl_2;
aaa() = BooleanFragments{ Surface {1}; Delete; }{ Surface {2}; Delete; };
The resulting mesh looks :
Why does wire command doesn't work as it worked for case 1? please let me know if this is a bug or my mistake in usage of wire function.