battery spring spiral

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

battery spring spiral

terramir
Ok I need to embed a spiral cutout. 17.25mm the biggest diameter  the
next about 14mm then 11.33 then 9.15. distance 6mm for the first 3
spirals then about 4mm although that end won't be in the plastic it's
the wide end. the wire diameter is 1.4mm. I need to know how I would
program this.

terramir

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

Re: battery spring spiral

nophead
Good luck. I model battery springs with a cone.

On Fri, 7 Sep 2018, 23:03 r.d. terramir, <[hidden email]> wrote:
Ok I need to embed a spiral cutout. 17.25mm the biggest diameter  the
next about 14mm then 11.33 then 9.15. distance 6mm for the first 3
spirals then about 4mm although that end won't be in the plastic it's
the wide end. the wire diameter is 1.4mm. I need to know how I would
program this.

terramir

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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

Re: battery spring spiral

terramir
Hmm you got a code example??
terramir

On Sep 7, 2018 4:12 PM, "nop head" <[hidden email]> wrote:
Good luck. I model battery springs with a cone.

On Fri, 7 Sep 2018, 23:03 r.d. terramir, <[hidden email]> wrote:
Ok I need to embed a spiral cutout. 17.25mm the biggest diameter  the
next about 14mm then 11.33 then 9.15. distance 6mm for the first 3
spirals then about 4mm although that end won't be in the plastic it's
the wide end. the wire diameter is 1.4mm. I need to know how I would
program this.

terramir

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


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

Re: battery spring spiral

terramir
In reply to this post by nophead
https://plus.google.com/+rdterramir/posts/UPXqFQjo5YS here is the spring and I would like to put it through the end of the 3d printed plastic battery holder anyone got any ideas on how to model this please
terramir

On Sep 7, 2018 4:12 PM, "nop head" <[hidden email]> wrote:
Good luck. I model battery springs with a cone.

On Fri, 7 Sep 2018, 23:03 r.d. terramir, <[hidden email]> wrote:
Ok I need to embed a spiral cutout. 17.25mm the biggest diameter  the
next about 14mm then 11.33 then 9.15. distance 6mm for the first 3
spirals then about 4mm although that end won't be in the plastic it's
the wide end. the wire diameter is 1.4mm. I need to know how I would
program this.

terramir

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


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

Re: battery spring spiral

capveg
I did something similar to this where I created a formula to place a
sequence of n circles along a path, and then did a hull() around each
adjacent pair of circles.  The function I was following was an
involute curve but you should be able to reuse this technique for an
arbitrary path, e.g., your spring.

Here's the relevant code:

                    for (i = [1: step: max_angle] ) {
                        point = involute( width, i);        // replace
this function with your own path function
                        prev_point = involute( width, i - step);   // ditto...
                        hull() {
                            translate([ point[0], point[1], 0])
                                circle(d=circle_diam, center=true);
                            translate([ prev_point[0], prev_point[1], 0])
                                circle(d=circle_diam, center=true);
                        }
                    }

Hope this helps,

- Rob
.
On Sat, Sep 8, 2018 at 12:00 PM r.d. terramir
<[hidden email]> wrote:

>
> https://plus.google.com/+rdterramir/posts/UPXqFQjo5YS here is the spring and I would like to put it through the end of the 3d printed plastic battery holder anyone got any ideas on how to model this please
> terramir
>
> On Sep 7, 2018 4:12 PM, "nop head" <[hidden email]> wrote:
>>
>> Good luck. I model battery springs with a cone.
>>
>> On Fri, 7 Sep 2018, 23:03 r.d. terramir, <[hidden email]> wrote:
>>>
>>> Ok I need to embed a spiral cutout. 17.25mm the biggest diameter  the
>>> next about 14mm then 11.33 then 9.15. distance 6mm for the first 3
>>> spirals then about 4mm although that end won't be in the plastic it's
>>> the wide end. the wire diameter is 1.4mm. I need to know how I would
>>> program this.
>>>
>>> terramir
>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> [hidden email]
>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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

Re: battery spring spiral

terramir
I tried to look up involute as a function of openscad and besides a
gitub involute gears I couldn't really find anything is involute in
your code a function or a variable. I am a little confused about this,
but I did think about something here I dunno if it would work but try
to follow this and maybe give me some suggestions .but I did get a
spiral together with this code the top is sort of inaccurate and I may
have to run a test print or two to tweak it(the z and y factors) but I
think this might just work. the spiral makes 4.5 revolutions but the
top is smushed so I used 1440 as in four revolutions so it wouldn't
effect the height of the bottom revolutions as much and those are the
ones that will have to go through the battery holder.

<code

 for (i=[0:0.5:1440]){
    translate([0,0,(i/60)])
    rotate([90,0,i])
    translate([8.75-(i/170),0,0])
    cylinder(r=0.9, h=0.4, $fn=32);
    }

</code>
terramir
Respectfully,
R. Daniel Borkan
727 S. Coronado St. 201
Los Angeles, CA 90057
C: (213) 271-6721
All written content of this e-mail is confidential and only intended for
the named recipient. This message is subject to copyright and is
intellectual property of the sender. All rights reserved (c) 2018



On Sat, Sep 8, 2018 at 12:10 PM Rob Sherwood <[hidden email]> wrote:

>
> I did something similar to this where I created a formula to place a
> sequence of n circles along a path, and then did a hull() around each
> adjacent pair of circles.  The function I was following was an
> involute curve but you should be able to reuse this technique for an
> arbitrary path, e.g., your spring.
>
> Here's the relevant code:
>
>                     for (i = [1: step: max_angle] ) {
>                         point = involute( width, i);        // replace
> this function with your own path function
>                         prev_point = involute( width, i - step);   // ditto...
>                         hull() {
>                             translate([ point[0], point[1], 0])
>                                 circle(d=circle_diam, center=true);
>                             translate([ prev_point[0], prev_point[1], 0])
>                                 circle(d=circle_diam, center=true);
>                         }
>                     }
>
> Hope this helps,
>
> - Rob
> .
> On Sat, Sep 8, 2018 at 12:00 PM r.d. terramir
> <[hidden email]> wrote:
> >
> > https://plus.google.com/+rdterramir/posts/UPXqFQjo5YS here is the spring and I would like to put it through the end of the 3d printed plastic battery holder anyone got any ideas on how to model this please
> > terramir
> >
> > On Sep 7, 2018 4:12 PM, "nop head" <[hidden email]> wrote:
> >>
> >> Good luck. I model battery springs with a cone.
> >>
> >> On Fri, 7 Sep 2018, 23:03 r.d. terramir, <[hidden email]> wrote:
> >>>
> >>> Ok I need to embed a spiral cutout. 17.25mm the biggest diameter  the
> >>> next about 14mm then 11.33 then 9.15. distance 6mm for the first 3
> >>> spirals then about 4mm although that end won't be in the plastic it's
> >>> the wide end. the wire diameter is 1.4mm. I need to know how I would
> >>> program this.
> >>>
> >>> terramir
> >>>
> >>> _______________________________________________
> >>> OpenSCAD mailing list
> >>> [hidden email]
> >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >>
> >>
> >> _______________________________________________
> >> OpenSCAD mailing list
> >> [hidden email]
> >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >>
> > _______________________________________________
> > OpenSCAD mailing list
> > [hidden email]
> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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

Re: battery spring spiral

NateTG
This seems like an "extrusion" kind of thing.

This is a little clumsy, but you can replace 'path' with the shape you want
the wire to trace out.

pathextrude.scad <http://forum.openscad.org/file/t2140/pathextrude.scad>  



--
Sent from: http://forum.openscad.org/

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

Re: battery spring spiral

terramir
wow that is alot of code for a spiral I actually got the code into a
function although I would like some help improving the module I am
going to start a new topic, because this is solved now the coding into
a function can begin, but I will need some help to make it more
natural I am having some algebraic function problems someone here
probably can solve in five second flat I probably could too if I
wasn't stuck on it right now. one of those can't see the forest
because of all the trees problems.
Look for the new topic module (maybe function later) spiral()

On Sat, Sep 8, 2018 at 2:30 PM NateTG <[hidden email]> wrote:

>
> This seems like an "extrusion" kind of thing.
>
> This is a little clumsy, but you can replace 'path' with the shape you want
> the wire to trace out.
>
> pathextrude.scad <http://forum.openscad.org/file/t2140/pathextrude.scad>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

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

Re: battery spring spiral

NateTG
It's a 'generic path extrude' thing that predates list comprehensions, and
uses its own vector functions.  A bunch of that stuff is there to allow
twisting into corners.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org