[vtkusers] (no subject)

Laurent Paul l.paul at uclouvain.be
Thu Sep 23 13:44:20 EDT 2010


Hi all,

I'm a bit lost ...
I want to clip a PolyData using a SuperQuadric. For that purpose, I have created a SuperQuadricSource, I display it on
the screen, move it, validate its positionning and clip the polydata.

First, I can't use the SuperQuadricSource to create a SuperQuadric ImplicitFunction. I thought it would be easy but
there is no possible conversion (or hadn't found it). So, I have found 2 possibilities:
    1) Recreate a SuperQuadric ImplicitFunction using the properties of the source.
    2) Create an ImplicitDataSet from the SuperQuadricSource

My problems:
1) I have to transform the SuperQuadric ImplicitFunction using the SetTransform method provided in the
ImplicitFunction class. I use the same transform than the one that transforms the SuperQuadricSource but the result is
not correct. I have tried a lot of combinations (preTranslate to the origin, rotate and postTranstlate, Set the center
manually...) but I have never managed to obtain the correct orientation for the SuperQuadricImplicitFunction.
2) It is not so easy... I found in the mailing list that I have to triangulate the transformed SuperQuadricSource
using a Delaunay3D, create elevation filter to generate a scalar value for cells (don't really understand why....),
set the result as ImplicitDataSet. This solution works but is very slowly.
A problem with that solution is that I get only the entire cells that lie inside the ImplicitDataSet. How can I get
the clipped cells on the border of the implicitDataSet? Does this behavior happen only when using ImplicitDataSet? I
have never seen that using a clipping plane.

Last question: My original PolyData seems to be bad quality. It has been producted using vtkMarchingCubes,
SmoothPolyData followed by DecimatePro. Do I have to remesh using a triangleFilter or a Delaunay3D?

Many thanks for your reply.
Laurent.






More information about the vtkusers mailing list