[vtkusers] Need help ! (Making our own vtkAppendPolydata )

tutu lamotte tutulamotte at yahoo.com
Sun Sep 28 21:17:28 EDT 2003


Dear list ! 

I am currently trying to implement my own version of
the Execute function of vtkAppendPolydata. The goal is
to make it so that it appends a "newPoly" to an
already existing vtkPolyData instance called "m_base".

We're trying to make this work with a simple demo
application. (Win32Cone.cxx)
A class myVTKApp is created and in the constructor, we
call the member function "make" x times.

For each make execution, a cylinder is produced and we
use the functions "Execute (vtkPolyData *)" to append
it to an already existing polydata
instance...myVTKApp::m_base.


Since our goal is to generate an output simply
by modifying an already existing dataset, we must
Resize
"m_base". I can do that but the MaxID of the points
data
array doesn’t get updated. And this I causing problems
in the function AppendData on line 765 (See
attachment):
<<
        if (src->GetNumberOfTuples() + offset >
                        dest->GetNumberOfTuples())
        {
                return;
        }
>>

GetNumberOfTuples doesn’t look at the size of the
array but the MaxID. And divides it by the number of
components (3).

In all cases, our goal is to get the best possible way
to really append a polydata to an already existing
one.

So we took the 4 functions from vtkAppendPolyData :
  1) Execute
  2) AppendData
  3) AppendDifferentPoints
  4) AppendCells

2, 3 and 4 don't really need to be modified and are
used by Execute.

Thanks !


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Win32Cone.cxx
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030928/482d01f8/attachment.asc>


More information about the vtkusers mailing list