Discussion:
[OpenSCAD] battery spring spiral
r.d. terramir
2018-09-07 22:02:15 UTC
Permalink
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
nop head
2018-09-07 23:11:28 UTC
Permalink
Good luck. I model battery springs with a cone.
Post by r.d. 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
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
r.d. terramir
2018-09-07 23:37:38 UTC
Permalink
Hmm you got a code example??
terramir
Post by nop head
Good luck. I model battery springs with a cone.
Post by r.d. 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
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
r.d. terramir
2018-09-08 18:59:41 UTC
Permalink
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
Post by nop head
Good luck. I model battery springs with a cone.
Post by r.d. 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
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Rob Sherwood
2018-09-08 19:10:00 UTC
Permalink
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
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
Post by nop head
Good luck. I model battery springs with a cone.
Post by r.d. 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
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
r.d. terramir
2018-09-08 20:20:07 UTC
Permalink
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
Post by Rob Sherwood
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.
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
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
Post by nop head
Good luck. I model battery springs with a cone.
Post by r.d. 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
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
r.d. terramir
2018-09-08 21:53:06 UTC
Permalink
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()
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
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Loading...