[OpenSCAD] OpenSCAD Digest, Vol 23, Issue 11

Pierre Lecanu Wibee pl at wibee.eu
Sun Oct 23 10:08:28 CEST 2011


On Saturday 22 October 2011 12:00:02 openscad-request at rocklinux.org wrote:
> Send OpenSCAD mailing list submissions to
> 	openscad at rocklinux.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://rocklinux.net/mailman/listinfo/openscad
> or, via email, send a message with subject or body 'help' to
> 	openscad-request at rocklinux.org
> 
> You can reach the person managing the list at
> 	openscad-owner at rocklinux.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of OpenSCAD digest..."
> 
> 
> Today's Topics:
> 
>    1. OpenSCAD two problems and futur documentation openscad	and
>       openFoam (Pierre Lecanu Wibee)
>    2. Re: OpenSCAD two problems and futur documentation openscad
>       and openFoam (Brad Pitcher)
>    3. Re: OpenSCAD two problems and futur documentation	openscad
>       and openFoam (Marius Kintel)
>    4. Re: OpenSCAD two problems and futur documentation openscad
>       and openFoam (Brad Pitcher)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Fri, 21 Oct 2011 17:16:50 +0200
> From: Pierre Lecanu Wibee <pl at wibee.eu>
> Subject: [OpenSCAD] OpenSCAD two problems and futur documentation
> 	openscad	and openFoam
> To: openscad at rocklinux.org
> Message-ID: <201110211716.50302.pl at wibee.eu>
> Content-Type: Text/Plain;  charset="iso-8859-1"
> 
> Hello,
> 
> I have two problem?
> 
> First problem
> 
> It is possible to create a array as
> a=1;
> b=2;
> array=[a,b];
> 
> 
>  it is possible to read the values
> echo(array[0]);
> 
> 
> 
> it is impossible to create a new value in the array as
> array[2]=3;
> 
> 
> 
> 
> Second problem
> 
> 
> Is it possible of crer a function with a condition?
> 
> function toto(i)= if (i=0) {return = [0];} else {return = [5];}
> echo(toto(3));
> 
> 
> 
> I use openscad and openFoam
> openscad it's an excellent software
> 
> I prepare a documentation to use openscad with openFoam
> 
> 
> best regard
> 
> > Hello,
> > 
> > I have two problem?
> > 
> > First problem
> > 
> > It is possible to create a array as
> > a=1;
> > b=2;
> > array=[a,b];
> > 
> >  it is possible to read the values
> > 
> > echo(array[0]);
> > 
> > 
> > 
> > it is impossible to create a new value in the array as
> > array[2]=3;
> > 
> > 
> > 
> > 
> > Second problem
> > 
> > 
> > Is it possible of crer a function with a condition?
> > 
> > function toto(i)= if (i=0) {return = [0];} else {return = [5];}
> > echo(toto(3));
> > 
> > 
> > 
> > I use openscad and openFoam
> > openscad it's an excellent software
> > 
> > I prepare a documentation to use openscad with openFoam
> > 
> > 
> > best regard
> > 
> > 
> > --
> > Cordialement
> > 
> > Pierre Lecanu
> > @wibee.eu
> > 
> > 
> > _______________________________________________
> > OpenSCAD mailing list
> > OpenSCAD at rocklinux.org
> > http://rocklinux.net/mailman/listinfo/openscad
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://rocklinux.net/pipermail/openscad/attachments/20111021/95998915/atta
> chment-0001.html
> 
> ------------------------------
> 
> Message: 3
> Date: Fri, 21 Oct 2011 19:25:00 +0200
> From: Marius Kintel <marius at kintel.net>
> Subject: Re: [OpenSCAD] OpenSCAD two problems and futur documentation
> 	openscad and openFoam
> To: openscad at rocklinux.org
> Message-ID: <94F42B51-53B4-4BD3-8B39-35819ECC0AE1 at kintel.net>
> Content-Type: text/plain; charset=us-ascii
> 
> On Oct 21, 2011, at 17:16 PM, Pierre Lecanu Wibee wrote:
> > it is impossible to create a new value in the array as
> > array[2]=3;
> 
> At the moment, this is not possible in OpenSCAD.
> 
> > Is it possible of crer a function with a condition?
> > 
> > function toto(i)= if (i=0) {return = [0];} else {return = [5];}
> 
> function toto(i) = (i == 0) ? [0] : [5];
> 
>  -Marius
> 
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Fri, 21 Oct 2011 10:27:30 -0700
> From: Brad Pitcher <bradpitcher at gmail.com>
> Subject: Re: [OpenSCAD] OpenSCAD two problems and futur documentation
> 	openscad and openFoam
> To: openscad at rocklinux.org
> Message-ID:
> 	<CAMFpZrgSN4Yhd8+Jkr5Sic3Mq26RcAUGgHAr-R9ip-ve+VDCww at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> > function toto(i) = (i == 0) ? [0] : [5];
> > 
> > Whoops, yeah I forgot the double ==. Listen to Marius, not me
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://rocklinux.net/pipermail/openscad/attachments/20111021/0d43f2be/atta
> chment-0001.html
> 
> ------------------------------
> 
> _______________________________________________
> OpenSCAD mailing list
> OpenSCAD at rocklinux.org
> http://rocklinux.net/mailman/listinfo/openscad
> 
> 
> End of OpenSCAD Digest, Vol 23, Issue 11
> ****************************************
Thank you for the answer
I have a another question is it possible to create a fonction similar at this

function toto(k)= {sum =0; for(i=[0:k]) {sum=sum+i}; retrun sum; }


openscad creates clean files STL which is appropriate perfectly with openfoam. 
it 's for this reason which I prepare a documentation to use openscad with 
openfoam correctly.  



Like I don't  write well in English, I will address to you my document for 
correction and diffusion

best regard


-- 
Cordialement

Pierre Lecanu
@wibee.eu


More information about the OpenSCAD mailing list