Design forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Profiles in GDL

Hmooslechner
Advocate
Has anyone explored the new possibilities to implement profiles in GDL? The GDL-book does just announce it, but there is not a single example how to to it!?!

the same in:

gdl.graphisoft.com/new-features-guide/new-gdl-features-in-archicad-21
AC5.5-AC25EduAut, PC-Win10, MacbookAirM1
20 REPLIES 20

Hi,

I was experimenting with it. Works nicely - under the hood the request gets the perimeters (+surfaces of the edges) of all parts of the profile one by one and they could be put to almost all poliline driven commands (for full option the ones with the Material option defined for the faces).
The Tube command has its new version allowing the holes as the other commands as well.

I can send You an example object so you could sniff around

Best Regards,
Piotr

Laszlo Nagy
Community Admin
Community Admin
You can check the default content for many of the Stair and Railing component types because many of them use Profiles. It could give you some ideas of how they should be implemented.
....................................................................................................
Laszlo Nagy, Lead Moderator, Community Admin
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, NVidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Hmooslechner
Advocate
Thanks, Piotr Dobrowolski! Yes - i am very interrsted in Your code-samples.

To laszlonagy: I have spent just some time to look for it in the stair-components, but i didnt find it yet (so fast). - also, because its hidden in the subroutines in some external GDLs..

Why is it so hard for Graphisoft to create a "clean documentation" about such an overwhelming progress? Thats really hard to understand..

It seems that Graphisoft is trying to make it "as hard as possible" for little developers like me to understand their GDL-inventions...


Besides that - the new stair and railingtool is really an eye-opener! Thats very near to what i wished for Archicad for the last decade!
AC5.5-AC25EduAut, PC-Win10, MacbookAirM1

Laszlo Nagy
Community Admin
Community Admin
Hmooslechner,

Use the "Open Object by Subtype" command of the "Edit GDL Library parts" Toolbar. Then open the following subtype:

General GDL Object>Model Element>Building Element>Design Stair>Stair 3D Component>Tread Component>Profiled Tread 21

The 3D Script of "Profiled Tread 21" object contains an example for the use of Profiles. Search for this section of the Script:
"getUserDefProfile":
There you will see that there are multiple REQUEST commands that request data about the Profile and its geometry defined in the Profile Manager. Commands like

REQUEST{2} ("Profile_components"...
REQUEST ("Profile_default_geometry"...
REQUEST{3} ("Profile_component_info"...
For additional examples you can check any of those Stair or Railing subtypes that have "Profiled" in the name.

But I agree with you, some additional info would be very beneficial.
....................................................................................................
Laszlo Nagy, Lead Moderator, Community Admin
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, NVidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Hmooslechner
Advocate
Thanks to both of You - thats "the gate" i was looking for!
AC5.5-AC25EduAut, PC-Win10, MacbookAirM1

jp
Newcomer
Sad to say I'm still a little lost/disappointed after looking at the examples. I was hoping that when Graphisoft said the commands were upgraded to support profiles, that you would just drop a reference to ProfileID in the Tube command or whatever you are using to get the base polyline info. That would be a slick trick and I realize a lot of work for Graphisoft.

But given what they have provided, I'm still unclear as to how to get the geometry and put into a Tube or Tube{2}. If you have a simple code example that works, I would be most appreciative to have a look.
Many Thanks, JP

John Peterson, AIA
Dalgliesh Gilpin Paxton Architects
Archicad 7-21 US
PC and iMac

jp:

Here is an example from Graphisoft with some comments in the script windows.

You should update your Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC24 USA • iMac 27" 4.0GHz Quad-core i7 | 24 gb ram • MacBook Pro 2.8GHz | 16 gb ram • OSX10.14.6

jp
Newcomer
Awesome! Thank you David
Many Thanks, JP

John Peterson, AIA
Dalgliesh Gilpin Paxton Architects
Archicad 7-21 US
PC and iMac

lukaso
Participant
Has anyone tried to put a second or third Profile into the "profile_with_tube" script?
Sorry don't know which parameters need to be doubled.
I tried ..for i to ---next i and changing the Profile...it just overwrites the surfaces...
Also a Gosub doesn't work that easy.....

Would be great if anyone could help....
Working on a window with a custom framing Element...
Mac OSX - up to date
Archicad 6 to 22

Barry Kelly
Moderator
lukaso wrote:
Has anyone tried to put a second or third Profile into the "profile_with_tube" script?

A TUBE can only contain one profile.
It has two parts - the profile and the path.

So you either need completely new TUBE commands for each profile.
Or use "PUT" to store the profile points.
i.e. if profile 1 PUT ....
if profile 2 PUT ....
etc.

Then in the tube command "GET" the profile points, and set the path.

This way you only have the one TUBE command using the same path, but you can swap the different profiles.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

lukaso
Participant
Thanx Berry,

I'll give it a try

Lukas
Mac OSX - up to date
Archicad 6 to 22

Pertti P__sky
Newcomer
Looks like You can't save profiles' parameters to a parameter tab.
- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.

Barry Kelly
Moderator
Pertti wrote:
Looks like You can't save profiles' parameters to a parameter tab.
I'm not quite sure what you mean.
All of the profile properties are save in the attribute for that profile.
If you need to change it then you need to edit it (or duplicate and change it) in the Profile Manager.

What is it about the profile that you are trying to save?

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Lingwisyer
Virtuoso
Can you interact with the Profiles stretch regions?


Ling.
AC18-23 AUS 7000
Self-taught, bend it till it breaks.
Win10 | E5620 x 2 | 24GB | K2200

Barry Kelly
Moderator
Lingwisyer wrote:
Can you interact with the Profiles stretch regions?


Ling.
The overall height and width - yes.
The profile (and stretch regions) should behave exactly the same as if you were manually using the profile.

As for the new profile modifiers in 22, I don't believe these can be accessed via GDL.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Lingwisyer
Virtuoso
Barry wrote:
Lingwisyer wrote:
Can you interact with the Profiles stretch regions?

The overall height and width - yes.
The profile (and stretch regions) should behave exactly the same as if you were manually using the profile.

I have not been able to find out how to achieve this...



Ling.
AC18-23 AUS 7000
Self-taught, bend it till it breaks.
Win10 | E5620 x 2 | 24GB | K2200

Barry Kelly
Moderator
Lingwisyer wrote:
I have not been able to find out how to achieve this...
I haven't created my own profiled objects from scratch yet, and I assumed you could specify an overall height and width of the profile you want to use.
I was a bit wrong there.

Have a look at the profiled rail object.
This allows you to use any profile for the rail and set the overall size and width you want it to be.

It seems that you have to come up with a scaling factor based on the actual profile height (which I am sure you can get from the profile requests) and the size you want to use.
Here is a sample bit of the profile rail script showing a few pre-defined profiles.

if abs(iProfile) = PROFILE_WOOD1 then
													! mirroring irrelevant
													! script coordinates relative to top middle
	xFactor = wProfile / 0.074
	yFactor = hProfile / 0.066
	offsetY = offsetY + hProfile / 2
	yBottom = offsetY * yFactor - hProfile
endif
if abs(iProfile) = PROFILE_WOOD2 then
													! mirroring irrelevant
													! script coordinates relative to top middle
	xFactor = wProfile / 0.07146499997866
	yFactor = hProfile / 0.06114945598568
	offsetY = offsetY + hProfile / 2
	yBottom = offsetY * yFactor - hProfile
endif
if abs(iProfile) = PROFILE_WOOD3 then
													! mirroring irrelevant
												 	! script coordinates relative to bottom middle
	xFactor = wProfile / 0.05
	yFactor = hProfile / 0.01461124862507
	offsetY = (offsetY - hProfile / 2) / yFactor
	yBottom = (0 + offsetY) * yFactor
endif
if abs(iProfile) = PROFILE_WOOD4 then
													! mirroring irrelevant
												 	! script coordinates relative to bottom middle
	xFactor = wProfile / 0.085
	yFactor = hProfile / 0.06147903275841
	offsetY = (offsetY - hProfile / 2) / yFactor
	yBottom = (0 + offsetY) * yFactor
endif

So 'wProfile' and 'hProfile' are the sizes you want it to be.

Then when you PUT the profile coordinates, you multiply them by the respective 'xFactor' & 'yFactor'.
This should change the size of the profile without altering the path.


Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Barry Kelly
Moderator
I just had a quick play with the tube object that was attached in an earlier post.
Seems the scale factor works fine on a rectangular profile, but not so well on a curved profile.


Obviously the curves need to be handled differently.

The "Rail 21/22" does this OK for the pre-defined profiles, but it is is a little hard to dissect the Graphisoft parts sometimes.
It is all in there somewhere though.

But maybe that is the trick - these are pre-defined profiles.

The "Profiled Rail 21/22" uses user defined profiles (from the profile manager) but it seems these can not be resized.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Lingwisyer
Virtuoso
Yeah, I figured I could scale them based on their bounding box, but I was hoping it could be restricted to the stretch boundaries instead of uniformly. Oh well, we will just have to put up with stretching the profiles manually in the manager.



Ling.
AC18-23 AUS 7000
Self-taught, bend it till it breaks.
Win10 | E5620 x 2 | 24GB | K2200

Didn't find the answer? Start a new discussion

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!