I really thought I would get there this time...

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

I really thought I would get there this time...

Dan Zuras 3D


        Well, I took all you have said to heart & bit the
        bullet & started with a hand made polygon for each
        multiplicand.  One which coincides with the y-axis
        EXACTLY.  I tested it.  It rotate extrudes.  I even
        ran skeinforge on it.  No shadow objects.  Cool.

        That made the barrels.  Then I went for the hoops.
        Much the same procedure.  One for each multiplicand.
        Constructed in exactly the same way.  Well, with
        circles rather than polygons.  But circles that are
        no where NEAR the rotation axis.  The idea is to do
        all my subtracting in 3D as was also suggested.

        But I didn't get that far.  I tested it.  Terms 1 thru
        7 extruded just fine.  But 8, 9, & 10 blew up.  That's
        the word for it, they just blew up.  Aborted.  Not so
        much as an error message.  Just bang & yer dead.

        How does one diagnose something like that?

        Any ideas?

        As usual, the code follows.  Well, its longer than
        usual but it still follows.

        Thanks all,

                                Dan


module shape1() polygon(
        points=[[0,-sin(45)],[cos(45),-sin(45)],[cos(45),sin(45)],[0,sin(45)]]);

module shape2() polygon(
        points=[[0,-sin(45)],[cos(45),-sin(45)],[1,0],[cos(45),sin(45)],
                [0,sin(45)]]);

module shape3() polygon(
        points=[[0,-sin(45)],[cos(45),-sin(45)],[cos(15),-sin(15)],
                [cos(15),sin(15)],[cos(45),sin(45)],[0,sin(45)]]);

module shape4() polygon(
        points=[[0,-sin(45)],[cos(45),-sin(45)],[cos(45/2),-sin(45/2)],[1,0],
                [cos(45/2),sin(45/2)],[cos(45),sin(45)],[0,sin(45)]]);

module shape5() polygon(
        points=[[0,-sin(45)],[cos(45),-sin(45)],[cos(27),-sin(27)],
                [cos(9),-sin(9)],[cos(9),sin(9)],[cos(27),sin(27)],
                [cos(45),sin(45)],[0,sin(45)]]);

module shape6() polygon(
        points=[[0,-sin(45)],[cos(45),-sin(45)],[cos(30),-sin(30)],
                [cos(15),-sin(15)],[1,0],[cos(15),sin(15)],[cos(30),sin(30)],
                [cos(45),sin(45)],[0,sin(45)]]);

module shape7() polygon(
        points=[[0,-sin(45)],[cos(45),-sin(45)],[cos(225/7),-sin(225/7)],
                [cos(135/7),-sin(135/7)],[cos(45/7),-sin(45/7)],
                [cos(45/7),sin(45/7)],[cos(135/7),sin(135/7)],
                [cos(225/7),sin(225/7)],[cos(45),sin(45)],[0,sin(45)]]);

module shape8() polygon(
        points=[[0,-sin(45)],[cos(45),-sin(45)],[cos(135/4),-sin(135/4)],
                [cos(45/2),-sin(45/2)],[cos(45/4),-sin(45/4)],[1,0],
                [cos(45/4),sin(45/4)],[cos(45/2),sin(45/2)],
                [cos(135/4),sin(135/4)],[cos(45),sin(45)],[0,sin(45)]]);

module shape9() polygon(
        points=[[0,-sin(45)],[cos(45),-sin(45)],[cos(35),-sin(35)],
                [cos(25),-sin(25)],[cos(15),-sin(15)],[cos(5),-sin(5)],
                [cos(5),sin(5)],[cos(15),sin(15)],[cos(25),sin(25)],
                [cos(35),sin(35)],[cos(45),sin(45)],[0,sin(45)]]);

module shape10() polygon(
        points=[[0,-sin(45)],[cos(45),-sin(45)],[cos(36),-sin(36)],
                [cos(27),-sin(27)],[cos(18),-sin(18)],[cos(9),-sin(9)],
                [1,0],[cos(9),sin(9)],[cos(18),sin(18)],[cos(27),sin(27)],
                [cos(36),sin(36)],[cos(45),sin(45)],[0,sin(45)]]);

module shape(m) if (m==1) { shape1(); } else { if (m==2) { shape2(); } else {
        if (m==3) { shape3(); } else { if (m==4) { shape4(); } else {
        if (m==5) { shape5(); } else { if (m==6) { shape6(); } else {
        if (m==7) { shape7(); } else { if (m==8) { shape8(); } else {
        if (m==9) { shape9(); } else { shape10(); } } } } } } } } }

// translate([-4,1,0]) shape(1);
// translate([-2,1,0]) shape(2);
// translate([0,1,0]) shape(3);
// translate([2,1,0]) shape(4);
// translate([4,1,0]) shape(5);
// translate([-4,-1,0]) shape(6);
// translate([-2,-1,0]) shape(7);
// translate([0,-1,0]) shape(8);
// translate([2,-1,0]) shape(9);
// translate([4,-1,0]) shape(10);

module unitBarrel(n,m) translate([0,0,1/sqrt(2)])
        rotate_extrude(convexity=1,$fn=n) shape(m);

// scale([25,25,25*sqrt(2)]) {
// translate([-4,1,0]) unitBarrel(5,1);
// translate([-2,1,0]) unitBarrel(5,2);
// translate([0,1,0]) unitBarrel(5,3);
// translate([2,1,0]) unitBarrel(5,4);
// translate([4,1,0]) unitBarrel(5,5);
// translate([-4,-1,0]) unitBarrel(5,6);
// translate([-2,-1,0]) unitBarrel(5,7);
// translate([0,-1,0]) unitBarrel(5,8);
// translate([2,-1,0]) unitBarrel(5,9);
// translate([4,-1,0]) unitBarrel(5,10);
// }

module unitCircle() circle(1,$fn=400);

module unitBites(m) for (i=[0:m-1]) rotate([0,0,i*90/m+45/m-45])
        translate([cos(45/m)+2*sin(45/m)*sqrt(3)/2,0,0])
                scale([2*sin(45/m),2*sin(45/m),1]) unitCircle();

// translate([-4, 1,0]) unitBites(1);
// translate([-2, 1,0]) unitBites(2);
// translate([ 0, 1,0]) unitBites(3);
// translate([ 2, 1,0]) unitBites(4);
// translate([ 4, 1,0]) unitBites(5);
// translate([-4,-1,0]) unitBites(6);
// translate([-2,-1,0]) unitBites(7);
// translate([ 0,-1,0]) unitBites(8);
// translate([ 2,-1,0]) unitBites(9);
// translate([ 4,-1,0]) unitBites(10);

module unitHoops(n,m) translate([0,0,1/sqrt(2)])
        rotate_extrude(convexity=1,$fn=n) unitBites(m);

// scale([25,25,25*sqrt(2)]) {
// translate([-4, 1,0]) unitHoops(5,1);
// translate([-2, 1,0]) unitHoops(5,2);
// translate([ 0, 1,0]) unitHoops(5,3);
// translate([ 2, 1,0]) unitHoops(5,4);
// translate([ 4, 1,0]) unitHoops(5,5);
// translate([-4,-1,0]) unitHoops(5,6);
// translate([-2,-1,0]) unitHoops(5,7);
translate([ 0,-1,0]) unitHoops(5,8);
//// translate([ 2,-1,0]) unitHoops(5,9);
//// translate([ 4,-1,0]) unitHoops(5,10);
// }

Reply | Threaded
Open this post in threaded view
|

Re: I really thought I would get there this time...

kintel
Administrator
On Nov 4, 2011, at 17:40 PM, Dan Zuras 3D wrote:
>
> How does one diagnose something like that?
>
> Any ideas?
>
Which OpenSCAD version and OS is this?
I just tested with the latest master on Mac OS X and it works fine.

 -Marius


Reply | Threaded
Open this post in threaded view
|

Re: I really thought I would get there this time...

Dan Zuras 3D
> Subject: Re: [OpenSCAD] I really thought I would get there this time...
> From: Marius Kintel <[hidden email]>
> Date: Fri, 4 Nov 2011 18:08:08 +0100
> To: Dan Zuras 3D <[hidden email]>,
>  [hidden email]
>
> On Nov 4, 2011, at 17:40 PM, Dan Zuras 3D wrote:
> >
> > How does one diagnose something like that?
> >
> > Any ideas?
> >
> Which OpenSCAD version and OS is this?
> I just tested with the latest master on Mac OS X and it works fine.
>
>  -Marius
>

        It is: OpenSCAD 2011.10.01 (www.openscad.org)

        I am running Ubuntu 10.04: Linux floyd-4 2.6.32-34-generic #77-Ubuntu SMP Tue Sep 13 19:39:17 UTC 2011 x86_64 GNU/Linux

        If there is a Linux release that works for this
        I find myself suddenly motivated to download it.


                           Dan

Reply | Threaded
Open this post in threaded view
|

Re: I really thought I would get there this time...

Brad Pitcher
There is not a release, but the latest code has no problem with your script in Linux.

On Fri, Nov 4, 2011 at 10:35 AM, Dan Zuras 3D <[hidden email]> wrote:
> Subject: Re: [OpenSCAD] I really thought I would get there this time...
> From: Marius Kintel <[hidden email]>
> Date: Fri, 4 Nov 2011 18:08:08 +0100
> To: Dan Zuras 3D <[hidden email]>,
>  [hidden email]
>
> On Nov 4, 2011, at 17:40 PM, Dan Zuras 3D wrote:
> >
> >     How does one diagnose something like that?
> >
> >     Any ideas?
> >
> Which OpenSCAD version and OS is this?
> I just tested with the latest master on Mac OS X and it works fine.
>
>  -Marius
>

       It is: OpenSCAD 2011.10.01 (www.openscad.org)

       I am running Ubuntu 10.04: Linux floyd-4 2.6.32-34-generic #77-Ubuntu SMP Tue Sep 13 19:39:17 UTC 2011 x86_64 GNU/Linux

       If there is a Linux release that works for this
       I find myself suddenly motivated to download it.


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

Reply | Threaded
Open this post in threaded view
|

Re: I really thought I would get there this time...

kintel
Administrator
On Nov 4, 2011, at 19:20 PM, Brad Pitcher wrote:

> There is not a release, but the latest code has no problem with your script in Linux.
>
Good to know.
This might be related this bug, which caused an assert failure and was fixed Oct 26.:
https://github.com/openscad/openscad/commit/3080932440266b1f67ba106a536f3e6e6305fa80

 -Marius