<div dir="ltr"><div>I agree, i'v talk too fast,  there is confusion between pcoord and weights in vtkTriangle, i am correcting it right now and will add a commit and will test thoroughly.<br></div><div>I agree, it became more than a bug fix, but if i could make this old code more coherent it would be nice.<br><br></div><div>I understand what you say about folks depending an this old code, however the vtkTriangle code is not coherent with documentation and the definition of parametric coords in VTK.<br><br></div><div>About the -10 thing, well we should choose an arbitrary value to apply everywhere in in vtkCell for the case when a pcoords cannot be computed and stick to it -10 or -1 is not a problem to me.<br><br></div>I would gladly talk on the phone anytime.<br><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Mathieu Westphal<br></div></div></div>
<br><div class="gmail_quote">On Thu, May 28, 2015 at 2:47 PM, Will Schroeder <span dir="ltr"><<a href="mailto:will.schroeder@kitware.com" target="_blank">will.schroeder@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><br><div class="gmail_quote">On Thu, May 28, 2015 at 8:10 AM, Mathieu Westphal <span dir="ltr"><<a href="mailto:mathieu.westphal@kitware.com" target="_blank">mathieu.westphal@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I do agree about your point, however the current vtkTriangle::evaluatePosition implementation compute r and s in the plane defined by the triangle, using only the projected point to compute them, so they are not isoparametric becau</blockquote></div><br></span>I recommend that you look at the code more carefully. The pcoords[2] value is used later in the code to determine isoparametric coords (the weights[3]) and to determine the closest point in EvaluatePosition. At the conclusion of this computation, you could probably set pcoords[2]=0.0; hopefully you are testing these changes thoroughly (I'm sorry I don't have the time to test at the moment). I'm worried that you are on a path to make somewhat arbitrary changes that go beyond just making a bug fix, there may be folks out there that depend on the current behavior (for example setting value -10 rather than -1).</div><div class="gmail_extra"><br></div><div class="gmail_extra">We may need to get on the phone at some point since this is complex enough that email may not hack it.</div><span class=""><div class="gmail_extra"><br></div><div class="gmail_extra">W<br><br clear="all"><div><br></div>-- <br><div>William J. Schroeder, PhD<br>Kitware, Inc.<br>28 Corporate Drive<br>Clifton Park, NY 12065<br><a href="mailto:will.schroeder@kitware.com" target="_blank">will.schroeder@kitware.com</a><br><a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br><a href="tel:%28518%29%20881-4902" value="+15188814902" target="_blank">(518) 881-4902</a></div>
</div></span></div>
</blockquote></div><br></div>