We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-10-28 08:11 AM - last edited on 2024-09-24 10:15 AM by Doreena Deng
Hello there. I am searching for the Morph object creation in GDL. I have followed the GDL Reference Guide but there is no specific mention of the Morph object creation or related code. There is only mention of Morph in this section of the guide.
Is there any way to create a morph using GDL?
Thank you.
Solved! Go to Solution.
2022-10-28 10:01 AM - last edited on 2022-11-01 10:32 PM by Laszlo Nagy
There is no MORPH element in GDL. Archicad creates morphs on the fly using primitive GDL elements VERT, VECT, EDGE, PGON & BODY. See GDL Reference guide page 137. This is why morphs are so parametrically dumb, compared to other GDL elements, but it’s pretty cool the way it works. The morph tool is actually Visual GDL deeply integrated into the program, the way Graphisoft used to do things.
Here’s what a simple morph 1.00 x 1.00 x 1.00 cube looks like in GDL:
!!MORPH-002 4D5A6FF6-D314-4C7D-AB62-DF96FA80A543
group "group_C0432EEC_C557_4238_B568_399000C76D26"
pen 3
set building_material " 1e Schematic blue", DEFAULT, DEFAULT
sect_attrs{2} 7, ind(LINE_TYPE,"Solid")
vert{2} 0, 0, 0, 1 ! #1 VertId=0
vert{2} 0, 0, 1, 1 ! #2 VertId=0
vert{2} 0, 1, 0, 1 ! #3 VertId=0
vert{2} 0, 1, 1, 1 ! #4 VertId=0
vert{2} 1, 0, 0, 1 ! #5 VertId=0
vert{2} 1, 0, 1, 1 ! #6 VertId=0
vert{2} 1, 1, 0, 1 ! #7 VertId=0
vert{2} 1, 1, 1, 1 ! #8 VertId=0
pen 3
edge 1, 3, 1, 2, 262144 ! #1 EdgeId=0
edge 1, 2, 2, 5, 262144 ! #2 EdgeId=0
edge 3, 4, 2, 3, 262144 ! #3 EdgeId=0
edge 5, 1, 1, 5, 262144 ! #4 EdgeId=0
edge 2, 6, 5, 6, 262144 ! #5 EdgeId=0
edge 3, 7, 1, 3, 262144 ! #6 EdgeId=0
edge 7, 5, 1, 4, 262144 ! #7 EdgeId=0
edge 5, 6, 4, 5, 262144 ! #8 EdgeId=0
edge 4, 2, 2, 6, 262144 ! #9 EdgeId=0
edge 6, 8, 4, 6, 262144 ! #10 EdgeId=0
edge 7, 8, 3, 4, 262144 ! #11 EdgeId=0
edge 8, 4, 3, 6, 262144 ! #12 EdgeId=0
vect 0, 0, -1 ! #1
vect -1, 0, 0 ! #2
vect 0, 1, 0 ! #3
vect 1, 0, 0 ! #4
vect 0, -1, 0 ! #5
vect 0, 0, 1 ! #6
material " 1d blue"
pgon 4, 1, 2, 1, 6, 7, 4 ! #1 PolyId=0
material " 1d blue"
pgon 4, 2, 2, -1, 2, -9, -3 ! #2 PolyId=0
material " 1d blue"
pgon 4, 3, 2, 3, -12, -11, -6 ! #3 PolyId=0
material " 1d blue"
pgon 4, 4, 2, -7, 11, -10, -8 ! #4 PolyId=0
2022-10-28 08:58 AM
What are you trying to create? If you were looking for something constructed with splines, or nurbs, those are not possible. You can link AC with Grasshopper in Rhino though which can handle nurbs.
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-10-28 10:01 AM - last edited on 2022-11-01 10:32 PM by Laszlo Nagy
There is no MORPH element in GDL. Archicad creates morphs on the fly using primitive GDL elements VERT, VECT, EDGE, PGON & BODY. See GDL Reference guide page 137. This is why morphs are so parametrically dumb, compared to other GDL elements, but it’s pretty cool the way it works. The morph tool is actually Visual GDL deeply integrated into the program, the way Graphisoft used to do things.
Here’s what a simple morph 1.00 x 1.00 x 1.00 cube looks like in GDL:
!!MORPH-002 4D5A6FF6-D314-4C7D-AB62-DF96FA80A543
group "group_C0432EEC_C557_4238_B568_399000C76D26"
pen 3
set building_material " 1e Schematic blue", DEFAULT, DEFAULT
sect_attrs{2} 7, ind(LINE_TYPE,"Solid")
vert{2} 0, 0, 0, 1 ! #1 VertId=0
vert{2} 0, 0, 1, 1 ! #2 VertId=0
vert{2} 0, 1, 0, 1 ! #3 VertId=0
vert{2} 0, 1, 1, 1 ! #4 VertId=0
vert{2} 1, 0, 0, 1 ! #5 VertId=0
vert{2} 1, 0, 1, 1 ! #6 VertId=0
vert{2} 1, 1, 0, 1 ! #7 VertId=0
vert{2} 1, 1, 1, 1 ! #8 VertId=0
pen 3
edge 1, 3, 1, 2, 262144 ! #1 EdgeId=0
edge 1, 2, 2, 5, 262144 ! #2 EdgeId=0
edge 3, 4, 2, 3, 262144 ! #3 EdgeId=0
edge 5, 1, 1, 5, 262144 ! #4 EdgeId=0
edge 2, 6, 5, 6, 262144 ! #5 EdgeId=0
edge 3, 7, 1, 3, 262144 ! #6 EdgeId=0
edge 7, 5, 1, 4, 262144 ! #7 EdgeId=0
edge 5, 6, 4, 5, 262144 ! #8 EdgeId=0
edge 4, 2, 2, 6, 262144 ! #9 EdgeId=0
edge 6, 8, 4, 6, 262144 ! #10 EdgeId=0
edge 7, 8, 3, 4, 262144 ! #11 EdgeId=0
edge 8, 4, 3, 6, 262144 ! #12 EdgeId=0
vect 0, 0, -1 ! #1
vect -1, 0, 0 ! #2
vect 0, 1, 0 ! #3
vect 1, 0, 0 ! #4
vect 0, -1, 0 ! #5
vect 0, 0, 1 ! #6
material " 1d blue"
pgon 4, 1, 2, 1, 6, 7, 4 ! #1 PolyId=0
material " 1d blue"
pgon 4, 2, 2, -1, 2, -9, -3 ! #2 PolyId=0
material " 1d blue"
pgon 4, 3, 2, 3, -12, -11, -6 ! #3 PolyId=0
material " 1d blue"
pgon 4, 4, 2, -7, 11, -10, -8 ! #4 PolyId=0
2022-10-28 10:15 AM
There is no real equivalent to the Morph.
Well, you can use primitives. But doing that by hand and programmatically is probably like the holy grail.
I rather recommend using the different shapes GDL offers and putting together what you need.
(Would be also way easier if you would tell what exactly you're after)
Btw @Lingwisyer: You actually can script NURBS from GDL nowadays!... It's just like primitives on steroids and not really meant to be done by hand, I think. I mean, you could. If one would understand how its done 😅
2022-10-28 10:45 AM
A morph can be absolutely any size and shape so there would be next to no way to script it in GDL.
The closest is NURBS but that would not be easy as mentioned or creating it face by face with TEVE or VERT, EDGE VECT, PGON.
Almost impossible to script yourself.
And even if there was a MORPH command, it wouldn't become a morph, it will still be an object when you place it.
Barry.
2022-10-28 11:25 AM
Ah, so when they added the Grasshopper connection they enabled actual NURBs. I had thought that is was just translating the nurbs to approximations. Now we just need the GDL editor to accept something like Mathjax!
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-11-01 03:22 PM - last edited on 2022-11-07 02:19 PM by Laszlo Nagy
Hello. Can you please help me with this code?
VERT 0.0, 0.0, 0.0 !#1
VERT 1.0, 0.0, 0.0 !#2
VERT 1.0, 1.0, 0.0 !#3
VERT 0.0, 1.0, 0.0 !#4
VERT 0.0, 0.0, 1.0 !#5
VERT 1.0, 0.0, 1.0 !#6
VERT 1.0, 1.0, 1.0 !#7
VERT 0.0, 1.0, 1.0 !#8
EDGE 1, 2, 1, 3, 0 !#1
EDGE 2, 3, 1, 4, 0 !#2
EDGE 3, 4, 1, 5, 0 !#3
EDGE 4, 1, 1, 6, 0 !#4
EDGE 5, 6, 2, 3, 0 !#5
EDGE 6, 7, 2, 4, 0 !#6
EDGE 7, 8, 2, 5, 0 !#7
EDGE 8, 5, 2, 6, 0 !#8
EDGE 1, 5, 6, 3, 0 !#9
EDGE 2, 6, 3, 4, 0 !#10
EDGE 3, 7, 4, 5, 0 !#11
EDGE 4, 8, 5, 6, 0 !#12
VECT 1.0, 0.0, 0.0 !#1
VECT 0.0, 1.0, 0.0 !#2
VECT 0.0, 0.0, 1.0 !#3
PGON 4, -3, 0, -1, -4, -3, -2 !#1 !VERT1,2,3,4
PGON 4, 3, 0, 5, 6, 7, 8 !#2 !VERT5,6,7,8
PGON 4, -2, 0, 1, 10, -5, -9 !#3 !VERT1,2,5,6
PGON 4, 1, 0, 2, 11, -6, -10 !#4 !VERT2,3,6,7
PGON 4, 2, 0, 3, 12, -7, -11 !#5 !VERT3,4,7,8
PGON 4, -1, 0, 4, 9, -8, -12 !#6 !VERT1,4,5,8
1. From GDL ref guide,
EDGE vert1, vert2, pgon1, pgon2, status.
In the above code, the polygons are defined after the edge. And also, how the polygons are defined in the EDGE section here?
2. From the GDL reference guide,
PGON n, vect, status, edge1, edge2, ..., edgen
In the guide, there is no mention of what happens if vect is negative. Is it going to point out in the opposite direction if it's negative?
3. Here,
VECT 1.0, 0.0, 0.0 !#1
VECT 0.0, 1.0, 0.0 !#2
VECT 0.0, 0.0, 1.0 !#3
is it always true for any 3D objects?
Thank you
2022-11-02 01:17 PM - edited 2022-11-02 01:24 PM
2022-11-09 09:08 AM
I didn’t mean to give anyone the impression that I was a GDL guru. I generated that script for a morph cube by dragging a morph from the Archicad 3d window into the 3D script window of a new library object. The GDL script of any Archicad element can be displayed this way. This is always educational and can be a useful trick for creating new GDL library objects.
2024-02-24 09:21 AM - edited 2024-02-26 08:05 AM
I used NURBS commands to create GDL components for curved surface。
can edit the shape of a surface by pulling hotspots。