<div dir="auto">Dear VTK users,</div><div dir="auto"><br></div><div dir="auto">    I’m a long-time sporadic user of VTK, and no expert at all. I have the following situation:</div><div dir="auto"><br></div><div dir="auto">1. A 2D, regular (structured) grid of x, y coordinates</div><div dir="auto">2. A series of 2D coordinates defining a polygon (which can be non-convex)</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">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. </div><div dir="auto"><br></div><div dir="auto">Does anyone know if there is any facility in VTK to accomplish something like this? </div><div dir="auto"><br></div><div dir="auto">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...</div><div dir="auto"><br></div><div dir="auto">Any suggestion and hint would be more than appreciated.</div><div dir="auto"><br></div><div dir="auto">Thank you in advance.</div><div dir="auto"><br></div><div dir="auto">Andrea.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div>