# PGS interpolate need holeless polygon - what it is?

**URL:** <https://discourse.processing.org/t/pgs-interpolate-need-holeless-polygon-what-it-is/34728>\
**Category:** Libraries\
**Created:** [January 19, 2022, 12:57pm UTC](https://discourse.processing.org/t/pgs-interpolate-need-holeless-polygon-what-it-is/34728 "2022-01-19T12:57:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matheplica](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matheplica/32/21035_2.png) [@matheplica](https://discourse.processing.org/u/matheplica)\
**Post date:** [January 19, 2022, 12:57pm UTC](https://discourse.processing.org/t/pgs-interpolate-need-holeless-polygon-what-it-is/34728/1 "2022-01-19T12:57:03Z")

</div>

Hi,  
I’m trying to interpolate between two PShape loaded from SVG.  
I’ve got this error message :

> morph() accepts holeless single polygons only (for now).

I created the svg with inkscape, here’s the files, where is the bug ?

```auto
import micycle.pgs.*;
PShape sh, go, goal;
void setup() {
 size(640, 360, P3D);
 goal = createShape();
 sh = loadShape("one.svg");
 go = loadShape("two.svg");
 sh.disableStyle();
 go.disableStyle();
} 
void draw() {
 goal = PGS_Morphology. interpolate(sh, go, 0.1);
 background(102);
 shape(goal, 0, 0);
}

```

And one of svg :

```auto
<svg width="60.2mm" height="48.1mm" version="1.1" viewBox="0 0 60.2 48.1" xmlns="http://www.w3.org/2000/svg">
 <g transform="translate(-11.7 -10.2)" fill="none" stroke="#000" stroke-width=".265px">
  <path d="m30.6 17.1 12.1-6.71 14.7 11.3 14.5 1.43-0.283 35.1-42.4-1.52-13.2-17.4 13-11z"/>
 </g>
</svg>

```

Thanks

---

<div class="post-metadata">

**Author:** ![micycle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micycle/32/201_2.png) [@micycle](https://discourse.processing.org/u/micycle)\
**Post date:** [January 21, 2022, 12:22pm UTC](https://discourse.processing.org/t/pgs-interpolate-need-holeless-polygon-what-it-is/34728/2 "2022-01-21T12:22:10Z")

</div>

> accepts holeless single polygons only (for now).

Both PShapes need to be single shapes without any holes.

---

<div class="post-metadata">

**Author:** ![matheplica](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matheplica/32/21035_2.png) [@matheplica](https://discourse.processing.org/u/matheplica)\
**Post date:** [January 22, 2022, 10:27am UTC](https://discourse.processing.org/t/pgs-interpolate-need-holeless-polygon-what-it-is/34728/3 "2022-01-22T10:27:33Z")

</div>

Ok, but do you know how to close the path of the svg file here ?  
`<path d="m30.6 17.1 12.1-6.71 14.7 11.3 14.5 1.43-0.283 35.1-42.4-1.52-13.2-17.4 13-11z"/>`  
This path have already a ‘z’ element.
