[Plugin] Vertex welding tool v1.2
-
FUNCTIONALITY: it welds vertices (moves them to one spot and tries to weld colinear edges) selected by a 'fence' (thx to whaat for lot of lines of code)
USAGE NOTE: select all geometry you want to weld prior to launching the script, then choose the vertices to weld by drawing a virtual 'fence'
NOTE 4 RUBY CODERS: script is pretty dirty but the main part is useful for selecting vertices in view - feel free to use it
licence: your only duty is to share any improvements and/or upgrades of this code under this same condition
thanks to Juan V Soler for inspiration to make this
History
12.04.2008 v1.2
*now it lets you specify your welding spot by cycling through all possible positionsPlugins/Vertex Weld (From Selection) -> Weld with Feedback
specify weld region with your mouse
[i]then*
cycling LEFT / RIGHT ARROW
confirm ENTER[/i]
-
What exactly is the result of 'welding vertices'?
Maybe a little example could clarify. -
please redownload, 1.02 works inside groups
kwistenbiebel: I have added an example, the idea was to let the script weld those impossible-to-zoom-to but not identical two points -
Cool script! Glad you could sort through my sloppy code and find something useful! Thanks for the credit!
-
Hi a4chitect,
Thankyou for your efforts.
What I´m trying to get is explained in the attached file, following the three scenes.
I cant get your script running
-
Dear a4chitect,
Do you have to draw a box around each 'gap'? Suppose I imported a 2D CAD file with lots of small, but hard to see gaps (at corners for example). Would your script find and close all the gaps if I drew a box around the whole array of lines?
Regards,
Bob -
yes, you would have to draw a 'fence' around each welding spot...
if you want to have accurate results, I suggest you wait for me to add an option to weld at a certain point (not at the average center - as it is now).a script to weld all points within a certain treshold is very easy to code though, it should go through all points, for each of them measure the distance to every other and weld if the distance is below the treshold.
-
btw: it works only in perspective mode (due to the nature of vertex-selecting method)
-
@a4chitect said:
a script to weld all points within a certain treshold is very easy to code though, it should go through all points, for each of them measure the distance to every other and weld if the distance is below the treshold.
in what would it differ from weld.rb?
-
It sounds more like CloseOpens - closing up the tiny gap between segments that should touch.
-
@rickw said:
It sounds more like CloseOpens - closing up the tiny gap between segments that should touch.
do you have comparison between them ?
-
I think you´ve got it.
Thanks -
v 1.12
small update
welds to lowest point optionally
welds to a construction point which is part of the original selectionnote: still works in perspective mode only (but the switch to perspective and back is automatic)
v 1.2
visual feedback when welding
-
How do you keep this plugin going after you have done it once?
I'm able to use it easily enough but having to reselect the tool every time (I have heaps of tiny gaps in a model) is a real pain. Is there a shortcut or even a function of the tool just continuing to work after the previous operation it does.
Combined with Stray Lines functionality and the ability to keep Vertex Welding would speed things up immensely, probably close to CloseOpens. (Without the pay too)
Also... on another note, after welding to vertices together, how come the line isn't seen as one line by sketchup, rather staying to separate lines. The gap is closed but the vertices aren't 'welded' together as such? Is that normal?
Thanks for a very useful plugin otherwise!
-
@a4chitect said:
FUNCTIONALITY: it welds vertices (moves them to one spot and tries to weld colinear edges) selected by a 'fence' (thx to whaat for lot of lines of code)
USAGE NOTE: select all geometry you want to weld prior to launching the script, then choose the vertices to weld by drawing a virtual 'fence'
NOTE 4 RUBY CODERS: script is pretty dirty but the main part is useful for selecting vertices in view - feel free to use it
licence: your only duty is to share any improvements and/or upgrades of this code under this same condition
thanks to Juan V Soler for inspiration to make this
[attachment=1:3ism2iv0]<!-- ia1 -->vertex-weld-result.png<!-- ia1 -->[/attachment:3ism2iv0]
History
12.04.2008 v1.2
*now it lets you specify your welding spot by cycling through all possible positionsPlugins/Vertex Weld (From Selection) -> Weld with Feedback
specify weld region with your mouse
[i]then*
cycling LEFT / RIGHT ARROW
confirm ENTER[/i]
Advertisement