![]() |
Points on a circle primitive - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html) +--- Forum: Parts Author Tools (https://forums.ldraw.org/forum-24.html) +--- Thread: Points on a circle primitive (/thread-2974.html) |
Points on a circle primitive - Tim Gould - 2012-01-08 Hi all, Below is a perl script to take a bunch of angles and convert them to points on the edge of a circle primitve (ie. a 16 or 48 point polygon). The comments up top describe how to use it. It's designed to make generating rims on the bottom of curved parts relatively easy when there's only a few segments required and hand-coding makes more sense than using Philo's wonderful toys. Tim Code: #! /usr/bin/perl Re: Points on a circle primitive - Philippe Hurbain - 2012-01-09 Looks interesting - I agree that my "wonderful" tools can be clumsy to use ![]() Would you have a sample run (not so familar with perl...) Re: Points on a circle primitive - Tim Gould - 2012-01-09 Not so much clumsy in this case as not quite the right tool for the job. That said I'll be using ytruder for certain ![]() I plan to demonstrate it properly when I get a chance to redo the base of 65188. I'll try to remember to snap the stages. But... Code: 0 // ang2point.pl -r 120 -t 4 -s 48 0 7.5 11 Tim PS. This one should be very easy to convert to C. But processing arguments is simpler in perl so I chose that option. Re: Points on a circle primitive - Tim Gould - 2012-01-09 And to follow up: Attached is the stages I took. Finally I ran ytruder on it ![]() |