[REQUEST] Multi-weld
-
Hi guys ..
is there a way to weld multiple lines at once ?
-
To each other? How about weld.rb from Smustard.com?
-
simplify contours was what i required ...
is does the same job as weld but for multiple lines at a time, using degree as 0
-
@tig said:
@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 a 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...
I really must take some time when I'm slow to learn ruby. The logic of what you are saying makes total sense, I am just lost as to where to even begin to translate that into code.
I wish there was an update to the weld ruby as I find it very inconsistent, especially in segmented arcs. Sometimes I will select everything and run weld and the result is a total decimation and what was 12 segments, jumps to 80 segments. Or, it just doesn't work at all unless I go through and weld segment 1 to segment 2, then segments 1&2 to segment 3 and so on. It's a real pain with the two dialog boxes that appear, which are 90% of time un-needed options. I'm sure Rick wrote a great initial script, but I wonder if it couldn't use an re-work, as I'm sure it is one of the most widely used rubies by everyone in every area of design. Anyone?
-
Hmm, I've never seen any of that. Do you have an example you could post of something that gets segmented weird?
Perhaps try downloading it again? Maybe there is a newer version?
-
I'll try to find some time to look into this.
-
@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...
Advertisement