[vtkusers] Clipping Planes

James Robinson j.robinson at kepler-systems.com
Wed Aug 11 09:27:00 EDT 2004


Dear All,

 

Many thanks for the speed of reply. 

 

John, your point is well taken and I was aware of some strange behaviour
when I did my direct altering of the vtkUnstructuredGrid geometry.

Lisa, your point is in line with what John is suggesting. I had been using
an Update on various things but didn't use (know of) Modified.

Jeff, you hit the nail on the head. Most of my problems were because I was
doing a circuitous fix to a problem that doesn't exist if I use
vtkWarpVector. This is a purpose written filter that achieves essentially
what I want. I implement it as follows:

 

  vtkWarpVector             *pDisplacedGeometry ;

  vtkDataSetMapper          *pDisplacedMeshMapper;

  vtkActor                  *pDisplacedMeshActor;

 

void CSampleDoc::CreateDisplacedActor()

{   

    this->pDisplacedGeometry->SetInput(pUnstructuredGrid) ;

    this->pDisplacedMeshMapper->SetInput(pDisplacedGeometry->GetOutput());

// This doesn't seem to work

            //          this->pDisplacedMeshMapper->ScalarVisibilityOn() ;

    this->pDisplacedMeshActor->SetMapper(this->pDisplacedMeshMapper);

    (this->pDisplacedMeshActor->GetProperty())->SetLineWidth(1.25) ;

    this->pDisplacedMeshActor->GetProperty()->SetRepresentationToWireframe()
;

    this->pDisplacedMeshActor->VisibilityOff();

}

 

Note that I had wanted to display the scalar field on the wire frame
displaced actor, but I can't seem to get it to work. Also, still slight
strange clipping behaviour when I toggle between showing the displaced mesh
and the original (even though I use a:

    GetView()->Renderer->ResetCameraClippingRange() ;

   GetView()->Invalidate() ;

after changing the actor's visibility). Not the end of the world though.

 

Regards,

 

Jim

 

James C Robinson, PhD, Chartered Engineer,

*     42 Rivergrove,

         Glanmire,

         Co. Cork,

         Eire

'     +353 21 4822028

         +353 87 2393010

6      +353 21 4822028

*    j.robinson at kepler-systems.com 

  _____  

From: Lisa Avila [mailto:lisa.avila at kitware.com] 
Sent: 11 August 2004 14:12
To: j.robinson at kepler-systems.com; 'John Biddiscombe'
Cc: Vtk Users
Subject: RE: [vtkusers] Clipping Planes

 

 
Many thanks for replying. I have tried EVERYTHING. I have even tried
reloading all the props into the renderer. I have checked the altered bounds
on everything from the vtkUnstructuredGrid to the vtkPoints* pNodalGeometry.
None of the bounds are altered after the change (which, I would imagine, is
why the resetting of the clip planes has no effect). My workaround is:


If your bounds are not being recomputed, then you are missing a call to
Modified() somewhere - most likely down in your point data. Some of the set
methods are "fast' in that they don't check bounds and they don't call
Modified() - assuming that you will do this once at the end when you are
done with your modifications.

Lisa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040811/70f22766/attachment.htm>


More information about the vtkusers mailing list