[vtk-developers] Bug with pcoords[2] in vtkQuad::EvaluatePosition()

Mathieu Westphal mathieu.westphal at kitware.com
Thu May 28 08:56:41 EDT 2015


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.
I agree, it became more than a bug fix, but if i could make this old code
more coherent it would be nice.

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.

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.

I would gladly talk on the phone anytime.


Mathieu Westphal

On Thu, May 28, 2015 at 2:47 PM, Will Schroeder <will.schroeder at kitware.com>
wrote:

>
> On Thu, May 28, 2015 at 8:10 AM, Mathieu Westphal <
> mathieu.westphal at kitware.com> wrote:
>
>> 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
>
>
> 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).
>
> We may need to get on the phone at some point since this is complex enough
> that email may not hack it.
>
> W
>
>
> --
> William J. Schroeder, PhD
> Kitware, Inc.
> 28 Corporate Drive
> Clifton Park, NY 12065
> will.schroeder at kitware.com
> http://www.kitware.com
> (518) 881-4902
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150528/80c82420/attachment.html>


More information about the vtk-developers mailing list