[vtkusers] Inside/Outside test in vtkOBBTree
Carlos Martinez Burgos
cmarbur at iti.upv.es
Wed Sep 26 04:15:38 EDT 2001
Many thanks David.
Yes, of course. Could you send me this code? I think that the C++ code is
not a problem because I could translate to Java. If I can't I could add to
the vtk source tree and recompile. Do you know what is the procedure to do
it?
I don't know what exactly do you mean at the end of the message. Do you
mean that the class don't test if the polydata is closed? This is not a
problem if the algorithm works always in a closed polydata. For this
reason, I would have an algorithm to asure me that the polydata is closed,
to pass its result to the inside/outside test.
Many thanks again.
Carlos.
On Wed, 26 Sep 2001, David Pont wrote:
> Carlos,
> I wrote an "experimental" vtk class some time ago that treats polydata as
> an implicit function. This would allow you to test a point for
> inside/outside. The implementation means that the test will work if the
> polydata is closed or not, which could be a problem for you. I can send you
> the C++ code if you like, but I note you are working in Java.
>
> regards
> Dave Pont
>
> >From: Carlos Martinez Burgos <cmarbur at iti.upv.es>
> >To: VTK User Mailing List <vtkusers at public.kitware.com>
> >Subject: [vtkusers] Inside/Outside test in vtkOBBTree
> >Date: Tue, 25 Sep 2001 13:48:24 +0200 (CEST)
> >
> >Hi.
> >
> >Some days ago I asked to you if is there a method to test if a point is
> >inside a closed polydata. Somebody answered that is there a new method in
> >the vtkOBBTree class to test it.
> >
> >I have tried to build the OBB Tree but I can't get good results. It
> >sometimes works and sometimes not. I first build the OBB Tree and after I
> >generate its representation. I don't get always a representation.
> >
> >I have tried to change the OBBTree parameters like max level and tolerance
> >but no changes. I use this code (in Java):
> >
> >obbTree=new vtkOBBTree();
> >obbTree.SetDataSet(polydata);
> >obbTree.SetMaxLevel(5);
> >obbTree.SetTolerance(0.0001);
> >obbTree.BuildLocator();
> >
> >obb=new vtkPolyData();
> >obbTree.GenerateRepresentation(2,obb);
> >
> >obbMapper=new vtkPolyDataMapper();
> >obbMapper.SetInput(obb);
> >
> >obbActor=new vtkActor();
> >obbActor.SetMapper(obbMapper);
> >obbActor.GetProperty().SetRepresentationToWireframe();
> >obbActor.GetProperty().SetColor(1,0,0);
> >obbActor.PickableOff();
> >
> >I don't know if my mistake is in the code or in the data used. I use
> >polydatas of few triangles, most times simply tetrahedrons. Could this be
> >a problem?
> >
> >
> >Furthermore I want to check if the polydata used is a closed polydata
> >because I'm not sure. Is there a method or a class in VTK to do this?
> >
> >
> >Do you think another method to test if a point is inside a closed
> >polydata?
> >
> >
> >Thanks and sorry for my language mistakes.
> >
> >--
> >----------------------------------------------------------------------
> >Carlos Martínez Burgos | Instituto Tecnológico de Informática
> >Ingeniero Informático | Universidad Politécnica de Valencia
> >Tlf: +34 963877237 | Camí de Vera, S/N
> >cmarbur at iti.upv.es | 46071 Valencia - Spain
> >www.iti.upv.es/~cmarbur | www.iti.upv.es
> >----------------------------------------------------------------------
> >
> >_______________________________________________
> >This is the private VTK discussion list.
> >Please keep messages on-topic. Check the FAQ at:
> ><http://public.kitware.com/cgi-bin/vtkfaq>
> >Follow this link to subscribe/unsubscribe:
> >http://public.kitware.com/mailman/listinfo/vtkusers
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
--
----------------------------------------------------------------------
Carlos Martínez Burgos | Instituto Tecnológico de Informática
Ingeniero Informático | Universidad Politécnica de Valencia
Tlf: +34 963877237 | Camí de Vera, S/N
cmarbur at iti.upv.es | 46071 Valencia - Spain
www.iti.upv.es/~cmarbur | www.iti.upv.es
----------------------------------------------------------------------
More information about the vtkusers
mailing list