cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.
SOLVED!

Side materials for cprism_{2}

Paalanen
Booster

Hello all,


Hope you're pushing GDL towards to it's potential. Here's my issue at the moment. Why are my edges black? E.g. with SYMB_MAT this does not happen. Does the material definition need additional parameters for the cprism_{2} edges?

Kind regards,

Paalanen

 

define material "mat_test" 3,r,g,b
!mat_test = SYMB_MAT

cprism_{2} mat_test, mat_test, mat_test,
5, .3,
0, 0, 0, 15, mat_test,
0, 1, 0, 15, mat_test,
1, 1, 0, 15, mat_test,
1, 0, 0, 15, mat_test,
0, 0, 0, -1, mat_test
 
Paalanen_0-1763459945427.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution
runxel
Hero

Version 2 of cprism does not know about locally defined materials, so this won't work.

Use cprism_{4} for that.

Also it's good practice to not use string literals. Instead convert them to local index numbers with IND().

 

Like this:

define material 	"localmat" 	2,
			0.329412, 0.4, 0.690196

id_builtin_mat = ind(MATERIAL, "localmat")

 

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»

View solution in original post

2 REPLIES 2
Solution
runxel
Hero

Version 2 of cprism does not know about locally defined materials, so this won't work.

Use cprism_{4} for that.

Also it's good practice to not use string literals. Instead convert them to local index numbers with IND().

 

Like this:

define material 	"localmat" 	2,
			0.329412, 0.4, 0.690196

id_builtin_mat = ind(MATERIAL, "localmat")

 

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»

Hello runxel,
Thanks a lot indeed!! Will try cprism_{4}...