• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[REQUEST] Multi-weld

Scheduled Pinned Locked Moved Plugins
7 Posts 6 Posters 1.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    haynesc
    last edited by 20 Jul 2009, 10:24

    Hi guys ..

    is there a way to weld multiple lines at once ?

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dave R
      last edited by 20 Jul 2009, 10:59

      To each other? How about weld.rb from Smustard.com ?

      Etaoin Shrdlu

      %

      (THERE'S NO PLACE LIKE)

      G28 X0.0 Y0.0 Z0.0

      M30

      %

      1 Reply Last reply Reply Quote 0
      • H Offline
        haynesc
        last edited by 20 Jul 2009, 12:18

        simplify contours was what i required ...

        is does the same job as weld but for multiple lines at a time, using degree as 0

        1 Reply Last reply Reply Quote 0
        • E Offline
          EarthMover
          last edited by 20 Jul 2009, 14:29

          @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?

          3D Artist at Clearstory 3D Imaging
          Guide Tool at Winning With Sketchup
          Content Creator at Skapeup

          1 Reply Last reply Reply Quote 0
          • C Offline
            Chris Fullmer
            last edited by 20 Jul 2009, 17:28

            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?

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 Reply Last reply Reply Quote 0
            • R Offline
              RickW
              last edited by 21 Jul 2009, 17:04

              I'll try to find some time to look into this.

              RickW
              [www.smustard.com](http://www.smustard.com)

              1 Reply Last reply Reply Quote 0
              • T Offline
                TIG Moderator
                last edited by 22 Jul 2009, 08:32

                @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...

                TIG

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                1 / 1
                • First post
                  3/7
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement