[OpenSCAD] Missing operators

Giles Bathgate giles.bathgate at gmail.com
Mon Sep 13 17:15:32 CEST 2010


On Mon, 2010-09-13 at 15:44 +0100, andy at kirbyand.co.uk wrote:
> I will try it tonight.
> 
> What value does for example arry take after the assign. Is it modified
> by the assign permanently or is the modified value of arry only
> available to the invocation in the  { } of the assign statment ??
> 
> Given that the arry + 1 is an incrementer ie equivalent to ++arry or
> arry +=1
> 
> The next iteration of the for loop has to be presented with the
> incremented value for arry to increment again so that the placing of the
> objects progresses from last place to next.

No it wont work the example script illustrates this:

module main()
{
	j=0;
	for(i=[0:10])
	{
		assign(j=j+1)
		{
			echo(j);
		}
	}
	cube([1,1,1]);
}

main();

output:

ECHO: 1
ECHO: 1
ECHO: 1
ECHO: 1
ECHO: 1
ECHO: 1
ECHO: 1
ECHO: 1
ECHO: 1
ECHO: 1
ECHO: 1

I am beginning to thing the assign statement is as good as useless.

Regards

Giles



More information about the OpenSCAD mailing list