@Will_Wang wrote:
Pretty new to rhino python. Wonder if there is a way to eliminate duplicates.
I have a recursion that essentially copies an object along three directions, like a tripod. After each leg reaches a number of units, it starts a new branch. Problem is that there are many duplicates in this recursive branching. I used lists of 3 vectors as identifier of location and then oriented my object to every location. The 3 vector list help me with the individual posture of units. Python can't tell if a list of 3 vectors is already in the larger list/set, to which I'm orienting my object in the end of the script.
Any suggestions to avoid duplicates? I learned that i could use rs.command('_SelDup') and rs.command('_delete') to manually clean up at the end but the script wastes so much time on placing those duplicate units.
Posts: 4
Participants: 3