https://github.com/alexdu/sketch-lib/blob/master/lib/box.sk
(source from http://alexdu.github.com/sketch-lib/ )
On Tue, Feb 22, 2011 at 5:07 PM, M3n0 <menil....@gmail.com> wrote:
> I just started using sketch and I was convinced that I could make a cube in
> only two lines. I think I have a good idea but my implementation is not
> good:
>
> def p0(0,0,0) def p1(1,0,0) def p2(1,1,0) def p3(0,1,0)
> repeat { 5, rotate(180/5, [0,1,1]) then translate([0,1,1] * 2.1) }
> sweep[cull=false]{2<>, rotate (90, (0,0,0), [0,1,0]) then
> translate([0,0,1])}{polygon(p0)(p1)(p2)(p3)}
>
> The idea was to make a square (polygon p0p1p2p3) and just once to rotate
> that square by 90 degrees and translate to the Z-axis but I get a cube that
> is not closed (I think)
> Can anyone help me "close" my cube? The repeat function is there just to see
> the cubes from other angles. I still consider my code in two lines :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Sketch Users" group.
> To post to this group, send email to sketch...@googlegroups.com.
> To unsubscribe from this group, send email to
> sketch-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sketch-users?hl=en.
>
See this page for details on how to use the library:
http://alexdu.github.com/sketch-lib/
You can look in defaults.sk and extrastyle.sk and copy the styles from there.
On Tue, Feb 22, 2011 at 5:24 PM, M3n0 <menil....@gmail.com> wrote:
> Hmmm I can't seem to compile. Can you explain what does the option
> "e_xtrastyle" do? I get an error when compiling.
I've found Kjell's pages to be very helpful in learning Sketch.
On Tue, Feb 22, 2011 at 5:42 PM, M3n0 <menil....@gmail.com> wrote:
> This is great, thx. Can you give me any more sketch related links, so I can
> learn more?
> btw. You still haven't solved my problem on closing the cube. Is it
> possible?