@Gerry1 wrote:
Hi. I'm not all that conversant with Python, so you'll have to forgive me if this has a really obvious answer.
What I'm trying to achieve is this: I want people to be able to drop a particular type of drawing into rhino, and execute a script that will prepare the drawing for lasercutting. I've got 95% of the scripting worked out, although there is one thing that's eluding me at the moment- I need to be able to automatically select and rename objects in a linear sequence, according to the direction of the drawing.For the sake of example, say I have a set of 25 concentric arcs, with the open end facing right - I want to be able to name the arcs 'arc01' through to 'arc25' from left to right, where the largest (leftmost) arc is 01. However, not every drawing is going to be laid out in that direction, so I need to be able to define which arc is going to be arc01, and let the computer do the rest in the correct order.
I've had mixed success using a simple for loop to select and rename objects, although it'll go from left to right on my home computer, and right to left on my work computer - it's the same starting document, so I have no idea what sorcery is at work here.
If I were to include a 'select starting curve' and 'select ending curve' step into the program, would there be any way of getting rhino/python to work to the implicit order sensibly, or am I letting myself in for a world of pain?
Thanks
Posts: 5
Participants: 2