# Select subregion of 1st grid based on size of 2nd grid using python script

**URL:** https://discourse.paraview.org/t/select-subregion-of-1st-grid-based-on-size-of-2nd-grid-using-python-script/2527
**Category:** ParaView Support
**Created:** [September 9, 2019, 11:08am UTC](https://discourse.paraview.org/t/select-subregion-of-1st-grid-based-on-size-of-2nd-grid-using-python-script/2527 "2019-09-09T11:08:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![joboog](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/8797f3/32.png) [@joboog](https://discourse.paraview.org/u/joboog)
#### Post date: [September 9, 2019, 11:08am UTC](https://discourse.paraview.org/t/select-subregion-of-1st-grid-based-on-size-of-2nd-grid-using-python-script/2527/1 "2019-09-09T11:08:13Z")

</div>

Dear ParaView users,

I have two grids (big, small) that overlay (top in Figure 1).  
I would like to extract a subregion out of the big grid similar as in bottom of Figure 1.  
The subregion should match an axis aligned boundary box of the small grid.  
I did this approximately using the `Clip` filter using the GUI.  
However, I would like to do this automatically using a Python script based on the max and min point coordinates of the small grid.

 ![(top) overlaying grids, (bottom) sub region of big grid clipped to small grid](https://discourse.paraview.org/uploads/default/original/2X/8/8c6e39392971225f64ba8c2734a9f29dad963832.png)

I was not able to extract the point coordinates of the small grid in python (sript and shell) to pass them to the `Clip` filter.  
Within a `ProgrammableFilter` it is easy to access the point coordinates via `input.Points[:,0]`, however, within a `ProgrammableFilter` I was not able to access a `Clip` filter.

How do I access point coordinates in a python script or in the python shell?

Cheers!
