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

    Extend by amount plugin

    Scheduled Pinned Locked Moved Plugins
    11 Posts 4 Posters 1.4k Views 4 Watching
    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.
    • C Offline
      camoncamon2001
      last edited by

      Hi to all!
      I'm searching for a plugin that extend multiple lines at once in his vector direction and in both sides with a predefined amount as in attached image.
      Does anyone knows something like this?
      Thanks in advance.
      CC


      Clipboard01.jpg

      1 Reply Last reply Reply Quote 0
      • BoxB Online
        Box
        last edited by

        At a rough guess from your image, Tigs smart offset might help you.

        1 Reply Last reply Reply Quote 0
        • C Offline
          camoncamon2001
          last edited by

          @box said:

          At a rough guess from your image, Tigs smart offset might help you.

          The should work independently from the presence of a face and with unconnected lines too

          1 Reply Last reply Reply Quote 0
          • sdmitchS Offline
            sdmitch
            last edited by

            @camoncamon2001 said:

            Hi to all!
            I'm searching for a plugin that extend multiple lines at once in his vector direction and in both sides with a predefined amount as in attached image.
            Does anyone knows something like this?
            Thanks in advance.
            CC

            Sketchup won't let you "extend" an edge associated with a face because it automatically breaks lines where they cross. The extension will have to be an added edge at each end point like this.
            Extend Edges.gif

            mod = Sketchup.active_model
            ent = mod.active_entities
            sel = mod.selection
            unless sel.empty?
              dst = UI.inputbox(["Extend;"],['1'.to_l],"Extend all Edges")
              if dst
                sel.grep(Sketchup;;Face){|fac|
                  fac.edges.each{|e|
                    sp,v=e.line;ep=e.end.position
                    ent.add_line(sp,sp.offset(v,-dst[0]))
                    ent.add_line(ep,ep.offset(v,dst[0]))
                  }
                }
              end
            end
            
            

            Nothing is worthless, it can always be used as a bad example.

            http://sdmitch.blogspot.com/

            1 Reply Last reply Reply Quote 0
            • C Offline
              camoncamon2001
              last edited by

              @sdmitch said:

              @camoncamon2001 said:

              Hi to all!
              I'm searching for a plugin that extend multiple lines at once in his vector direction and in both sides with a predefined amount as in attached image.
              Does anyone knows something like this?
              Thanks in advance.
              CC

              Sketchup won't let you "extend" an edge associated with a face because it automatically breaks lines where they cross. The extension will have to be an added edge at each end point like this.
              [attachment=0:22irlvoa]<!-- ia0 -->Extend Edges.gif<!-- ia0 -->[/attachment:22irlvoa]

              mod = Sketchup.active_model
              > ent = mod.active_entities
              > sel = mod.selection
              > unless sel.empty?
              >   dst = UI.inputbox(["Extend;"],['1'.to_l],"Extend all Edges")
              >   if dst
              >     sel.grep(Sketchup;;Face){|fac|
              >       fac.edges.each{|e|
              >         sp,v=e.line;ep=e.end.position
              >         ent.add_line(sp,sp.offset(v,-dst[0]))
              >         ent.add_line(ep,ep.offset(v,dst[0]))
              >       }
              >     }
              >   end
              > end
              > 
              

              Great! How to use with separate lines, not face?

              1 Reply Last reply Reply Quote 0
              • sdmitchS Offline
                sdmitch
                last edited by

                For Edges

                mod = Sketchup.active_model
                ent = mod.active_entities
                sel = mod.selection
                unless sel.empty?
                  dst = UI.inputbox(["Extend;"],['12'.to_l],"Extend all Edges")
                  if dst
                    sel.grep(Sketchup;;Edge){|e|
                      sp,v=e.line;ep=e.end.position
                      ent.add_line(sp,sp.offset(v,-dst[0]))
                      ent.add_line(ep,ep.offset(v,dst[0]))
                    }
                  end
                end
                
                

                Nothing is worthless, it can always be used as a bad example.

                http://sdmitch.blogspot.com/

                1 Reply Last reply Reply Quote 0
                • C Offline
                  camoncamon2001
                  last edited by

                  Thank you! Perfect!

                  1 Reply Last reply Reply Quote 0
                  • PixeroP Offline
                    Pixero
                    last edited by

                    Would it be possible with a version that extended edges on faces like in this image to quadify surfaces?
                    wallsegments2.jpg

                    Let's say you have a wall with a door and some windows.
                    The script would try to extend edges to outer loop.
                    Inner loops would try to find closest point.
                    Hopefully resulting in a quad face surface.

                    1 Reply Last reply Reply Quote 0
                    • sdmitchS Offline
                      sdmitch
                      last edited by

                      @pixero said:

                      Would it be possible with a version that extended edges on faces like in this image to quadify surfaces?
                      [attachment=0:311e78k8]<!-- ia0 -->wallsegments2.jpg<!-- ia0 -->[/attachment:311e78k8]

                      Let's say you have a wall with a door and some windows.
                      The script would try to extend edges to outer loop.
                      Inner loops would try to find closest point.
                      Hopefully resulting in a quad face surface.

                      Looks simple enough but IMHO virtually impossible to code.

                      Nothing is worthless, it can always be used as a bad example.

                      http://sdmitch.blogspot.com/

                      1 Reply Last reply Reply Quote 0
                      • PixeroP Offline
                        Pixero
                        last edited by

                        Would it be possible to make it simpler with just extending edges until it meets a edge?
                        For a case like in the image above that would work for all but one. (The diagonal edge.)

                        1 Reply Last reply Reply Quote 0
                        • sdmitchS Offline
                          sdmitch
                          last edited by

                          @pixero said:

                          Would it be possible to make it simpler with just extending edges until it meets a edge?
                          For a case like in the image above that would work for all but one. (The diagonal edge.)

                          Yes, it is the diagonal edges that complicate the problem but I'm still thinking about it.

                          Nothing is worthless, it can always be used as a bad example.

                          http://sdmitch.blogspot.com/

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

                          Advertisement