GDL
About building parametric objects with GDL.

Dashed line to indicate cabinet swing interior elevations?

Anonymous
Not applicable
Hi all - I have been researching how to show a dashed line to indicate the cabinet swing on interior elevations and it seems as if Archicad is not able to do this without a 3rd party product? This seems so basic in terms of drafting...just curious if anyone has any solutions? I don’t mind drawing them in but I’m worried if a cabinet changes then it will get messed up on the elevations. If I draw them in is there a way to attach or group the line work to the cabinet so that if the cabinet changes or gets deleted the line work does also? Thank you. U
9 REPLIES 9
Barry Kelly
Moderator
In 3D we only have a 'Solid' line type.
So the trick is to determine the length and angle of that line and then cut it up into smaller lines with gaps.
Something like this should work - you need to determine the start and end for each line and then GOSUB.


line_dash = 0.100
line_gap = 0.050

start_x = 0
start_z = 0
end_x = door_wid
end_z = (door_hgt*0.5)


line_len = SQR((ABS(start_x-end_x))^2 + (ABS(start_z-end_z))^2)
line_ang = ATN(((start_z-end_z))/((start_x-end_x)))

ADD start_x,-0.0001,start_z  !!will sit line slightly in front of door by 0.1mm
ROTy -line_ang
GOSUB 300
DEL 2



END



300: ! Dashed door swing lines
if Showdash=0 then
lin_ 0,0,0,line_len,0,0
goto 301
endif

if Showdash = 1 then
if line_len<(line_dash+line_gap) then
gosub 302
goto 301
endif

Spa_no=int((line_len-line_dash)/(line_dash+line_gap))

If Spa_no<=0 then : Spa_no=1 : endif
for cnta=1 to Spa_no
lin_ 0,0,0,line_dash,0,0
addx (line_len-line_dash)/Spa_no
next cnta
del Spa_no

lin_ line_len-line_dash,0,0,line_len,0,0

endif

301:
return

302: !Short hidden lines
lin_ 0,0,0,(line_len*0.5)-0.008,0,0
lin_ line_len,0,0,(line_len*0.5)+0.008,0,0
return
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Hi Barry - thank you but I think you misunderstood my question. I am wondering how to show door swings on cabinets in my interior elevations which are in 2D - not looking to do it in 3D. Thank you though.
One solution (sorry it isn't free) is to use the Cadimage cabinets, which DO show door swings in 2D elevations. Other than the price, it's actually a pretty good set of objects, although may take a bit of getting used to for U.S. folks with slightly different nomenclature like "upstand" rather than "backsplash."
Richard
--------------------------
Richard Morrison, Architect-Interior Designer
AC26 (since AC6.0), Win10
Anonymous
Not applicable
OK thanks Richard I will look into it. Seems strange that such an easy feature to add isn't included with the cabinets. Is it very common to use 3rd party software with ArchiCAD?
SJPHouse wrote:
Is it very common to use 3rd party software with ArchiCAD?
I don't know if I would call it "very common" to use 3rd party software, but the programs (and there aren't really that many out there) can make your life a lot easier. Many firms stay away from 3rd party programs, because once you commit, you are looking at many upgrades down the road. But there are things that are just SO much easier with Cadimage tools, that it's hard to break away. Curved panel cabinet doors, Spanish tile roofing with gutters and downspouts, keynotes, etc., are all possible without the specialized tools, but they take so much more work doing it all yourself that it seems like a few hundred extra dollars a year is worth it if you are likely to use them.
Richard
--------------------------
Richard Morrison, Architect-Interior Designer
AC26 (since AC6.0), Win10
Anonymous
Not applicable
Thanks Richard I'll check them out
Barry Kelly
Moderator
SJPHouse wrote:
Hi Barry - thank you but I think you misunderstood my question. I am wondering how to show door swings on cabinets in my interior elevations which are in 2D - not looking to do it in 3D. Thank you though.
Your elevation is simply a square on projection of the 3D model.
What you see in 3D is what you will see in elevation.
You will need to script the lines in the 3D script to see them in elevation.
It is possible to script them so they only show in elevation views and not in 3D though based on the view type.

So you either need to script it into your object or find one that already does this (such as Cadimage cabinets).

I am surprised the GS objects don't seem to have this option already.
I don't use them so have never noticed.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
I have also wonder how and if Graphisoft will ever add this option just like the Door/Window opening lines.

Barry, I'm also interested in learning how can you add the dash line to show in Elevations/Sections, 3D view can be an option if needed? Once I learn a bit more I want to aim for learning how to make a universal cabinet in GDL that is given a specific length, you can add division based on length.

Here is an example:
Barry Kelly
Moderator
ArchR wrote:
Barry, I'm also interested in learning how can you add the dash line to show in Elevations/Sections, 3D view can be an option if needed?

It is just a matter of knowing the start and end points of the line and then GOSUBing to the code I showed before.
So as each door on the cabinet is modelled, you GOSUB to the line routine with the correct start and end co-ordinates.
You can use the GLOB_VIEW_TYPE to determine the view the object is in and can turn the line on or off accordingly.

You will need to know a bit about GDL scripting to do all this of course.

ArchR wrote:
Here is an example:

Your image link is not working.
It is best to attach an image with the 'Upload Attachment' tab below the 'Submit' button when you create a post/reply.


Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11