[vtkusers] Merging two Unstructured Grids / Surfaces

David Doria daviddoria+vtk at gmail.com
Tue Mar 2 18:13:58 EST 2010


On Tue, Mar 2, 2010 at 1:31 PM, Eric E. Monson <emonson at cs.duke.edu> wrote:

> Well, this isn't perfect, but here's a slightly modified example (sorry,
> this time in python) which clips the sphere with the cube. You need _some_
> scalars associated with the geometry used for the implicit function, and the
> evaluation of what is inside and what is outside the shape only really works
> if the shape used for the implicit function has 3D cells (not just polygonal
> cells on the surface), so I used vtkDelaunay3D to create these cells in the
> cube. This might not work well if the shape you're clipping with isn't
> convex...
>
> http://www.vtk.org/Wiki/VTK/Examples/Python/vtkImplicitDataSet
>
> You can see from the screen shot there that cells on the sphere aren't
> split by the clip.
>
> Hope this gets you a little further. It still may be worth checking out GTS
> for real boolean operations if someone else doesn't have a cleaner way of
> doing the same within VTK.
>
> -Eric
>

Here it is in c++:
http://www.vtk.org/Wiki/VTK/Examples/ImplicitDataSet

The higher the resolution of your model, the less these artifacts
are noticeable.

Eric - can you explain in a bit more detail what the scalars from the
elevation filter do? For example, could we just use all 1's in an array in
PointData?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100302/dd1e68af/attachment.htm>


More information about the vtkusers mailing list