GSoC OpenSCAD project

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

Re: GSoC OpenSCAD project

MichaelAtOz
Administrator
I don't know what brain explosion I just had...original calculation was ok.
This version, hopefully final, has cleaner handling of zero holes.

// Released to the Public Domain
// Bandsaw insert plate
// TODO: currently assumes gap is always in the centre.

/* [Size in 1/10 mm] Main Tab */
// Width i.e right angle to blade
X=380; // [1:0.1:500]  // ATM 0.1 makes slider 'click' change by 1
// Depth i.e. parallel to blade
Y=380; // [1:0.1:500]
// Height or thickness
H=21;
// Zero for square corners
Corner_Radius=30;
// Gap not incl. the beveled cut
Gap_X=40; // [1:0.1:500]
Gap_Y=288; // [1:0.1:500]

/* [Holes] */
// In 1/10 mm
Hole_Diameter=48; //
// per side
Number_of_Holes=3; // [0:0.1:6]

/* [Options] */
// Bevel the gap for a tilt table
Tilt_Bevel=true;
// Facets in a circle
$fn=16; // [3,4,8,12,16,20,24,28,32]

/* [Hidden] */
// Convert Customizer inputs to working resolution
X_=X/10;
Y_=Y/10;
H_=H/10;
CR=(Corner_Radius== 0
        ? 0.05 // fudge for squar-ish corners
        : Corner_Radius)/10;
gapX=Gap_X/10;
gapY=Gap_Y/10;
holeD=Hole_Diameter/10;
difference() {
        linear_extrude(height=H_,convexity=10)
                difference() {
                        // square with rounded corners
                        hull() {
                                for (  x=[CR,X_-CR]
                                                , y=[CR,Y_-CR])
                                        translate([x,y])
                                                circle(r=CR);
                        } // h
                        // -
                        translate([X_/2-gapX/2,Y_-gapY])
                                square([gapX,gapY+0.05]);
                        if (Number_of_Holes > 0)
                                for (  i=[0.25,0.75])
                                        translate([X_*i,0])
                                                for ( j=[ 1 : Number_of_Holes])
                                                        //echo(i,j);
                                                        translate([0,X_/Number_of_Holes*j-X_/Number_of_Holes/2])
                                                                circle(d=holeD);
                } // d
        // -
        // 45 degree bevel - clearance for table tilt
        if (Tilt_Bevel)
                translate([X_/2+gapX/2,Y_-gapY,-0.05])
                        rotate([0,-45,0])
                        cube([gapX*3,gapY+0.05,H_*3]);
} // d
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: GSoC OpenSCAD project

Amarjeet Kapoor
In reply to this post by MichaelAtOz
On 12 November 2016 at 04:31, MichaelAtOz <[hidden email]> wrote:

> Amarjeet Kapoor wrote
>>>> It'd be better to have a blank description take zero
>>>> vertical space.
>>>>
>>> Already listed in the github issue.
>>>
>>
>> This is also already done.
>
> Didn't make it to this snapshot?
>

I think its there. Although its not Zero.
http://imgur.com/a/63MEn

--
Amarjeet Singh
https://amarjeetkapoor1.wordpress.com
https://github.com/amarjeetkapoor1
https://bitbucket.org/amarjeetkapoor

"The journey of a thousand commit begins with a single init"

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: GSoC OpenSCAD project

MichaelAtOz
Administrator
Amarjeet Kapoor wrote
I think its there. Although its not Zero.

Looks the same, red v's blue, to me.
Possibly a Windows issue?
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: GSoC OpenSCAD project

MichaelAtOz
Administrator
Looking at it again, the blue slider line is marginally higher, but the whitespace below is just bigger...
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: GSoC OpenSCAD project

MichaelAtOz
Administrator
I haven't looked into what the JSON file is about; however, I was doing a few new designs, did not use customizer and when I looked there were JSON files containing:

{
    "fileFormatVersion": "1"
}

I would not expect spurious files to be generated if I didn't specifically call for them.

2016.11.11
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
tp3
Reply | Threaded
Open this post in threaded view
|

Re: GSoC OpenSCAD project

tp3
On 11/20/2016 01:02 AM, MichaelAtOz wrote:
> I would not expect spurious files to be generated if I didn't
> specifically call for them.
>
Yeah, I noticed that too, it's not intentionally.

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: GSoC OpenSCAD project

Amarjeet Kapoor
In reply to this post by MichaelAtOz
On 20 November 2016 at 05:32, MichaelAtOz <[hidden email]> wrote:

> I haven't looked into what the JSON file is about; however, I was doing a few
> new designs, did not use customizer and when I looked there were JSON files
> containing:
>
> {
>     "fileFormatVersion": "1"
> }
>
> I would not expect spurious files to be generated if I didn't specifically
> call for them.
>

It happens every time the saveAs is called directly or indirectly but
their is some improvement. Earlier if you didn't enable customizer
still it would create the JSON file but now that doesn't happen.
Plus the problem described by you could be solved by adding the check
whether their is  any set created or not.



--
Amarjeet Singh
https://amarjeetkapoor1.wordpress.com
https://github.com/amarjeetkapoor1
https://bitbucket.org/amarjeetkapoor

"The journey of a thousand commit begins with a single init"

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
PRZ
Reply | Threaded
Open this post in threaded view
|

Re: GSoC OpenSCAD project

PRZ
This post has NOT been accepted by the mailing list yet.
In reply to this post by MichaelAtOz
I do models with many parameters, rarely less than 30, so I want to have as much parameters viewable in one go, so I prefer something like below:


or this
Reply | Threaded
Open this post in threaded view
|

Re: GSoC OpenSCAD project

MichaelAtOz
Administrator
In reply to this post by MichaelAtOz
MichaelAtOz wrote
I don't know what brain explosion I just had...original calculation was ok.
This version, hopefully final, has cleaner handling of zero holes.

// Released to the Public Domain
// Bandsaw insert plate
// TODO: currently assumes gap is always in the centre.

/* [Size in 1/10 mm] Main Tab */
// Width i.e right angle to blade
X=380; // [1:0.1:500]  // ATM 0.1 makes slider 'click' change by 1
// Depth i.e. parallel to blade
Y=380; // [1:0.1:500]
// Height or thickness
H=21;
// Zero for square corners
Corner_Radius=30;
// Gap not incl. the beveled cut
Gap_X=40; // [1:0.1:500]
Gap_Y=288; // [1:0.1:500]

/* [Holes] */
// In 1/10 mm
Hole_Diameter=48; //
// per side
Number_of_Holes=3; // [0:0.1:6]

/* [Options] */
// Bevel the gap for a tilt table
Tilt_Bevel=true;
// Facets in a circle
$fn=16; // [3,4,8,12,16,20,24,28,32]

/* [Hidden] */
// Convert Customizer inputs to working resolution
X_=X/10;
Y_=Y/10;
H_=H/10;
CR=(Corner_Radius== 0
        ? 0.05 // fudge for squar-ish corners
        : Corner_Radius)/10;
gapX=Gap_X/10;
gapY=Gap_Y/10;
holeD=Hole_Diameter/10;
difference() {
        linear_extrude(height=H_,convexity=10)
                difference() {
                        // square with rounded corners
                        hull() {
                                for (  x=[CR,X_-CR]
                                                , y=[CR,Y_-CR])
                                        translate([x,y])
                                                circle(r=CR);
                        } // h
                        // -
                        translate([X_/2-gapX/2,Y_-gapY])
                                square([gapX,gapY+0.05]);
                        if (Number_of_Holes > 0)
                                for (  i=[0.25,0.75])
                                        translate([X_*i,0])
                                                for ( j=[ 1 : Number_of_Holes])
                                                        //echo(i,j);
                                                        translate([0,X_/Number_of_Holes*j-X_/Number_of_Holes/2])
                                                                circle(d=holeD);
                } // d
        // -
        // 45 degree bevel - clearance for table tilt
        if (Tilt_Bevel)
                translate([X_/2+gapX/2,Y_-gapY,-0.05])
                        rotate([0,-45,0])
                        cube([gapX*3,gapY+0.05,H_*3]);
} // d
Finally fixed my bandsaw

...still got enough fingers to type with...
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
123