[vtkusers] How to SHRINK a POLYDATA??!!!

Bill Lorensen bill.lorensen at gmail.com
Mon Nov 3 22:37:51 EST 2008


Compute the centroid of the polydata
Use TransformPolyDataFilter with a Transform that Translates to the
centroid, scales and translates back.

The vtkTransform would look something like:

vtkTransformPolyDataFilter *shrinkTransform = vtkTransformPolyDataFilter::New();
shrinkTransform->Translate(cx, cy, cz);
shrinkTransform->Scale(factor,factor,factor);
shrinkTransform->Translate(-cx, -cy, -cz);

On Mon, Nov 3, 2008 at 1:45 PM, Fabio Meneghini <fab.meneghini at gmail.com> wrote:
> well, actually vtkShrinkPolydata only shrinks cells, individually, respect
> to their own centroid. This results in a disconnection of each cells from
> each other.
> It's just a bit far from what I want...
>
>
> 2008/11/2 Bill Lorensen <bill.lorensen at gmail.com>
>>
>> Should be vtkShrinkPolyData
>>
>> On Sat, Nov 1, 2008 at 9:39 PM, Bill Lorensen <bill.lorensen at gmail.com>
>> wrote:
>> > vtkShrinkPolydata
>> >
>> > On Thu, Oct 30, 2008 at 6:09 PM, Fabio Meneghini
>> > <fab.meneghini at gmail.com> wrote:
>> >> Dear All,
>> >> Please don't tell me there's no way to shrink (or possibly enlarge) a
>> >> polydata, around his centroid!
>> >> Please help me!
>> >>
>> >> Fabio Meneghini
>> >>
>> >> _______________________________________________
>> >> This is the private VTK discussion list.
>> >> Please keep messages on-topic. Check the FAQ at:
>> >> http://www.vtk.org/Wiki/VTK_FAQ
>> >> Follow this link to subscribe/unsubscribe:
>> >> http://www.vtk.org/mailman/listinfo/vtkusers
>> >>
>> >>
>> >
>
>



More information about the vtkusers mailing list