GDL Scripting the Following
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-08-16
05:36 PM
- last edited on
2023-05-24
01:01 PM
by
Rubia Torres
I have been drawing through GDL script to make my custom cabinet doors, but I don't know how to script this.
>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
- Labels:
-
Default Archicad Libraries
-
GDL
-
Library
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-08-17 09:11 PM
If you are thinking of scripting this as a profile to be extruded along a polyline, look into "Additional status codes" in the GDL manual.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-08-17 09:26 PM
>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-08-24 10:32 PM
I attached a screen shot of the problem.
The problem is that when I try and turn a 90 degree turn the outside edges don't form a corner (my script is off a bit so it's not a perfect 90 degree turn, but the problem would still be the same). They instead turn at angles.
>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-08-24 10:35 PM
>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-08-24 10:45 PM
I attached a photo of how far I have gotten. I want to do the intersection tool so I can get the corners. I made the curves out of "PRISM_". I made each curved piece into a separate group. I then try the Intersect Group option and I can never bring the new group into the project. I am not sure what to do. I'll post the code that I have up to the point of it working.
GROUP "RCLeft"
J7=1
R=1
H=3
ADDx R
ADDy -R
!9
PRISM_ 9, H,
-R, R, 15,
COS(180)*R, SIN(180)*R, 64+15,
COS(165)*R, SIN(165)*R, 64+15,
COS(150)*R, SIN(150)*R, 64+15,
COS(135)*R, SIN(135)*R, 64+15,
COS(120)*R, SIN(120)*R, 64+15,
COS(105)*R, SIN(105)*R, 64+15,
COS(90)*R, SIN(90)*R, 64+15,
-R, R, 15
!20
MATERIAL "Mtl-Zinc"
DEL 2
ENDGROUP
GROUP "RCTop"
J7=1
R=1
H=3
ADDx R
ADDy -R
ADDz -R
PRISM_ 9, H,
-R, R, 15,
COS(180)*R, SIN(180)*R, 64+15,
COS(165)*R, SIN(165)*R, 64+15,
COS(150)*R, SIN(150)*R, 64+15,
COS(135)*R, SIN(135)*R, 64+15,
COS(120)*R, SIN(120)*R, 64+15,
COS(105)*R, SIN(105)*R, 64+15,
COS(90)*R, SIN(90)*R, 64+15,
-R, R, 15
DEL 2
ENDGROUP
!45
PLACEGROUP "RCLeft"
ROTy 90
ROTx 270
ADDx -R
PLACEGROUP "RCTop"
DEL 3
!Here's the code that I am having trouble with below.
Corner01=ISECTGROUP{2}("RCTop", "RCLeft")
PLACEGROUP Corner01
KILLGROUP "RCLeft"
KILLGROUP "RCTop"
KILLGROUP "Corner01"
!I can't bring the intersected corner into existence. I would really appreciate
!some help or if anyone can direct me to some information.
>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-08-24 11:40 PM
Check out especially TUBE and TUBEA, and just for the heck of it PUT&GET.
That is if you want to go the way of the tube —with what you already know, it seems to me that you might be able to do what you want by creating a block/prism/whatever and subtracting shapes from it. (I may be getting your overall intent wrong though.)
Also, in case you are fed up with scripting polylines from scratch, check out 'stealing' from Archicad.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-08-24 11:50 PM
Also, I am trying to create shapes using Solid Element Operations (they might be called a little different in GDL, but I can't remember at the moment) and assemble them into the overall form that I want. The model would have to be parametric, so I thought that could be possible with the way I was trying.
>iMac, 27-inch, 2020, Processor: 3.8 GHz 8-Core Intel Core i7, Memory: 64 GB 2667 MHz DDR4, Graphics: AMD Radeon Pro 5500 XT 8 GB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-08-26 01:26 AM
Don't take my word for it... as I haven't tested, but I think you should put your transformations inside group definitions. There's no need to place groups to do operations. Once they are defined, you call them directly to the operations, and they are called in their defined positions. Read the GDL documentation, if I remember correctly, there's an explanation in group definitions regarding transformations and even an example of this.
You're not seeing the result because
1. The geometry of the two initial groups would overlap the result; so just place the groups to check positions.
2. There might be missing parameters in ISECTGROUP{2} <-- version 2 of the ISECTGROUP command.
Another thing you can do, is to look into CUTPLANE. For the type of thing you are trying to do, it'll be far easier to do: in essence, you'll define two cut planes for each piece, and trim an extended piece to 45° at the ends. You could even do it once with some clever scripting and place the result in the required sides.
Hope that helps.
Best regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-08-26 01:42 AM
Try this code to understand. Make a new object and paste in 3D script.
You can play with the transformation variable tr at the beginning. Try 0.75 for example.
tr = 1 GROUP "BLOCK1" BLOCK A, B, ZZYZX ENDGROUP !ADD tr,tr,tr !<-- You can uncomment this and won't have an effect on group definitions, but will do in the general object transformations GROUP "BLOCK2" ADD tr,tr,tr SPHERE A/2 DEL 1 !<--- keep an eye on transformations inside groups ENDGROUP !!This block will place groups in defined positions, and apply a transformation to the sphere group, but won't work for ISECT command. !MODEL WIRE !PLACEGROUP "BLOCK1" !ADD tr,tr,tr !PLACEGROUP "BLOCK2" !DEL 1 MODEL SOLID INTER = ISECTGROUP("BLOCK1", "BLOCK2") PLACEGROUP INTER !!This block will show original groups positions. Comment this to hide groups. MODEL WIRE PLACEGROUP "BLOCK1" PLACEGROUP "BLOCK2"Best regards.