Check if vtkPolyData objects intersect

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Check if vtkPolyData objects intersect

Maximilian Weiherer

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Check if vtkPolyData objects intersect

Cory Quammen-2
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
<[hidden email]> 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.
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Check if vtkPolyData objects intersect

Maximilian Weiherer
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:[hidden email]]
Gesendet: Samstag, 10. Juni 2017 00:09
An: Maximilian Weiherer <[hidden email]>
Cc: [hidden email]
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 <[hidden email]> 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

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Check if vtkPolyData objects intersect

chiranjibsur
In reply to this post by Maximilian Weiherer
I don't think there is something like this available as a solution. However, this example might help you

If you know the vtk points from your polydata, you will be able to find out if they are inside or outside the region. 

Hope that helps.

Chiranjib

On Fri, Jun 9, 2017 at 11:57 PM, Maximilian Weiherer <[hidden email]> 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



_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Check if vtkPolyData objects intersect

Andras Lasso

We use this collision detection filter. It works well for us.

 

https://github.com/glawlor/vtkbioeng/blob/master/vtkCollisionDetectionFilter.cxx

 

Andras

 

From: vtkusers [mailto:[hidden email]] On Behalf Of Chiranjib Sur
Sent: Thursday, June 22, 2017 6:00 AM
To: Maximilian Weiherer <[hidden email]>
Cc: VTK Users <[hidden email]>
Subject: Re: [vtkusers] Check if vtkPolyData objects intersect

 

I don't think there is something like this available as a solution. However, this example might help you

 

If you know the vtk points from your polydata, you will be able to find out if they are inside or outside the region. 

 

Hope that helps.

 

Chiranjib

 

On Fri, Jun 9, 2017 at 11:57 PM, Maximilian Weiherer <[hidden email]> 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

 


_______________________________________________
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
Loading...