@haynesc said:
Hi guys ..
is there a way to weld multiple lines at once ?
RickW's weld.rb welds all connected co-vertexed edges selected.
If you want to be able to select several unconnected sets of edges, or sets of edges where say 3 share a vertex point and branch the it is possible... you simply need to:
Look at the selection set and extract an array of all_edges=[].
Make an array of each set of connected_edges=[].
Process the connected_edges array doing each connected_edges set in turn.
Make an array of all edges in the set with a 'loose end/start' - i.e. not shared with another edge - loose_edges=[].
Take each loose_edge in turn and find each of its connected edges, their connected edges etc ad infinitum...
At a >2 edge vertex you branch off down one of the edge sets (could selected the 'longest' branch ?)
As you go you remove selected edges from the connected_edges array
If the next loose_edge is no longer in connected_edges array then skip it as it's been taken as connected to the sub-set.
When there are no more loose-ends check to see if there are any edges left in the connected_edges set - if so they must 'loop' to say a >2 vertex connection, and so they have no loose-ends - pick one and repeat getting connected edges etc...
Eventually you will have put all of the connected edges into sub-sets that can be processed by 'weld'.
Un-connected array sets are also processed similarly and 'welded'...
There's the plan now someone write it... Otherwise, carefully select the edges you'd like to weld so they are continuous and not branching etc and 'weld' each selected set in turn...