cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Starting August 6, 2024, TLS 1.2 will be the minimum required protocol version for Graphisoft products and services that require an online connection. License Manager Tool update is required on Windows. Learn more…
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Define scale of gradient fill

derekjackson
Expert
Hi,
I can't seem to find a way of defining the extent of a radial gradient fill.

My code is:
	DEFINE RADIAL_GRADIENT_FILL "treetop"

	FILL "treetop"

	poly2_b{2} 2,2,fill_pen_col,back_pen, 0,0,180,
	0,0,901,
	1.5,360,4001
Although poly2_b{2} lets me define the origin and angle, there's nothing to say how far the gradient reaches. What I'm after is a radial gradient in the circle that starts in the centre and finishes at the radius of the circle - currently, it just seems to stop about halfway.

Should this be defined in the RADIAL_GRADIENT_FILL definition, or in the poly2_b{2} command?

Thanks,

Derek
6 REPLIES 6
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Hi,

The solution is in the POLY2_B{4} and {5} variants. POLY2_B{2} is older than the gradient fill, consequently it cannot control the gradient length.

Regs,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
derekjackson
Expert
Could you give me an example of POLY2_B{5} in use, or a link to an online reference? I can't find it in the manual...

Thanks!
ztaskai
Graphisoft Alumni
Graphisoft Alumni
v14 GDL manual: http://download.graphisoft.com/ftp/gdl/manual/14

POLY2_B{5} in v14 GDL manual: http://download.graphisoft.com/ftp/gdl/manual/14/wwhelp/wwhimpl/common/html/wwhelp.htm?context=AC14_...

As far as I can remember, the length of the direction vector sets the transition length for linear gradients.

Regs,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
derekjackson
Expert
Thanks Zsolt. We're still using AC12 - can I still use POLY2_B{5}?

It keeps giving me a "Bad (unimplemented) command version" warning...
ztaskai
Graphisoft Alumni
Graphisoft Alumni
poly2_b{5} was added in AC13 😞

Experiment a bit with the fill distortion matrix in the {4} poly2_b version. I never did that but I think it has the same way for controlling the transient length.

Sorry, I'm of this little help...

Regs,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
derekjackson
Expert
Cheers.

I've managed to fully control the linear gradient using POLY2_B{4}, but no luck as yet on the radial.

Changing the mxx, mxy, myx, myy values seems to let me double the extent of the radial gradient, but no more - can't yet get it to reach to the full extent of the object. If anyone has managed it in AC12, please let me know how...

Thanks,

Derek