[vtkusers] How to cut a hole in polydata?!

Goodwin Lawlor goodwin.lawlor.lists at gmail.com
Sat Mar 17 09:26:31 EDT 2012


Hi Fabian,

Try this method:

  vtkPoints selectionPoints
    selectionPoints InsertNextPoint 1.0 1.0 1.0
# etc...

  vtkSelectPolyData select
    select SetLoop selectionPoints
# connect your data here
    select SetInputConnection [mydataFilter GetOutputPort]
    select GenerateSelectionScalarsOn
    select SetSelectionModeToLargestRegion;

  vtkClipPolyData selectclip
    selectclip SetInputConnection [select GetOutputPort]
    selectclip SetValue 0.0

__________________

Define a loop (your "window") by inserting points into selectionPoints.

Connect your data ("wall") to the input of vtkSelectPolyData.

You can use vtkClipPolyData::InsideOutOn() to change the output from the
"window" to "wall"

hth

Goodwin


On Thu, Mar 15, 2012 at 12:26 PM, Fabian <fabian-richter at gmx.de> wrote:

> Hello advanced vtkusers,
>
> I have some polydata (lets say a plane surface) and would like to cut a
> rectangular hole in it.
> I have read quite a bit about implicit functions and the vtkCutter; but I
> simply don't understand how to use it.
>
> Could You please give me a clue if I am searching in the right direction?
> Do You have better ideas how to cut my polydata? (I dont' mean
> clipping...it
> is more like having a wall and cutting a window-opening).
>
> THANKS IN ADVANCED,
> Fabian
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/How-to-cut-a-hole-in-polydata-tp5567306p5567306.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120317/34850900/attachment.htm>


More information about the vtkusers mailing list