cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Panel door holes for panels not showing

Erika Epstein
Booster
Hi,
I am writing a script for a multi-panel door. The number of panels can vary. I am able to get all the panels to show up correctly with a FOR NEXT routine, but when I apply this kind of routine to the door panel itself, the holes for the panels are filled in.

This is the script for the door panel
FOR k=1 TO pnlqt !STEP 1
cprism_ intfinmat, extfinmat, sidefinmat,
10, drthk,
-0.5*drwd, 0'-0.0000", 15,
-0.5*drwd, drht, 15,
0.5*drwd, drht, 15,
0.5*drwd, 0'-0.0000", 15,
-0.5*drwd, 0'-0.0000", -1,
-0.5*pwd, brail+(k-1)*irail+(k-1)*pht, 15,
-0.5*pwd, brail+(k-1)*irail+k*pht, 15,
0.5*pwd, brail+(k-1)*irail+k*pht, 15,
0.5*pwd, brail+(k-1)*irail+(k-1)*pht, 15,
-0.5*pwd, brail+(k-1)*irail+(k-1)*pht, -1
NEXT k
brail,srail, trail and irail are the bottom, side, top and intermediate rails

Can someone help with why the holes don't appear as holes? You can see the pen outlining them.

Thanks,
Erika

panel door.jpg
Erika
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System

"Implementing Successful Building Information Modeling"
16 REPLIES 16
Anonymous
Not applicable
Hi Erika,

If I well remember, in the cprism (or any prism) the first and the last node of a hole have to be identical.
Hope it helps.
Erika Epstein
Booster
The first and last lines of the hole are identical, unless I can't see the trees for the forest.
Erika
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System

"Implementing Successful Building Information Modeling"
Anonymous
Not applicable
In your first post the first line/node of the hole is "-0.5*drwd, 0'-0.0000", -1,"
...and the last is "-0.5*pwd, brail+(k-1)*irail+(k-1)*pht, -1"
My suggestion is: add another line/node in the end of the hole with the following "-0.5*drwd, 0'-0.0000", -1"
Erika Epstein
Booster
Braza,
The first line of the HOLE is:
-0.5*pwd, brail+(k-1)*irail+(k-1)*pht, 15,
and so is the last one:
-0.5*pwd, brail+(k-1)*irail+(k-1)*pht, 15,

The first line you noted is the first line of the overall DOOR panel.

Erika
Erika
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System

"Implementing Successful Building Information Modeling"
Anonymous
Not applicable
Sorry Erika... My GDL is a little bit rusty
It seems like there are two coincident prisms...
One with the holes and another one without holes...
Check if there is any junk code in the script... Just a hint.
Anonymous
Not applicable
Erika,

The loop syntax is incorrect.
With some adjustments, you can try this (for example)

yHole = (B - yWid * (nHole + 1)) / nHole
ySpace = yWid + yHole

put -A/2, 0, 15,
-A/2, B, 15,
A/2, B, 15,
A/2, 0, 15,
-A/2, 0, -1

for k = 0 to nHole-1
put -A/2 + xWid, k * ySpace + yWid , 15,
-A/2 + xWid, k * ySpace + yWid + yHole, 15,
A/2 - xWid, k * ySpace + yWid + yHole, 15,
A/2 - xWid, k * ySpace + yWid , 15,
-A/2 + xWid, k * ySpace + yWid , -1
next k

cprism_ mat, mat, mat, nsp/3, height, get(nsp)
Anonymous
Not applicable
Hello Olivier,
Would you agree that the problem with Erika's code is
that with each iteration of the loop the door panel is
drawn again with one hole in different position so the
holes are filled in with the other panels ? The fix is indeed
the code you suggest which draws only one door panel
then "puts" the holes into it.
Alternatively, Erika could draw one door panel and use
a for/next loop to make the holes with a cutpolya command.
Thanks,
Peter
Erika Epstein
Booster
Paolo,
My meager gdl is even rustier than yours! And I did try your added line just in case.
I had made this door with slabs and custom profiles for trim around both sides of each panel. The result was an autoscripted 64 pages of code with more advanced terms than I'd ever seen in an autoscripted part before nevermind having used them. I figured this was my wake-up call to improve my skills.

Olivier & Peter, I am now studying PUT and GET and CUTPOLY terminolgy and your script. Peter you're right about what I did oh-so neatly fill in all the holes I had cut
Thank you for the help

Erika
Erika
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System

"Implementing Successful Building Information Modeling"
Anonymous
Not applicable
Hello Erika,
I am curious why you are not using "A" and "B" for the
width and height of your door panel. Using "A" and "B"
will make the info pallet display the door size correctly.
Peter Devlin