[vtkusers] Clipping multiple actors in scene

Cory Quammen cory.quammen at kitware.com
Mon Oct 10 11:20:46 EDT 2016


Cool! Thanks for reporting your findings back to the list.

Cory

On Tue, Oct 4, 2016 at 3:15 AM, Miorelli, Federico <
Federico.Miorelli at cgg.com> wrote:

> Cory,
>
>
>
> I did some digging and it turns out I can obtain what I want with clipping
> planes applied to actors.
>
>
>
> I have a vtkBoxWidget that controls the position of the 6 clipping planes
> and on every EndInteractionEvent I cycle on the visible actors and call
> SetClippingPlanes on them.
>
>
>
>
>
> Cheers,
>
> Federico
>
>
>
> *______* *______* *______*
>
> Federico Miorelli
>
>
>
> Senior R&D Geophysicist
>
> *Subsurface Imaging - General Geophysics **Italy*
>
>
>
>
>
> *From:* Cory Quammen [mailto:cory.quammen at kitware.com]
> *Sent:* lunedì 3 ottobre 2016 15:04
> *To:* Miorelli, Federico
> *Cc:* vtkusers at vtk.org
> *Subject:* Re: [vtkusers] Clipping multiple actors in scene
>
>
>
> Federico,
>
>
>
> If all your actors will have the same display properties, such as surface
> color or coloring by the same data array, you could group your data sets
> together with vtkMultiBlockDataGroupFilter [1] and then use a single
> vtkClipDataSet on the multiblock data set it produces. If different actors
> have different display properties, I don't believe there is a solution that
> avoids doing it the hard way.
>
>
>
> Alternately, some planar cutting can be done by changing vtkCamera's
> clipping range. This would not require grouping the data sets together.
>
>
>
> HTH,
>
> Cory
>
>
>
>
>
> [1] http://www.vtk.org/doc/nightly/html/classvtkMultiBlockDataGroupFil
> ter.html
>
>
>
> On Mon, Oct 3, 2016 at 6:41 AM, Miorelli, Federico <
> Federico.Miorelli at cgg.com> wrote:
>
> Dear All,
>
>
>
> I have a 3D scene with several actors coming from different sources.
>
> I would like to introduce a global clipping tool to cut with a box or a
> plane all the currently active objects, in order to "see through" the scene.
>
>
>
> I understand I can cut a single dataset with vtkClipDataSet, but I could
> not find a way to do it globally for the scene, except by manually
> iterating on my datasets and doing it the hard way.
>
>
>
> Is there a way to obtain something like this?
>
>
>
>
>
> Thanks,
>
> Regards
>
>
>
>
>
> Federico
>
>
>
> *______* *______* *______*
>
> Federico Miorelli
>
>
>
> Senior R&D Geophysicist
>
> *Subsurface Imaging - General Geophysics **Italy*
>
>
>
>
> *This email and any accompanying attachments are confidential. If you
> received this email by mistake, please delete it from your system. Any
> review, disclosure, copying, distribution, or use of the email by others is
> strictly prohibited.*
>
>
> _______________________________________________
> 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.
>
>
> *This email and any accompanying attachments are confidential. If you
> received this email by mistake, please delete it from your system. Any
> review, disclosure, copying, distribution, or use of the email by others is
> strictly prohibited.*
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161010/5ee2b7a4/attachment.html>


More information about the vtkusers mailing list