Re: OpenSCAD: How to make radially distributed holes

636 views
Skip to first unread message

Tyler Worman

unread,
Sep 23, 2012, 8:07:16 PM9/23/12
to make...@googlegroups.com
Offset one from the center. Then make a for loop using the value of the loop to multiply by the degree you rotate the holes.

for (j=[0:1:2]) {
rotate((j*360)/3)hole();
}



On Sunday, September 23, 2012 6:21:37 PM UTC-4, Peter Loron wrote:
I'm making a custom vacuum tube socket design in OpenSCAD. I need to distribute a number of pin holes radially around the perimeter of the circular base. This link goes to an example of what I'm trying to make, although it isn't my design:


I can fiddle with manually placing the holes in the right spots, but that is error prone and time consuming. I'm sure OpenSCAD has a way to do this in a parameterized loop, or some other function, but I haven't been able to find it. Something like:

radial_holes(center, radius, angle) { ... }

Any pointers?

Thanks!

Peter Loron

unread,
Sep 23, 2012, 10:30:43 PM9/23/12
to make...@googlegroups.com
Ah! That did the trick. I'd played with rotate() a bit, but wasn't able to see how to get the correct axis to to be used. Thanks!

-Pete


--
You received this message because you are subscribed to the Google Groups "MakerBot Operators" group.
To view this discussion on the web visit https://groups.google.com/d/msg/makerbot/-/daLdAWoTuFcJ.

To post to this group, send email to make...@googlegroups.com.
To unsubscribe from this group, send email to makerbot+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/makerbot?hl=en.

Reply all
Reply to author
Forward
0 new messages