[vtk-developers] Adding ComputeArea() to vtkTriangle

Berk Geveci berk.geveci at kitware.com
Fri Dec 18 14:15:57 EST 2009


I think Mathieu brings up an important point. I don't think this has
any direct impact on the issue here but it is still a good one. VTK
usually separates computation from the data structures. There is a
good reason behind this. For example, when you are computing the
volume of a polyhedron or performing some other numerical integration
over it, there may be more than one way to do it numerically. Some
more accurate but more costly, others less accurate but faster. This
is why you don't find a lot of computational geometry related methods
on vtkPolyData.

On Fri, Dec 18, 2009 at 11:09 AM, Mathieu Malaterre
<mathieu.malaterre at gmail.com> wrote:
> Ok, my bad. I thought this was introducing a new framework to compute
> 2D area which seem difficult to extend to 3d cell.
>
> thanks for clarification.
>
> On Fri, Dec 18, 2009 at 5:05 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> Mathieu,
>>
>> vtkTriangle is a cell. It is not filter. It currently has a
>> TriangleArea() method, but it is cumbersome to use. David is proposing
>> a convenience method to do the computation. It calls the
>> TriangleArea() method but save the user from setting up the parameters
>> for that call.
>>
>> Bill
>>
>> On Fri, Dec 18, 2009 at 10:54 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
>>> On Fri, Dec 18, 2009 at 10:51 AM, Mathieu Malaterre
>>> <mathieu.malaterre at gmail.com> wrote:
>>>>
>>>> Hi David,
>>>>
>>>>  I do not have a strong opinion on this particular case.
>>>>  However here is a couple of thoughts, I have from my modest
>>>> understanding of VTK.
>>>>  1. I would really separate source/sink from filter. You are writing a
>>>> partial filter (aka algorithm) in a data object.
>>>>  2. You are duplicating (possibly) code from vtkMeshQuality.
>>>>
>>>> 2cts
>>>> -Mathieu
>>>
>>> 1) I'm not sure I follow. Isn't vtkTriangle an "object", not a "source" or
>>> "filter"?
>>> 2) That is likely the case and that is exactly my point here -
>>> vtkMeshQuality (or anything else) should not have to implement this code, it
>>> should just be able to call ComputeArea() on a triangle object.
>>> 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
>>>
>>>
>>>
>> _______________________________________________
>> 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
>>
>>
>
>
>
> --
> Mathieu
> _______________________________________________
> 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
>
>



More information about the vtk-developers mailing list