Panel door holes for panels not showing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2008-02-15 06:55 PM - last edited on 2023-05-24 11:00 AM by Rubia Torres
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
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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2008-02-15 08:02 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2008-02-15 09:41 PM
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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2008-02-15 09:52 PM
...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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2008-02-15 10:18 PM
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
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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2008-02-15 11:15 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2008-02-15 11:50 PM
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2008-02-16 12:20 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2008-02-16 03:00 AM
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
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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2008-02-16 03:40 AM
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