cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
JGoode
Expert

Is it possible to define Pens in GDL?

Is it possible to define Pens in GDL?
ArchiCAD 27

Windows 10
1 Solution

Accepted Solutions
JGoode
Expert
Hello,

Just to revisit this, how can I convert an RGB value into Graphisoft's 0-1 system?

Thanks
ArchiCAD 27

Windows 10

Go to post

7 Replies 7
runxel
Moderator
JGoode wrote:
Is it possible to define Pens in GDL?
No.
You can only request a similar pen to a RGB color:
REQUEST ("PEN_OF_RGB", colorInRGB, pen)
Lucas Becker | AC 29 on Mac (Sequoia) | Graphisoft Insider Panelist | Akroter.io – high-end GDL objects | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text

My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
JGoode
Expert
runxel wrote:
JGoode wrote:
Is it possible to define Pens in GDL?
No.
You can only request a similar pen to a RGB color:
REQUEST ("PEN_OF_RGB", colorInRGB, pen)
Do you have any example script of this? Thanks
ArchiCAD 27

Windows 10
runxel
Moderator
rr = REQUEST("PEN_OF_RGB", "0 1 0.2", _greenishpen)
!!! color range 0 to 1  //  WTF GS?

pen _greenishpen

set line_type   1
line2           0,0,5,0
Whoever did the 0 to 1 thing was clearly effing around.
Lucas Becker | AC 29 on Mac (Sequoia) | Graphisoft Insider Panelist | Akroter.io – high-end GDL objects | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text

My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
It is 0-1 in all MacOS at least in early versions 😉
anyway it is more accurate BTW: 256 points vs _the_accuracy_You_need 😉
Not that I like it...and in any script I use X/255 to get the GDL needed value while any soft would rather give 0..255.

Best Regards,
Piotr
runxel
Moderator
Piotr wrote:
It is 0-1 in all MacOS at least in early versions 😉
anyway it is more accurate BTW: 256 points vs _the_accuracy_You_need 😉
Not that I like it...and in any script I use X/255 to get the GDL needed value while any soft would rather give 0..255.

Best Regards,
Piotr
I know Piotr, but the accuracy is not the point.
It is about consistence and usability.
The implemented way is just total madness! 😉 It's like cooking by receipt with imperial units but living in Europe.
Lucas Becker | AC 29 on Mac (Sequoia) | Graphisoft Insider Panelist | Akroter.io – high-end GDL objects | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text

My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
JGoode
Expert
Hello,

Just to revisit this, how can I convert an RGB value into Graphisoft's 0-1 system?

Thanks
ArchiCAD 27

Windows 10
Jochen Suehlo
Moderator Emeritus
0 * 255 = 0 (black)
1 * 255 = 255 (white)
<< -- >>
0 / 255 = 0
255/255 = 1
Jochen Suehlo . AC12-29 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!