[vtkusers] Using GetBounds() for 2-D vtkPolyData
Wei Woo
weiwoo11 at yahoo.com
Sat Apr 21 09:07:57 EDT 2007
Dear friend,
Thank u very much for your reply.I have got the following function in my code.
/*******************************************************************************************************
static void sliceStartPoint(vtkPolyData *pData,double sBoundary[3])
{
double bounds[6] = {0.0,-1.0,0.0,-1.0,0.0,-1.0};
double stPoints[3] = {-1.0,-1.0,-1.0};
pData->GetBounds(bounds);
stPoints[0] = bounds[1];
stPoints[1] = (bounds[2]+bounds[3])/2;
stPoints[2] = (bounds[4]+bounds[5])/2;
.
.
.
}
********************************************************************************************************/
Compilation in Microsoft Visual C++ is ok.But while running the program I see the following error:
vtkDataObject : Error: expression cannot be evaluated
CellData:Expression cannot be evaluated
PointData:Expression cannot be evaluated
My polydata is of zero thickness along y direction and along x-z direction.I cannot solve the problem.It would be great if someone give me any idea.
regards,
Wei.
Dominik Szczerba <domi at vision.ee.ethz.ch> wrote:
You didnt tell us what the problem is. If you force me to gues
s I say you need
to check the bounds, and, if equal in some dimension, separate them by a
small delta.
Dominik
On Saturday 21 April 2007 09:51, Wei Woo wrote:
> Dear friends,
> After slicing, my poly data has become aligned with x-z
> axes.It is just a slice i,e, it does not have any thickness in
> y-direction.When I am using GetBounds() method on that 2-D data I am always
> getting problem in running the program whereas compilation is Ok.Could any
> one suggest how to solve the problem? regards, Wei.
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
--
Dominik Szczerba, PhD
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi
_______________________________________________
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
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070421/6a857abd/attachment.htm>
More information about the vtkusers
mailing list