Notifications
Clear all

[Closed] select edges form couple arrays at once

After 6 hours of experimentation this give me headache, I get in to limbo. My script give me couple of arrays inside of main array with edges, e.g:
edges_array=(#(1,2),#(3,4)).

These edges belong to one object but different elements. Because of reasons I prefer not to explain right now(It’s long way to go) I have to select all those edges and perform poly.operation. Now question is how to select all those edges in one go. I tried already :
for o in edges_array do $.SetSelection #Edge o – dont work, select only one by one array $.SetSelection #Edge edges_arrays -- dont work, select only last array
I also tried to throw all edges in to one array but eventually I failed. Best would be equivalent of select more for edges but I’m open for any ideas as I’m running out of solutions for this simple piece of code.
Thanks.

5 Replies
edges = #{}
 for ee in edges_array do join edges (ee as bitarray)
 node.selectededges = edges

Gloria 1 year of programming, one day of work and nothing. How long it took you to write this? Great thanks.

30 sec … because i type very slow

you definitely need faster keyboard:)

slight variation

edges_array=#(#(1,2),#(3,4))
edges = #();
for ee in edges_array do edges += ee;
node.selectededges = edges as bitarray;