[vtkusers] Check if vtkPolyData objects intersect
Maximilian Weiherer
weiherer.maximilian at gmx.de
Fri Jun 9 18:14:46 EDT 2017
vtkSmartPointer<vtkIntersectionPolyDataFilter> checkIntersection = vtkSmartPointer<vtkIntersectionPolyDataFilter>::New();
checkIntersection->SetInputData(0, {vtkPolyData object});
checkIntersection->SetInputConnection(1, sphere->GetOutputPort());
checkIntersection->Update();
if (checkIntersection->GetOutput() == NULL)
{
// no intersection found... do some stuff
}
This is what I have tried so far and that gives me the following warnings/errors:
Generic Warning: In L:\VTK_7_1_1\VTK_7_1_1\Filters\General\vtkIntersectionPolyDataFilter.cxx, line 2507
No Intersection between objects
ERROR: In L:\VTK_7_1_1\VTK_7_1_1\Common\DataModel\vtkPointLocator.cxx, line 876
vtkPointLocator (000002377CF27010): No points to subdivide
-----Ursprüngliche Nachricht-----
Von: Cory Quammen [mailto:cory.quammen at kitware.com]
Gesendet: Samstag, 10. Juni 2017 00:09
An: Maximilian Weiherer <weiherer.maximilian at gmx.de>
Cc: vtkusers at vtk.org
Betreff: Re: [vtkusers] Check if vtkPolyData objects intersect
vtkIntersectionPolyDataFilter should be good when both vtkPolyData contain only triangles. If there is an error message, could you post it here? We should address that. It should be possible to get an empty vtkPolyData result from vtkIntersectionPolyDataFilter that you could check.
More general vtkPolyData-vtkPolyData intersection (poly data with line segments, quads, etc.) is not available in a convenient VTK class that I know of.
On Fri, Jun 9, 2017 at 5:57 PM, Maximilian Weiherer <weiherer.maximilian at gmx.de> wrote:
> Hi all,
>
>
>
> how to check if two vtkPolyData objects intersect? I tried
> vtkIntersectionPolyDataFilter but this gives me an error if no
> intersection is found. What I need is just a boolean value whether or
> not two meshes intersect.
>
>
>
> Any suggestions would be appreciated. Thanks!
>
>
>
>
>
>
> Virenfrei. www.avast.com
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
--
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
More information about the vtkusers
mailing list