by a4chitect » Tue Apr 08, 2008 7:01 pm
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 conditionthanks to Juan V Soler for inspiration to make this vertex-weld-result.png History12.04.2008 v1.2now it lets you specify your welding spot by cycling through all possible positions
Plugins/Vertex Weld (From Selection) -> Weld with Feedback specify weld region with your mouse [i]thencycling LEFT / RIGHT ARROW confirm ENTER[/i]
Please, register (free) to access all the attachments on the forums.
Last edited by a4chitect on Sun Apr 13, 2008 10:27 am, edited 9 times in total.
-
a4chitect
-
- Posts: 152
- Joined: Sat Nov 17, 2007 5:10 pm
by kwistenbiebel » Tue Apr 08, 2008 7:10 pm
What exactly is the result of 'welding vertices'? Maybe a little example could clarify.
-
kwistenbiebel
-
- Posts: 2666
- Joined: Thu Nov 22, 2007 6:13 pm
by a4chitect » Tue Apr 08, 2008 7:34 pm
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
-
a4chitect
-
- Posts: 152
- Joined: Sat Nov 17, 2007 5:10 pm
by Whaat » Tue Apr 08, 2008 8:29 pm
Cool script! Glad you could sort through my sloppy code and find something useful! Thanks for the credit!
-
Whaat
-
- Posts: 966
- Joined: Wed Nov 14, 2007 9:51 pm
- Location: Saskatchewan, Canada
- Name: Dale Martens
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by JuanV.Soler » Wed Apr 09, 2008 11:45 am
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 
Please, register (free) to access all the attachments on the forums. _,_)))_,_
-

JuanV.Soler
-
- Posts: 1146
- Joined: Tue Nov 13, 2007 8:39 am
- Location: Málaga. Spain.
- Name: Juan Víctor
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Intermediate
by watkins » Wed Apr 09, 2008 2:15 pm
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
-
watkins
-
- Posts: 1367
- Joined: Wed Nov 14, 2007 5:47 pm
by a4chitect » Wed Apr 09, 2008 8:12 pm
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.
-
a4chitect
-
- Posts: 152
- Joined: Sat Nov 17, 2007 5:10 pm
by a4chitect » Thu Apr 10, 2008 4:01 pm
btw: it works only in perspective mode (due to the nature of vertex-selecting method)
-
a4chitect
-
- Posts: 152
- Joined: Sat Nov 17, 2007 5:10 pm
by Edson » Thu Apr 10, 2008 11:41 pm
a4chitect wrote: 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?
edson mahfuz, architecthttp://www.mahfuz.arq.brAnyone can get you more for more, but it takes genius to get you more for less.
-

Edson
- Global Moderator
-
- Posts: 2656
- Joined: Mon Oct 22, 2007 1:46 pm
- Location: Porto Alegre, Brasil
- Name: Edson Mahfuz
- Operating system: Mac
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by RickW » Fri Apr 11, 2008 12:05 am
It sounds more like CloseOpens - closing up the tiny gap between segments that should touch.
-
RickW
-
- Posts: 770
- Joined: Fri Nov 16, 2007 6:38 am
- Location: Wichita, KS
- Name: Rick Wilson
-
by huyvuvn » Fri Apr 11, 2008 6:59 am
RickW wrote:It sounds more like CloseOpens - closing up the tiny gap between segments that should touch.
do you have comparison between them ?
-
huyvuvn
-
- Posts: 166
- Joined: Tue Nov 27, 2007 2:21 am
- Location: Hochiminh City, Vietnam
- Name: huyvuvn
-
by a4chitect » Sat Apr 12, 2008 6:51 pm
v 1.12
small update welds to lowest point optionally welds to a construction point which is part of the original selection
note: still works in perspective mode only (but the switch to perspective and back is automatic)
v 1.2
visual feedback when welding
Last edited by a4chitect on Sun Apr 13, 2008 10:36 am, edited 1 time in total.
-
a4chitect
-
- Posts: 152
- Joined: Sat Nov 17, 2007 5:10 pm
by JuanV.Soler » Sun Apr 13, 2008 10:34 am
I think you´ve got it. Thanks
_,_)))_,_
-

JuanV.Soler
-
- Posts: 1146
- Joined: Tue Nov 13, 2007 8:39 am
- Location: Málaga. Spain.
- Name: Juan Víctor
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Intermediate
by Thiefsie » Mon Nov 17, 2008 1:59 am
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!
-
Thiefsie
-
- Posts: 1
- Joined: Wed Oct 08, 2008 4:50 am
by trinhsongoku » Mon Feb 27, 2012 3:37 am
a4chitect wrote: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 conditionthanks to Juan V Soler for inspiration to make this vertex-weld-result.png History12.04.2008 v1.2now it lets you specify your welding spot by cycling through all possible positions
Plugins/Vertex Weld (From Selection) -> Weld with Feedback specify weld region with your mouse [i]thencycling LEFT / RIGHT ARROW confirm ENTER[/i]
-
trinhsongoku
-
- Posts: 2
- Joined: Mon Feb 27, 2012 3:25 am
- Name: titi
by Ad Machine » 5 minutes ago
Not a Premium Member yet? Check out the great time-limited deal we are offering.
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to Plugins
|