<div dir="ltr"><div>Hi there, <br></div><div><br></div><div>I was able to get your script to work using the PointsOf function with the curve to specify the characteristic length. I also was able to directly list the tags in the characteristic length call, but only after removing the 1.0 characteristic length parameter that was the fourth argument to the Point initialization calls. In contrast, PointsOf seems to work even when the length is specified earlier. Perhaps there is a subtle difference somewhere between PointsOf and directly listing tags for this command? I've named the two working cases A (using PointsOf) and B (directly specifying the tags without setting the characteristic length earlier).<br></div><div><br></div><div>Here is the modified script with the other cases commented out in case you'd like to try them: <br></div><div><br></div><div>// -- <br></div><div><br></div><div>SetFactory("OpenCASCADE");<br>Rectangle(1) = {-0.7, -0.2, 0, 1, 0.5, 0.1};<br><br>//------------------------------------------------------------------------------<br><br><br>// case A: specify a value, only to be changed later <br>Point(9) = {-0.39, 0.21, 0, 1.0};<br>Point(10) = {-0.25, 0.14, 0, 1.0};<br>Point(11) = {-0.12, -0.05, 0, 1.0};<br>Point(12) = {-0.03, 0.12, 0, 1.0};<br>Point(13) = {0.14, 0.12, 0, 1.0};<br><br>Spline(9) = {9, 10, 11, 12, 13};<br><br>// works even if the characteristic length was set initialization ^<br>Characteristic Length { PointsOf{ Curve{9}; } } = 0.01;<br><br><br>//------------------------------------------------------------------------------<br><br>/*<br>// case B: don't specify the characteristic lengths <br>Point(9) = {-0.39, 0.21, 0};<br>Point(10) = {-0.25, 0.14, 0};<br>Point(11) = {-0.12, -0.05, 0};<br>Point(12) = {-0.03, 0.12, 0};<br>Point(13) = {0.14, 0.12, 0};<br><br>Spline(9) = {9, 10, 11, 12, 13};<br><br>// only works if the characteristic length wasn't set on initialization<br>Characteristic Length { 9,10,11,12,13 } = 0.01;<br>*/<br><br>// maybe a subtle difference between PointsOf and directly specifying tags?<br><br>//------------------------------------------------------------------------------<br><br>/*<br>// case C: specify the characteristic lengths then use the tags directly <br>// DOESN'T WORK <br>Point(9) = {-0.39, 0.21, 0, 1.0};<br>Point(10) = {-0.25, 0.14, 0, 1.0};<br>Point(11) = {-0.12, -0.05, 0, 1.0};<br>Point(12) = {-0.03, 0.12, 0, 1.0};<br>Point(13) = {0.14, 0.12, 0, 1.0};<br><br>Spline(9) = {9, 10, 11, 12, 13};<br><br>// only works if the characteristic length wasn't set on initialization<br>Characteristic Length { 9,10,11,12,13 } = 0.01;<br>*/<br><br>//------------------------------------------------------------------------------<br><br>BooleanFragments{ Surface{1}; Delete; }{ Curve{9}; Delete; }<br><br></div><div>// -- <br></div><div><br></div><div>This probably wasn't your issue, but I had also forgotten about setting a minimum characteristic length option, which stopped me from manually setting the characteristic lengths at first. <br></div><div><br></div><div>Sincerely,</div><div>Max <br></div><div><br></div><div>p.s. here are pictures of each case: <br></div><div><br></div><div>Case A: <br></div><div>
<img src="cid:ii_jxnitz2o0" alt="image.png" width="475" height="249"> <br></div><div><br></div><div>Case B (looks the same as Case A to me): <br></div><div><div><img src="cid:ii_jxniymio2" alt="image.png" width="475" height="253"><br></div></div><div><br></div><div>Case C (broken): <br></div><div><div><img src="cid:ii_jxnix0p41" alt="image.png" width="475" height="249"><br></div></div><div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 3, 2019 at 12:30 PM Karin&NiKo <<a href="mailto:niko.karin@gmail.com">niko.karin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear Gmsh Gurus,</div><div><br></div><div>I would like to define a 1D crack in a planar surface. To this end, I use the attached script. <br></div><div>1. When I specify the mesh size at the curve point *in the script* and then load the script, it does not work aka the mesh haven't the right size</div><div>2. When I load the script and then specify the mesh size at the curve point *in the GUI*, it works (and it is beautiful!)</div><div><br></div><div>Am I missing something? Is it a bug (NO????)?</div><div><br></div><div>Thanks in advance,</div><div>Your oldest fan<br></div></div>
_______________________________________________<br>
gmsh mailing list<br>
<a href="mailto:gmsh@onelab.info" target="_blank">gmsh@onelab.info</a><br>
<a href="http://onelab.info/mailman/listinfo/gmsh" rel="noreferrer" target="_blank">http://onelab.info/mailman/listinfo/gmsh</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Max Orok</div><div>Contractor<br></div></div><div dir="ltr"><a href="http://www.mevex.com" target="_blank">www.mevex.com</a><br><br><img src="https://docs.google.com/uc?export=download&id=1fHTIiW4OMUjQr1iOkspQ7wiEsxunoOs0&revid=0B6x5w-5zVaEjSkpwbm5oY29jbG1XMzJoYldXTmJpNGFtb3dVPQ" width="164" height="42"><br></div></div></div></div></div></div>