scripting genprism | no explicit holes problem

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 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 :wink:

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

Jelle Feringa // EZCT / Paris wrote:

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 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

As far as I understand, a general solution is non-trivial.
I tried something like that in AutoLisp more than ten years ago,
but I'm not sure if the code to that still exists. In any case,
it hat quite a few problems when there were multiple holes in odd
shapes.

But the best solution to this entirely depends on the way your
input data is structured. The more you know about what kinds of
polygons you're going to see, the easier it becomes.

One alternative approach would be to cut the outer polygon apart
instead of keeping it intact. Just sort the corner points of all
the holes eg. vertically, and make a horizontal cut at each
height. You need to be careful to combine equal hights (allow for
some numeric rounding error), and not to cut through tall holes
sitting next to short ones. This method should work particularly
well if the wall and hole polygons are orthogonal to each other,
which happens to often be the case in architectural models.

-schorsch

ยทยทยท

--
Georg Mischler -- simulations developer -- schorsch at schorsch com
+schorsch.com+ -- lighting design tools -- http://www.schorsch.com/