[vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata.

Rakesh Patil rakesh.p at tataelxsi.co.in
Wed Jan 13 09:17:20 EST 2016


Hey Cory,

What exactly do you mean by winding order? Is it the order in which the faces are added, or the order in which node points are inserted for each face? My normals are probably facing outside the polydata. I shall confirm it once again. 

Thanks

Rakesh Patil
________________________________________
From: Cory Quammen <cory.quammen at kitware.com>
Sent: Wednesday, January 13, 2016 7:31 PM
To: Rakesh  Patil
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkBooleanOperationPolyDataFilter doesn't work for certain polydata.

Rakesh,

My first guess is to check the winding order of the polygons in your
custom source. My guess is that they are in reverse order of what they
should be.

The reason I suspect a reversal is because the boolean operations
filter looks at the normal for each face to determine whether points
are inside or outside the poly data. If your normals are opposite of
what they should be, which would happen if your winding order is
backwards, that would explain the behavior you see.

HTH,
Cory

On Wed, Jan 13, 2016 at 3:29 AM, Rakesh  Patil <rakesh.p at tataelxsi.co.in> wrote:
> Dear users,
>
>
> I am trying to implement UNION, INTERSECTION & SUBTRACTION operations using
> vtkBooleanOperationPolyDataFilter. I succeeded in performing these
> operations for polydata coming from vtkCubeSource and vtkCylinderSource. I
> have created another class called My3DPolygonSource which is similar to
> vtkRegularPolygonSource, but it computes 'n' sided 3D objects. The polydata
> coming from My3DPolygonSource gives opposite results. i.e. for UNION, it
> produces output of INTERSECTION. For INTERSECION,the output is of UNION, and
> for SUBTRACTION, the output is B-A (actual output should be A-B).
>
>
> I would like to know what are the prerequisite criteria to be considered
> before performing these operations. In which scenarios, the behavior gets
> reversed (as mentioned above)?
>
>
> Thanks
>
> Warm Regards
>
>
> Rakesh Patil
>
>
> _______________________________________________
> 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
R&D Engineer
Kitware, Inc.


More information about the vtkusers mailing list