<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:'Times New Roman',Times,serif;" dir="ltr">
<p>Hello,</p>
<p><br>
</p>
<p>Is it possible to find largest surface number contained in an entity ?</p>
<p>For example , if I have </p>
<p><br>
</p>
<p></p>
<div>aaa() = BooleanFragments{ Surface {1}; Delete; }{ Surface {aa()}; Delete; };</div>
<div><br>
</div>
The resulting surfaces in aaa() , usually the last surface number is the one I need and is there a way to find it ?
<p></p>
<p><br>
</p>
<p>However, if I print ------------------------- > <span>Printf("news=",news);</span></p>
<p><br>
</p>
<p>It doesnt give me the last surface number of aaa(). In the above BooleanFragment, surface 1 is the largest surface with</p>
<p>smaller surfaces within it. However, in aaa(), the surface 1 gets mapped to aaa(largest number). </p>
<p><br>
</p>
<p>For example in the .geo code, surface 50 is the one I need to find it automatically. Please let me know if there is a way ?</p>
<p><br>
</p>
<p></p>
<div><br>
</div>
<div>// mesh size description</div>
<div><br>
</div>
<div>cl_1   =  2.000000e-01;</div>
<div>cl_2   =  5.000000e-02;</div>
<div><br>
</div>
<div>SetFactory("OpenCASCADE");</div>
<div>// boundary points that forms Rhizotron</div>
<div>Rectangle(1) = {-1.100000e+00,-1.100000e+00,0,2.200000e+00,1.100000e+00,0};</div>
<div>// Mesh Parameters</div>
<div>Mesh.CharacteristicLengthExtendFromBoundary = 1;</div>
<div>Mesh.CharacteristicLengthMax = 2.000000e-01;</div>
<div><br>
</div>
<div><br>
</div>
<div>Geometry.NumSubEdges = 100;</div>
<div>// no. of spline surfaces = 7</div>
<div><br>
</div>
<div>X1 ={0.14522,0.045787,0.045787,0.045787,-0.015546,-0.076883,-0.13821,-0.30221,-0.46621,-0.63021,-0.66251,-0.69481,-0.72711,-0.76191,-0.79671,-0.83151,-0.85905,-0.88658,-0.91411};</div>
<div>Y1 ={-0.04208,-0.04208,-0.12994,-0.21781,-0.24374,-0.26968,-0.29561,-0.38891,-0.48221,-0.57551,-0.61651,-0.65751,-0.69851,-0.74148,-0.78445,-0.82741,-0.85665,-0.88588,-0.91511};</div>
<div><br>
</div>
<div><br>
</div>
<div>X[] = X1[];Y[] = Y1[];</div>
<div>d = 9.942868e-02;</div>
<div>//Printf("newp=", newp);</div>
<div>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};</div>
<div><br>
</div>
<div>nR = #X[ ];p0  =  newp;p   =  p0;</div>
<div>For i In {1:nR-1}</div>
<div>Point(newp)  =    {X[i], Y[i], 0, cl_2};</div>
<div>EndFor</div>
<div><br>
</div>
<div>L1 = newl;L2 = newl+1; p2  =  newp-1;Spline(L1)   =  {p0 : p0 + nR - 2}; Wire(L2) = {L1};Extrude { Line{P3}; } Using Wire {L2}</div>
<div><br>
</div>
<div>X2 ={-0.05197,0.03961,0.1224,0.20519,0.28797,0.37076,0.45355};</div>
<div>Y2 ={-0.26271,-0.22399,-0.35629,-0.48859,-0.62089,-0.75319,-0.88549};</div>
<div><br>
</div>
<div><br>
</div>
<div>X[] = X2[];Y[] = Y2[];</div>
<div>d = 9.942868e-02;</div>
<div>//Printf("newp=", newp);</div>
<div>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};</div>
<div><br>
</div>
<div>nR = #X[ ];p0  =  newp;p   =  p0;</div>
<div>For i In {1:nR-1}</div>
<div>Point(newp)  =    {X[i], Y[i], 0, cl_2};</div>
<div>EndFor</div>
<div><br>
</div>
<div>L1 = newl;L2 = newl+1; p2  =  newp-1;Spline(L1)   =  {p0 : p0 + nR - 2}; Wire(L2) = {L1};Extrude { Line{P3}; } Using Wire {L2}</div>
<div><br>
</div>
<div>X3 ={-0.043606,0.047975,0.26057,0.47317,0.68577};</div>
<div>Y3 ={-0.25434,-0.21563,-0.40098,-0.58633,-0.77168};</div>
<div><br>
</div>
<div><br>
</div>
<div>X[] = X3[];Y[] = Y3[];</div>
<div>d = 9.942868e-02;</div>
<div>//Printf("newp=", newp);</div>
<div>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};</div>
<div><br>
</div>
<div>nR = #X[ ];p0  =  newp;p   =  p0;</div>
<div>For i In {1:nR-1}</div>
<div>Point(newp)  =    {X[i], Y[i], 0, cl_2};</div>
<div>EndFor</div>
<div><br>
</div>
<div>L1 = newl;L2 = newl+1; p2  =  newp-1;Spline(L1)   =  {p0 : p0 + nR - 2}; Wire(L2) = {L1};Extrude { Line{P3}; } Using Wire {L2}</div>
<div><br>
</div>
<div>X4 ={-0.078759,0.032787,0.16553,0.29827,0.43101,0.56375};</div>
<div>Y4 ={-0.27797,-0.23081,-0.38589,-0.54097,-0.69605,-0.85113};</div>
<div><br>
</div>
<div><br>
</div>
<div>X[] = X4[];Y[] = Y4[];</div>
<div>d = 1.211050e-01;</div>
<div>//Printf("newp=", newp);</div>
<div>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};</div>
<div><br>
</div>
<div>nR = #X[ ];p0  =  newp;p   =  p0;</div>
<div>For i In {1:nR-1}</div>
<div>Point(newp)  =    {X[i], Y[i], 0, cl_2};</div>
<div>EndFor</div>
<div><br>
</div>
<div>L1 = newl;L2 = newl+1; p2  =  newp-1;Spline(L1)   =  {p0 : p0 + nR - 2}; Wire(L2) = {L1};Extrude { Line{P3}; } Using Wire {L2}</div>
<div><br>
</div>
<div>X5 ={-0.10976,0.0017856,0.041831,0.081876,0.12192,0.16197,0.20201,0.24206,0.2821};</div>
<div>Y5 ={-0.30897,-0.26181,-0.35576,-0.44971,-0.54365,-0.6376,-0.73154,-0.82549,-0.91943};</div>
<div><br>
</div>
<div><br>
</div>
<div>X[] = X5[];Y[] = Y5[];</div>
<div>d = 1.211050e-01;</div>
<div>//Printf("newp=", newp);</div>
<div>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};</div>
<div><br>
</div>
<div>nR = #X[ ];p0  =  newp;p   =  p0;</div>
<div>For i In {1:nR-1}</div>
<div>Point(newp)  =    {X[i], Y[i], 0, cl_2};</div>
<div>EndFor</div>
<div><br>
</div>
<div>L1 = newl;L2 = newl+1; p2  =  newp-1;Spline(L1)   =  {p0 : p0 + nR - 2}; Wire(L2) = {L1};Extrude { Line{P3}; } Using Wire {L2}</div>
<div><br>
</div>
<div>X6 ={-0.069089,0.042456,0.11646,0.19046,0.26446,0.33846,0.41246};</div>
<div>Y6 ={-0.2683,-0.22114,-0.35382,-0.48649,-0.61917,-0.75184,-0.88452};</div>
<div><br>
</div>
<div><br>
</div>
<div>X[] = X6[];Y[] = Y6[];</div>
<div>d = 1.211050e-01;</div>
<div>//Printf("newp=", newp);</div>
<div>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};</div>
<div><br>
</div>
<div>nR = #X[ ];p0  =  newp;p   =  p0;</div>
<div>For i In {1:nR-1}</div>
<div>Point(newp)  =    {X[i], Y[i], 0, cl_2};</div>
<div>EndFor</div>
<div><br>
</div>
<div>L1 = newl;L2 = newl+1; p2  =  newp-1;Spline(L1)   =  {p0 : p0 + nR - 2}; Wire(L2) = {L1};Extrude { Line{P3}; } Using Wire {L2}</div>
<div><br>
</div>
<div>X7 ={-0.24535,-0.1373,-0.090537,-0.043773,0.0029906,0.049754,0.096518,0.14328};</div>
<div>Y7 ={-0.35617,-0.2947,-0.3903,-0.4859,-0.5815,-0.6771,-0.7727,-0.8683};</div>
<div><br>
</div>
<div><br>
</div>
<div>X[] = X7[];Y[] = Y7[];</div>
<div>d = 1.243110e-01;</div>
<div>//Printf("newp=", newp);</div>
<div>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};</div>
<div><br>
</div>
<div>nR = #X[ ];p0  =  newp;p   =  p0;</div>
<div>For i In {1:nR-1}</div>
<div>Point(newp)  =    {X[i], Y[i], 0, cl_2};</div>
<div>EndFor</div>
<div><br>
</div>
<div>L1 = newl;L2 = newl+1; p2  =  newp-1;Spline(L1)   =  {p0 : p0 + nR - 2}; Wire(L2) = {L1};Extrude { Line{P3}; } Using Wire {L2}</div>
<div>aa() = BooleanUnion{ Surface {2}; Delete; }{ Surface {3:7}; Delete; };</div>
<div>Characteristic Length { PointsOf{ Surface{aa()}; } } = cl_2; </div>
<div>aaa() = BooleanFragments{ Surface {1}; Delete; }{ Surface {aa()}; Delete; };</div>
<div><br>
</div>
<div>Printf("news=",news);</div>
<br>
<p></p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif" color="#0000ff"><br>
</font></div>
<div name="divtagdefaultwrapper" style="margin:0px">
<hr>
</div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif">Best Regards,</font></div>
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif"><br>
</font></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif">Sathyanarayan Rao, PhD student</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif; background-color:rgb(255,255,255); white-space:pre-wrap">Earth and Life Institute/Environmental Sciences (ELI-e)</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="background-color:rgb(255,255,255); font-family:"Times New Roman",Times,serif; white-space:pre-wrap">Université catholique de Louvain</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif; white-space:pre-wrap; background-color:rgb(255,255,255)">c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="background-color:rgb(255,255,255); white-space:pre-wrap">Phone: 010473827 ( intercom 73827)</span></div>
</blockquote>
<div name="divtagdefaultwrapper" style="margin:0px">
<div>
<pre cols="72" style="white-space:pre-wrap; background-color:rgb(255,255,255)"><hr></pre>
</div>
</div>
</div>
</div>
</div>
</body>
</html>