# scripting genprism | no explicit holes	problem

**URL:** <https://discourse.radiance-online.org/t/scripting-genprism-no-explicit-holes-problem/4238>\
**Category:** radiance-general\
**Created:** [January 6, 2005, 4:22pm UTC](https://discourse.radiance-online.org/t/scripting-genprism-no-explicit-holes-problem/4238 "2005-01-06T16:22:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg\_Ward](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/greg_ward/32/471_2.png) [@Greg\_Ward](https://discourse.radiance-online.org/u/Greg_Ward)\
**Post date:** [January 6, 2005, 4:22pm UTC](https://discourse.radiance-online.org/t/scripting-genprism-no-explicit-holes-problem/4238/1 "2005-01-06T16:22:15Z")

</div>

Maybe I'm being naive, but I've had good luck creating connecting seams between arbitrary vertices in holey polygons. Make sure the outer vertices are in counter-clockwise order around the normal, and the interior (hole) vertices are clockwise. Then, the algorithm goes something like this:

&nbsp;&nbsp;First N vertices are N vertices of outer contour  
&nbsp;&nbsp;&nbsp;&nbsp;Next M1 vertices are M1 vertices of hole 1  
&nbsp;&nbsp;&nbsp;&nbsp;Close hole loop with vertex that is copy of the first hole vertex  
&nbsp;&nbsp;&nbsp;&nbsp;Close seam by adding copy of last outer contour vertex  
&nbsp;&nbsp;&nbsp;&nbsp;Repeat 3 steps above for each hole contour

In Radiance, polygon seams can cross all over each other and it doesn't create any artifacts. This is how fonts are rendered, for example. This is also why I never bothered implementing holes in polygons; I never found where seams caused a problem, and I couldn't think of any way besides seams for implementing holes.

-Greg

> **···**
>
> > From: "Jelle Feringa // EZCT / Paris" \<jelle.feringa@ezct.net\>  
> > Date: January 6, 2005 6:07:03 AM PST
> > 
> > Dear All,
> > 
> > I'm working on a python script which I use to generate polygon description  
> > to describe walls, in order to automate an architectural design process.  
> > (building on the [http://www.dezentral.de/soft/Polygon/index.html](http://www.dezentral.de/soft/Polygon/index.html) module)
> > 
> > Using an excellent library, all my functions are in place... the data is  
> > ready to be shipped to genprism... if it wasn't for No Explicit Holes  
> > Problem
> > 
> > Here you see (simplified) version of a polygon I'd like genprism to produce  
> > a wall from...
> > 
> > [(4.059, 4.0599), (3.939, 4.059), (3.93, 3.93), (4.059, 3.99), (8.0, 0.0),  
> > (0.0, 0.0), (0.0, 8.0), (8.0, 8.0)]
> > 
> > Nothing special, except I need to find a way to produce the Invisible Seams,  
> > since holes aren't supported explicitly.
> > 
> > I'm almost sure some of you have been running into this problem as well, and  
> > so far I haven't been able to find a suitable solution for my problem so far  
> > (I'm learning programming... so please go easy on me 😉
> > 
> > If you're as fortunate as me and also have a copy of the excellent Rendering  
> > with Radiance, this problem is described at page 52 / 145.
> > 
> > #described, there's no suggestion of dealing with the problem...
> > 
> > Your help is appreciated!
> > 
> > Cheers,  
> > Jelle
