# static fucntion DistanceToPolygon not working

**URL:** https://discourse.vtk.org/t/static-fucntion-distancetopolygon-not-working/8175
**Category:** Support
**Created:** [March 30, 2022, 9:30am UTC](https://discourse.vtk.org/t/static-fucntion-distancetopolygon-not-working/8175 "2022-03-30T09:30:33Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![RAUMIK\_RANA](https://discourse.vtk.org/user_avatar/discourse.vtk.org/raumik_rana/32/3338_2.png) [@RAUMIK\_RANA](https://discourse.vtk.org/u/RAUMIK_RANA)
#### Post date: [March 30, 2022, 9:30am UTC](https://discourse.vtk.org/t/static-fucntion-distancetopolygon-not-working/8175/1 "2022-03-30T09:30:33Z")

</div>

I tried to find distance between point to polygon with static function “DistanceToPolygon”

As per documentation 3rd argument should be points which I assumed list of tuples which contain xyz.  
[https://vtk.org/doc/nightly/html/classvtkPolygon.html#a62b623f284a7fb01894fb2b8df8e85da](https://vtk.org/doc/nightly/html/classvtkPolygon.html#a62b623f284a7fb01894fb2b8df8e85da)

But giving me error  
DistanceToPolygon argument 3: must be real number, not tuple

---

<div class="post-metadata">

### Author: ![Yohann\_Bearzi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yohann_bearzi/32/671_2.png) [@Yohann\_Bearzi](https://discourse.vtk.org/u/Yohann_Bearzi)
#### Post date: [March 30, 2022, 2:08pm UTC](https://discourse.vtk.org/t/static-fucntion-distancetopolygon-not-working/8175/2 "2022-03-30T14:08:10Z")

</div>

What are you providing as a third argument? A `double*`?
