Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Incline hedge gdl

Anonymous
Not applicable
So Im not to sure if this can be done but is it possible to change the hedge 20 object so that it inclines with the sloping site I am currently trying to model ?

Im a novice at GDL object parameters so dare not touch it without advise.
6 REPLIES 6
Barry Kelly
Moderator
You won't be able to automate it so it follows your site but you can add ROTx and/or ROTy commands in the 3D script so you can manually input the angle.
You will need separate hedge objects as the angles change.

You could even add moveable hotspots in 3D so you can adjust it visually in the 3D window rather than parameter in the object settings.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Karl Ottenstein
Moderator
If the site slope is uniform and not too large (which could look weird using this approach) - you could try the "skewer" tool that I wrote back in 2004. It would take the hedge object as input, and then you'd specify how you'd like it skewed in the section view... which would basically slope the hedge, while keeping the plant erect. Simply rotating the hedge would have it growing outward at a slope rather than still growing vertically.

The pages I wrote for the draft of David Nicholson-Cole's GDL Cookbook 4 are too large to attach here, but they've been archived by Frank Beister here:
http://www.opengdl.org/Portals/14/OGB-objects/ottenstein/Skewer_and_XFORM.pdf?ver=2009-10-23-093528-...

The object itself is attached and is also here:
http://www.opengdl.org/Default.aspx?tabid=2060

Not sure if this will do the trick for you or not, but maybe...
One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Barry Kelly
Moderator
Karl wrote:
Simply rotating the hedge would have it growing outward at a slope rather than still growing vertically.
This is true - I was trying to keep it simple.
I thought skewing it would have ben a bit more complicated until I looked back at the script.

Actually adding an XFORM command is probably just as easy as adding the ROT commands.

I did this myself in the hedge object (see image attached).

At the beginning of the 3D script add...
XFORM 1, 0, 0, 0,
0, 1, 0, 0,
rake_len_hgt/A, rake_wid_hgt/B, 1, 0

Create 2 parameters.

rake_len_hgt is the height you want to rake along the length of the hedge

rake_wid_hgt is the height you want to rake along the width of the hedge

It really should be a simple as adding that to the beginning of the 3D script.
Save the hedge as a new object with a new name so you don't accidentally replace it if ever the Graphisoft library gets updated.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Barry Kelly
Moderator
If you are using the hedge that has a curved option then place the XFORM command at the beginning of the 3D script for the straight hedge only - not at the very beginning of the script as I said before.

I could not get a satisfactory result to skew the curved hedge.
Besides it dose not use the length and width (A & B parameters) in its code.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Barry,
I've had a look at what you have suggested but Im a total novice so I must be putting the code in incorrectly or in the wrong place as it just gives me an error code when I try
Barry Kelly
Moderator
It seems you have put the XFORM command in the Parameter script.
It needs to go in the 3D script.
You will need to place it at the beginning of the script that creates the straight hedge.
Ideally add a 'DEL 1' at the end of that part of the script for the straight hedge, although this is not absolutely necessary as there will be no more script run after completing the straight hedge so there is no need to undo the transformation.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11