[vtk-developers] vtkPlane non-static wrappers

Will Schroeder will.schroeder at kitware.com
Tue Feb 2 08:19:48 EST 2010


David-

Looking at the code it seems that vtkPlane::IntersectWithLine assumes a unit
normal.

There are several ways to determine where code is being called/tested from.
Grep works, admittedly brute force but effective. Or use a debugger and set
a break point at a particular function to see where it is invoked. Fancier
methods exist, I'll leave it to the better developers to describe.

While I think it's great that you are considering adding tests, remember
that every test takes time to run, meaning that the developer's time to make
changes, test and check in code increases. Therefore we are optimally
looking for a minimal set of tests (and minimal data) to cover the entire
code base. Several years ago Ken Martin (and others of the community) went
through the exercise of removing extraneous tests and data because it took
way too long to run the test suite.

Will

On Tue, Feb 2, 2010 at 7:28 AM, David Doria
<daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>
> wrote:

> On Mon, Feb 1, 2010 at 10:54 PM, Francois Bertel <
> francois.bertel at kitware.com> wrote:
>
>> That would be more object-oriented for sure. Go for it.
>>
>> Just be careful that you cannot just pass the normal of the object to
>> the static method as I don't see in the documentation of the class any
>> class invariant stating that the magnitude of the normal has to be 1.
>> On the contrary, the static method DistanceToPlane() explicitly has
>> the magnitude of the normal to be 1  as a pre-condition.
>>
>
>
> I did notice that some of them require magnitude 1 normals. The only one I
> plan to add a wrapper for that doesn't mention that is:
>
> static int vtkPlane::IntersectWithLine
>
> *anyone know off the top of their head if this algorithm requires a unit
> normal?*
>
> Also, I was going to add tests for the new functions, but I noticed there
> is not a VTK/Common/Cxx/Testing/TestPlane.cxx. However, the coverage seems
> fine:
>
>
> http://www.cdash.org/CDash/viewCoverageFile.php?buildid=529419&fileid=10953777
>
> Where would this be getting tested from? Should we make a TestPlane.cxx?
>
> Thanks,
>
> David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>


-- 
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://www.vtk.org/pipermail/vtk-developers/attachments/20100202/5f592786/attachment.htm>


More information about the vtk-developers mailing list