License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

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

Durval
Enthusiast
I'd appreciate some advice on achieving what is on the title of this topic.
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.
--- www.dtabach.com.br ---
AC 24 BR – MacBook Pro 2,9 GHz Intel Core i7 16GB RAM Mac OS 10.14
3 REPLIES 3
Anonymous
Not applicable
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.
Durval
Enthusiast
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.
--- www.dtabach.com.br ---
AC 24 BR – MacBook Pro 2,9 GHz Intel Core i7 16GB RAM Mac OS 10.14
Durval
Enthusiast
'SYMB_ROTANGLE' can be used instead of 'WIDO_REVEAL_SIDE' to work out the inversion of reference sides.
--- www.dtabach.com.br ---
AC 24 BR – MacBook Pro 2,9 GHz Intel Core i7 16GB RAM Mac OS 10.14