How to script cavity closure/skin turning for doors/windows?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-05-26
05:08 PM
- last edited on
2023-05-24
12:36 PM
by
Rubia Torres
2011-05-26
05:08 PM
I have a bunch of custom doors/windows that I use since ArchiCAD 7 until today with few modifications. They are quite simple, but still answers my needs better than newer and more sophisticate objects, because they are very specific to my scenarios.
Now I'd like to add these 'skin turning' capabilities that I see in the standard library parts, but I'm afraid this is a rather complex task, maybe beyond my GDL knowledge, which I would classify as intermediate.
Does anyone have tried this or know of any wiki, recipe, code snippet or tutorial pointing guidelines to the challenge?
Is it just a matter of fiddling with WALL_SKINS_PARAMS variable to get the fills, pens and dimensions of the skins and then draw them into the 2D script?
Or are there more tricks that I don't know of? For instance, how do I know if the window is placed in a corner, which would modify the 2d drawing of the skins?
In short, any tip regarding this subject would be greatly appreciated.
3 REPLIES 3
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-05-26 09:25 PM
2011-05-26
09:25 PM
I think it is a hudge task.
Doable if you have some free time, but not simple.
Take a look at GDL Technical Standards, and Basic Library Documentation examples, you will understand your pain.
Theorically, it is just a collection of automatical macro calls.
I don't blame GS on this point, doors and windows are (for me) the most complex parts to script.
Thousands of possibiliities into a a single object. A nightmare. I did it once, far from to be perfect, that's enough.
In practice, it is so much complicated, that I don't see any external parts using this feature. May be I'm wrong.
Open a GS part, you will see the complexity. Pity.
Doable if you have some free time, but not simple.
Take a look at GDL Technical Standards, and Basic Library Documentation examples, you will understand your pain.
Theorically, it is just a collection of automatical macro calls.
I don't blame GS on this point, doors and windows are (for me) the most complex parts to script.
Thousands of possibiliities into a a single object. A nightmare. I did it once, far from to be perfect, that's enough.
In practice, it is so much complicated, that I don't see any external parts using this feature. May be I'm wrong.
Open a GS part, you will see the complexity. Pity.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-05-26 11:13 PM
2011-05-26
11:13 PM
Actually, while waiting for a reply to this topic, I did some attempts, and the results made me optimistic.
I do not need to cover all the possibilities. I only need the two most external skins to be turned.
So I scripted two POLY2_B commands, one for the internal skin an another for the external one (then 'MUL2 -1,1' for the other side of the window).
I just read the values for pens and fill from WALL_SKINS_PARAMS [1] to draw the turning skin on the reference side, and WALL_SKINS_PARAMS [WALL_SKINS_NUMBER] to draw the turning skin on the oposite side.
These polys have a trapezoidal format, where the skin thickness is the height of the trapezoid. WALL_THICKNESS and WIDO_SILL are used to calculate the bases of the trapezoid. Have a look at the attached image. The two trapezoids on each side (one for each skin) of the left window are highlighted in green.
I still have to find out a way to tell ArchiCAD what my reference side is. Tried an 'IF WIDO_REVEAL_SIDE' to invert row 1 and row number WALL_SKINS_NUMBER, but it did not work as I expected.
The left window – which I created by doing the second click on the "north" side of the wall – is OK (except from some fine adjustments to the pens). In the right window – created with the second click on the "south" – the skins were inverted.
I do not need to cover all the possibilities. I only need the two most external skins to be turned.
So I scripted two POLY2_B commands, one for the internal skin an another for the external one (then 'MUL2 -1,1' for the other side of the window).
I just read the values for pens and fill from WALL_SKINS_PARAMS [1]
These polys have a trapezoidal format, where the skin thickness is the height of the trapezoid. WALL_THICKNESS and WIDO_SILL are used to calculate the bases of the trapezoid. Have a look at the attached image. The two trapezoids on each side (one for each skin) of the left window are highlighted in green.
I still have to find out a way to tell ArchiCAD what my reference side is. Tried an 'IF WIDO_REVEAL_SIDE' to invert row 1 and row number WALL_SKINS_NUMBER, but it did not work as I expected.
The left window – which I created by doing the second click on the "north" side of the wall – is OK (except from some fine adjustments to the pens). In the right window – created with the second click on the "south" – the skins were inverted.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-05-27 12:23 AM
2011-05-27
12:23 AM
'SYMB_ROTANGLE' can be used instead of 'WIDO_REVEAL_SIDE' to work out the inversion of reference sides.