[vtkusers] Grid/polygon intersection (polygon gridding)

Andrea Gavana andrea.gavana at gmail.com
Sun Sep 16 01:15:03 EDT 2018


Dear VTK users,

    I’m a long-time sporadic user of VTK, and no expert at all. I have the
following situation:

1. A 2D, regular (structured) grid of x, y coordinates
2. A series of 2D coordinates defining a polygon (which can be non-convex)

I am trying to find a way to “grid” this polygon, i.e., find all the
coordinates of the points of the grid fully contained in the polygon and,
for grid cells that partially intersect the polygon, to get the coordinates
of the (potentially irregular) shape representing the intersection between
the grid and the polygon.

The aim of all this would then be to get all the 2D cells thus generated
and extend them vertically to create an unstructured grid of polyhedrons.

Does anyone know if there is any facility in VTK to accomplish something
like this?

Alternatively I could also start from a 3D structured grid (with only one
tall cell in the vertical direction) and a single cell polyhedron
representing the polygon (extended vertically by a tiny height so that it’s
all contained in the 3D grid) or vice- versa, a thin 3D structured grid
fully contained in a tall polyhedron representing the polygon in 3D. I
imagine this would be a more difficult problem though...

Any suggestion and hint would be more than appreciated.

Thank you in advance.

Andrea.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180916/6b75a9ac/attachment.html>


More information about the vtkusers mailing list