OpenSCAD Cheatsheet

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

OpenSCAD Cheatsheet

Peter Uithoven
Because I'm a irregular user of OpenSCAD I tend to forget specific codes, so I made a simple online cheatsheet:
http://fablabamersfoort.nl/openscad/

Hope it's useful for someone. 

Best regards, 
Peter Uithoven 
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

nophead
Nice but what is interarticle_for?   maybe intersection_for?

On 5 December 2012 00:11, Peter Uithoven <[hidden email]> wrote:
Because I'm a irregular user of OpenSCAD I tend to forget specific codes, so I made a simple online cheatsheet:
http://fablabamersfoort.nl/openscad/

Hope it's useful for someone. 

Best regards, 
Peter Uithoven 

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

donbright
In reply to this post by Peter Uithoven
That's brilliant!

On Tue, Dec 4, 2012 at 6:11 PM, Peter Uithoven <[hidden email]> wrote:
Because I'm a irregular user of OpenSCAD I tend to forget specific codes, so I made a simple online cheatsheet:
http://fablabamersfoort.nl/openscad/

Hope it's useful for someone. 

Best regards, 
Peter Uithoven 

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Peter Shenkin
In reply to this post by Peter Uithoven
Cool. But how 'bout adding the function keys?

On Tue, Dec 4, 2012 at 7:11 PM, Peter Uithoven <[hidden email]> wrote:
> http://fablabamersfoort.nl/openscad/

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Joel Bodenmann
In reply to this post by Peter Uithoven
This looks great! Thank you very much for your work!

How exactly is that done? Is that some tool you reated it with? It looks
so... professional?


~ Tectu

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

nophead
A few more tweaks:

color([colorname]) should be color("colorname")


module name(…) { … }    (no semicolon)

function name(…) = expression;  (an expression, not a block)

include <….scad> (no semicolon)
use <….scad>  (no semicolon)

On 5 December 2012 08:57, Joel Bodenmann <[hidden email]> wrote:
This looks great! Thank you very much for your work!

How exactly is that done? Is that some tool you reated it with? It looks
so... professional?


~ Tectu
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Giles Bathgate-2
Also... Some of the mathematical functions take parameters and all functions need parenthesis. I think your syntax of polyhedron is wrong see


On 5 December 2012 09:17, nop head <[hidden email]> wrote:
A few more tweaks:

color([colorname]) should be color("colorname")


module name(…) { … }    (no semicolon)

function name(…) = expression;  (an expression, not a block)

include <….scad> (no semicolon)
use <….scad>  (no semicolon)

On 5 December 2012 08:57, Joel Bodenmann <[hidden email]> wrote:
This looks great! Thank you very much for your work!

How exactly is that done? Is that some tool you reated it with? It looks
so... professional?


~ Tectu
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Peter Uithoven
In reply to this post by Joel Bodenmann
No tools, just manual html,css work. So to include the MCAD library I'd like to write a little parser in php/javascript to ease the work. 

Peter 


On Wed, Dec 5, 2012 at 9:57 AM, Joel Bodenmann <[hidden email]> wrote:
This looks great! Thank you very much for your work!

How exactly is that done? Is that some tool you reated it with? It looks
so... professional?


~ Tectu
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Peter Uithoven
In reply to this post by Giles Bathgate-2
Hi Giles, 

True, mathematical functions was just laziness, I'll add it to the todo for now. 
I tried to simplify the polyhedron, how would you do it? 

Peter 


On Wed, Dec 5, 2012 at 10:57 AM, Giles Bathgate <[hidden email]> wrote:
Also... Some of the mathematical functions take parameters and all functions need parenthesis. I think your syntax of polyhedron is wrong see


On 5 December 2012 09:17, nop head <[hidden email]> wrote:
A few more tweaks:

color([colorname]) should be color("colorname")


module name(…) { … }    (no semicolon)

function name(…) = expression;  (an expression, not a block)

include <….scad> (no semicolon)
use <….scad>  (no semicolon)

On 5 December 2012 08:57, Joel Bodenmann <[hidden email]> wrote:
This looks great! Thank you very much for your work!

How exactly is that done? Is that some tool you reated it with? It looks
so... professional?


~ Tectu
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Peter Uithoven
In reply to this post by nophead
Thanks, I changed it. 

Function can't be a block at all btw? 

Peter 


On Wed, Dec 5, 2012 at 10:17 AM, nop head <[hidden email]> wrote:
A few more tweaks:

color([colorname]) should be color("colorname")


module name(…) { … }    (no semicolon)

function name(…) = expression;  (an expression, not a block)

include <….scad> (no semicolon)
use <….scad>  (no semicolon)

On 5 December 2012 08:57, Joel Bodenmann <[hidden email]> wrote:
This looks great! Thank you very much for your work!

How exactly is that done? Is that some tool you reated it with? It looks
so... professional?


~ Tectu
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

nophead


On 5 December 2012 11:10, Peter Uithoven <[hidden email]> wrote:
Thanks, I changed it. 

Function can't be a block at all btw? 
 
Yes functions are just a single expression. To do complex things you need to use recursion and the ? operator to stop it being infinite.


Peter 


On Wed, Dec 5, 2012 at 10:17 AM, nop head <[hidden email]> wrote:
A few more tweaks:

color([colorname]) should be color("colorname")


module name(…) { … }    (no semicolon)

function name(…) = expression;  (an expression, not a block)

include <….scad> (no semicolon)
use <….scad>  (no semicolon)

On 5 December 2012 08:57, Joel Bodenmann <[hidden email]> wrote:
This looks great! Thank you very much for your work!

How exactly is that done? Is that some tool you reated it with? It looks
so... professional?


~ Tectu
_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Jeff Keegan
In reply to this post by Peter Uithoven
Nice. Things I'd add:

1) Mention ", center=true" syntax somewhere.. I end up using that for everything and every time six months go by I have to look at an example to see if it's center or centered and if I use quotes or not, etc.

2) polyhedron: I'd maybe show an example, and a super short reminder that mentions triangle points are specified CLOCKWISE when looking from the OUTSIDE

3) You seem to have listed arguments just by their order, but you can (and I often do) use argument names. e.g. cylinder(r=4, h=30, center=true). Mentioning actual argument names would be helpful.

4) Somewhere mention $t, $fn, etc.

Looks great!

..Jeff Keegan
[hidden email]

Sent from my iPhone

On Dec 5, 2012, at 6:00 AM, [hidden email] wrote:

> Re: [OpenSCAD] OpenSCAD Cheatsheet

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

G. Wade Johnson
In reply to this post by Peter Uithoven
On Wed, 5 Dec 2012 01:11:19 +0100
Peter Uithoven <[hidden email]> wrote:

> Because I'm a irregular user of OpenSCAD I tend to forget specific
> codes, so I made a simple online cheatsheet:
> http://fablabamersfoort.nl/openscad/
>
> Hope it's useful for someone.

This is terrific. It will replace the 4-5 tabs I have open in my
browser for different pages of the docs.

Nice work.
G. Wade
--
Machines take me by surprise with great frequency.   -- Alan Turing

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Jeff Keegan
In reply to this post by Peter Uithoven
I tried printing this and had a few issues.. First, I set the page setup to landscape, then when doing a preview it stretched to two pages. Then I tried shrinking the scale so it'd fit - 67% is what worked for me. That kept the "Other" box from wrapping beneath the others.

The downside is that in the print rendering, the yellow background isn't printed out - it's changed to just a white background with a yellow border around it. Eh, maybe it's more readable, but I liked the online version better (solid yellow background).

At 67% though there's certainly space to add a few examples..

..Jeff

On Wed, Dec 5, 2012 at 8:09 AM, <[hidden email]> wrote:
Send OpenSCAD mailing list submissions to
        [hidden email]

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
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of OpenSCAD digest..."


Today's Topics:

   1. Re: OpenSCAD Cheatsheet (Peter Uithoven)
   2. Re: OpenSCAD Cheatsheet (Peter Uithoven)
   3. Re: OpenSCAD Cheatsheet (Peter Uithoven)
   4. Re: OpenSCAD Cheatsheet (nop head)
   5. Re: OpenSCAD Cheatsheet (Jeff Keegan)


----------------------------------------------------------------------

Message: 1
Date: Wed, 5 Dec 2012 12:06:47 +0100
From: Peter Uithoven <[hidden email]>
Subject: Re: [OpenSCAD] OpenSCAD Cheatsheet
To: [hidden email]
Message-ID:
        <CAGab-uEn27NkubJwNQnnzOJDkcwh6-q61+BjNb==[hidden email]>
Content-Type: text/plain; charset="iso-8859-1"

No tools, just manual html,css work. So to include the MCAD library I'd
like to write a little parser in php/javascript to ease the work.

Peter


On Wed, Dec 5, 2012 at 9:57 AM, Joel Bodenmann <[hidden email]> wrote:

> This looks great! Thank you very much for your work!
>
> How exactly is that done? Is that some tool you reated it with? It looks
> so... professional?
>
>
> ~ Tectu
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rocklinux.net/pipermail/openscad/attachments/20121205/63a02234/attachment-0001.html

------------------------------

Message: 2
Date: Wed, 5 Dec 2012 12:09:11 +0100
From: Peter Uithoven <[hidden email]>
Subject: Re: [OpenSCAD] OpenSCAD Cheatsheet
To: [hidden email]
Message-ID:
        <CAGab-uEawn1G_ymzigcsOi-h87xSU5H=[hidden email]>
Content-Type: text/plain; charset="windows-1252"

Hi Giles,

True, mathematical functions was just laziness, I'll add it to the todo for
now.
I tried to simplify the polyhedron, how would you do it?

Peter


On Wed, Dec 5, 2012 at 10:57 AM, Giles Bathgate <[hidden email]>wrote:

> Also... Some of the mathematical functions take parameters and all
> functions need parenthesis. I think your syntax of polyhedron is wrong see
>
> http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#polyhedron
>
>
> On 5 December 2012 09:17, nop head <[hidden email]> wrote:
>
>> A few more tweaks:
>>
>> color([colorname]) should be color("colorname")
>>
>>
>> module name(?) { ? }    (no semicolon)
>>
>> function name(?) = expression;  (an expression, not a block)
>>
>> include <?.scad> (no semicolon)
>> use <?.scad>  (no semicolon)
>>
>> On 5 December 2012 08:57, Joel Bodenmann <[hidden email]> wrote:
>>
>>> This looks great! Thank you very much for your work!
>>>
>>> How exactly is that done? Is that some tool you reated it with? It looks
>>> so... professional?
>>>
>>>
>>> ~ Tectu
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> [hidden email]
>>> http://rocklinux.net/mailman/listinfo/openscad
>>> http://openscad.org - https://flattr.com/thing/121566
>>>
>>
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://rocklinux.net/mailman/listinfo/openscad
>> http://openscad.org - https://flattr.com/thing/121566
>>
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rocklinux.net/pipermail/openscad/attachments/20121205/1a87193e/attachment-0001.html

------------------------------

Message: 3
Date: Wed, 5 Dec 2012 12:10:25 +0100
From: Peter Uithoven <[hidden email]>
Subject: Re: [OpenSCAD] OpenSCAD Cheatsheet
To: [hidden email]
Message-ID:
        <[hidden email]>
Content-Type: text/plain; charset="windows-1252"

Thanks, I changed it.

Function can't be a block at all btw?

Peter


On Wed, Dec 5, 2012 at 10:17 AM, nop head <[hidden email]> wrote:

> A few more tweaks:
>
> color([colorname]) should be color("colorname")
>
>
> module name(?) { ? }    (no semicolon)
>
> function name(?) = expression;  (an expression, not a block)
>
> include <?.scad> (no semicolon)
> use <?.scad>  (no semicolon)
>
> On 5 December 2012 08:57, Joel Bodenmann <[hidden email]> wrote:
>
>> This looks great! Thank you very much for your work!
>>
>> How exactly is that done? Is that some tool you reated it with? It looks
>> so... professional?
>>
>>
>> ~ Tectu
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://rocklinux.net/mailman/listinfo/openscad
>> http://openscad.org - https://flattr.com/thing/121566
>>
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rocklinux.net/pipermail/openscad/attachments/20121205/1ece5f55/attachment-0001.html

------------------------------

Message: 4
Date: Wed, 5 Dec 2012 11:49:42 +0000
From: nop head <[hidden email]>
Subject: Re: [OpenSCAD] OpenSCAD Cheatsheet
To: [hidden email]
Message-ID:
        <CAEEmnrPKxh=S2u4Ap=NrSpq6nR=ZVn=[hidden email]>
Content-Type: text/plain; charset="windows-1252"

On 5 December 2012 11:10, Peter Uithoven <[hidden email]> wrote:

> Thanks, I changed it.
>
> Function can't be a block at all btw?
>

Yes functions are just a single expression. To do complex things you need
to use recursion and the ? operator to stop it being infinite.


> Peter
>
>
> On Wed, Dec 5, 2012 at 10:17 AM, nop head <[hidden email]> wrote:
>
>> A few more tweaks:
>>
>> color([colorname]) should be color("colorname")
>>
>>
>> module name(?) { ? }    (no semicolon)
>>
>> function name(?) = expression;  (an expression, not a block)
>>
>> include <?.scad> (no semicolon)
>> use <?.scad>  (no semicolon)
>>
>> On 5 December 2012 08:57, Joel Bodenmann <[hidden email]> wrote:
>>
>>> This looks great! Thank you very much for your work!
>>>
>>> How exactly is that done? Is that some tool you reated it with? It looks
>>> so... professional?
>>>
>>>
>>> ~ Tectu
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> [hidden email]
>>> http://rocklinux.net/mailman/listinfo/openscad
>>> http://openscad.org - https://flattr.com/thing/121566
>>>
>>
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://rocklinux.net/mailman/listinfo/openscad
>> http://openscad.org - https://flattr.com/thing/121566
>>
>
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://rocklinux.net/mailman/listinfo/openscad
> http://openscad.org - https://flattr.com/thing/121566
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rocklinux.net/pipermail/openscad/attachments/20121205/492e8da6/attachment-0001.html

------------------------------

Message: 5
Date: Wed, 5 Dec 2012 08:09:26 -0500
From: Jeff Keegan <[hidden email]>
Subject: Re: [OpenSCAD] OpenSCAD Cheatsheet
To: "[hidden email]" <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain;       charset=us-ascii

Nice. Things I'd add:

1) Mention ", center=true" syntax somewhere.. I end up using that for everything and every time six months go by I have to look at an example to see if it's center or centered and if I use quotes or not, etc.

2) polyhedron: I'd maybe show an example, and a super short reminder that mentions triangle points are specified CLOCKWISE when looking from the OUTSIDE

3) You seem to have listed arguments just by their order, but you can (and I often do) use argument names. e.g. cylinder(r=4, h=30, center=true). Mentioning actual argument names would be helpful.

4) Somewhere mention $t, $fn, etc.

Looks great!

..Jeff Keegan
[hidden email]

Sent from my iPhone

On Dec 5, 2012, at 6:00 AM, [hidden email] wrote:

> Re: [OpenSCAD] OpenSCAD Cheatsheet


------------------------------

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


End of OpenSCAD Digest, Vol 37, Issue 15
****************************************



--

/=====================================================================\
| Jeff Keegan  ==  [hidden email]  ==  http://www.keegan.org/jeff |
\=====================================================================/
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Jeff Keegan
In reply to this post by Peter Uithoven
Oh yeah, forgot to suggest this: it might be a good idea, once you get it sized correctly and laid out for an 11x8.5" page, to print to a PDF and have that available too so the page layout is already taken care of.

..Jeff

/=====================================================================\
| Jeff Keegan  ==  [hidden email]  ==  http://www.keegan.org/jeff |
\=====================================================================/
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Peter Uithoven
I find doing these kind of things trough email problematic, so I've put it on github. 
I hope this will make the project more dynamic and it might be a way to keep it up to date. I could even add Collaborators. 

Please add suggestions/mistakes to the issues queue, or even better send me pull requests.

Jeff, I started with an examples block, I think that would be a great place for a lot of your suggestions. 
Printing is indeed problematic, I can't for example force landscape trough css/html. 

Best regards, 
Peter Uithoven 


On Wed, Dec 5, 2012 at 5:00 PM, Jeff Keegan <[hidden email]> wrote:
Oh yeah, forgot to suggest this: it might be a good idea, once you get it sized correctly and laid out for an 11x8.5" page, to print to a PDF and have that available too so the page layout is already taken care of.

..Jeff


/=====================================================================\
| Jeff Keegan  ==  [hidden email]  ==  http://www.keegan.org/jeff |
\=====================================================================/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Joel Bodenmann
In reply to this post by Jeff Keegan
Please use a proper paper format such as A4 like the rest of the world does as well :D


~ Tectu

Jeff Keegan <[hidden email]> wrote:
Oh yeah, forgot to suggest this: it might be a good idea, once you get it sized correctly and laid out for an 11x8.5" page, to print to a PDF and have that available too so the page layout is already taken care of.

..Jeff

/=====================================================================\
| Jeff Keegan  ==  [hidden email]  ==  http://www.keegan.org/jeff |
\=====================================================================/



OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Giles Bathgate-2
In reply to this post by Peter Uithoven
something like:

polyhedron([[x,y,z],[x,y,z],...],[[i,j,k],[i,k,l],...]);

maybe, although having written that maybe what you have is clearer.
Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Ian Shumsky
In reply to this post by Joel Bodenmann
Peter, many thanks for this, it is very useful.

As for ‘Letter’ size...

> Please use a proper paper format such as A4
> like the rest of the world does as well :D

Beat me to it!

http://www.cl.cam.ac.uk/~mgk25/iso-paper.html

Have fun :)

Reply | Threaded
Open this post in threaded view
|

Re: OpenSCAD Cheatsheet

Kevin Crowley
I did 11x17 landscape.  if you need on smaller paper just scale to fit.

On Wed, Dec 5, 2012 at 10:37 AM, Ian Shumsky <[hidden email]> wrote:
Peter, many thanks for this, it is very useful.

As for ‘Letter’ size...

> Please use a proper paper format such as A4
> like the rest of the world does as well :D

Beat me to it!

http://www.cl.cam.ac.uk/~mgk25/iso-paper.html

Have fun :)
_______________________________________________


OpenScad.pdf (29K) Download Attachment
12