sketchucation logo sketchucation
    • Login
    โ„น๏ธ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

    [Plugin] xLine2Line

    Scheduled Pinned Locked Moved Plugins
    19 Posts 12 Posters 19.0k 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.
    • TIGT Offline
      TIG Moderator
      last edited by

      A bump of an ancient scipt...
      Here's my ruby based on RickW's (Smustard http://www.smustard.com/script/Xline ) - his 'xline.rb' makes lines into xlines [cline/guides].
      Mine makes selected xlines [clines/guides] into lines, BUT infinitely long clines/guides are ignored...
      Select " Edges from Construction:Guide Lines" from the context-menu after selecting guide-line(s). PayPalButton
      Get the latest version from the PluginStore:
      http://sketchucation.com/pluginstore?pln=xLine2Line

      TIG

      1 Reply Last reply Reply Quote 0
      • Rich O BrienR Offline
        Rich O Brien Moderator
        last edited by

        On behalf of all those who downloaded and forgot to thank you I'll offer some thanks.

        Thanks TIG ๐Ÿ‘

        Download the free D'oh Book for SketchUp

        1 Reply Last reply Reply Quote 0
        • P Offline
          Panga
          last edited by

          Thanks Tig.

          1 Reply Last reply Reply Quote 0
          • B Offline
            Ben Ritter
            last edited by

            Thank you TIG.

            1 Reply Last reply Reply Quote 0
            • utilerU Offline
              utiler
              last edited by

              @unknownuser said:

              On behalf of all those who downloaded and forgot to thank you I'll offer some thanks.

              Thanks TIG ๐Ÿ‘

              Ditto 'me wee lad...' 105 downloads and 3 replies..... ๐Ÿ˜ณ

              I must have missed this one, thanks TIG; I'd download it now!!!

              purpose/expression/purpose/....

              1 Reply Last reply Reply Quote 0
              • pilouP Offline
                pilou
                last edited by

                So we must used the Rick's plug first before use your? ๐Ÿ˜‰

                Frenchy Pilou
                Is beautiful that please without concept!
                My Little site :)

                1 Reply Last reply Reply Quote 0
                • kenK Offline
                  ken
                  last edited by

                  The plugin, "xline.rb", changes lines to Xline and Xlines to lines by the context menu. This plugin works great for me.

                  Header of the Plugin, so credit is given correctly to each script writer.
                  Name : xlines.rb 1.0

                  Description : Convert selected edges to construction lines

                  Author : Rick Wilson

                  Usage : 1. Install into the plugins directory or into the

                  Plugins/examples directory and manually load from the

                  ruby console "load 'examples/xlines.rb'"

                  2. Select "Convert to xLine" from the context menu after

                  selecting an edge.

                  Date : 2008-01-21

                  Type : Tool

                  History:

                  1.2 (2006-07-06) - Modified by D. Bur, Lines stipple supported. Back converter integrated.

                  1.1 (2008-01-21) - updated to put resultant geometry in the same entity space as the original

                  1.0 (2004-08-20) - first version

                  Fight like your the third monkey on Noah's Ark gangway.

                  1 Reply Last reply Reply Quote 0
                  • pilouP Offline
                    pilou
                    last edited by

                    xLIne2Line
                    Don't work for these guides lines ๐Ÿ˜ฎ
                    dont_work.png

                    Frenchy Pilou
                    Is beautiful that please without concept!
                    My Little site :)

                    1 Reply Last reply Reply Quote 0
                    • TIGT Offline
                      TIG Moderator
                      last edited by

                      @unknownuser said:

                      xLIne2Line
                      Don't work for these guides lines ๐Ÿ˜ฎ
                      [attachment=0:2ggms2o7]<!-- ia0 -->dont_work.png<!-- ia0 -->[/attachment:2ggms2o7]

                      That's because they are not clines - they are cpoints! - note the point on the start position...
                      Replace them with clines to see the difference...

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • thomthomT Offline
                        thomthom
                        last edited by

                        This plugin, as well as the original xLine processes the entire selection in its context handler.

                        
                        def xLine2Line_validate_selection
                        	Sketchup.active_model.selection.each {|e| return true if e.class == Sketchup;;ConstructionLine}
                        	return nil
                        end
                        
                        

                        This can lead to severe lag on large selection sets. As I mentioned in my thread about the topic, http://forums.sketchucation.com/viewtopic.php?f=180&t=31788 , I am currently looking for best practice methods to provide context menus for the selection. At the moment I'm adding a limit to how large selections I process - if the selection is larger than 1000 I assume there is something in the selection of interest.

                        Thomas Thomassen โ€” SketchUp Monkey & Coding addict
                        List of my plugins and link to the CookieWare fund

                        1 Reply Last reply Reply Quote 0
                        • TIGT Offline
                          TIG Moderator
                          last edited by

                          @thomthom said:

                          This plugin, as well as teh original xLine processes the entire selection in its context handler.

                          
                          > def xLine2Line_validate_selection
                          > 	Sketchup.active_model.selection.each {|e| return true if e.class == Sketchup;;ConstructionLine}
                          > 	return nil
                          > end
                          > 
                          

                          This can lead to severe lag on large selection sets. As I mentioned in my thread about the topic, http://forums.sketchucation.com/viewtopic.php?f=180&t=31788 , I am currently looking for best practice methods to provide context menus for the selection. At the moment I'm adding a limit to how large selections I process - if the selection is larger than 1000 I assume there is something in the selection of interest.

                          It breaks once it finds something matching so on average it'll only iterate half of the selection ?
                          If you want to 'extract' something from a selection then what other may is there but sift through it ?
                          Would selection.to_a be quicker ?

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • thomthomT Offline
                            thomthom
                            last edited by

                            @tig said:

                            It breaks once it finds something matching so on average it'll only iterate half of the selection ?

                            Or it could be last in the stack...

                            @tig said:

                            Would selection.to_a be quicker ?

                            No.

                            The whole issue is that when you have a large selection 100K+ processing every entity is going to give a performance hit. One plugin add some lag, and when you combine all plugins installed you have many second lag before the context menu appear.

                            What I do at the moment, is that if there is more than 1000 entities I just assume there is something of interest in the selection and show the menu item. Then make sure the method that processes the selection filters out the entities of interest. It's better that the processing method does the work rather than the context handler.

                            I timed the lag I had with the plugins installed to 5-10 second for a particular selection of 100K. For larger meshes the times just got silly. Once I modified the various plugins or disabled them I got it down to a few milliseconds.

                            Thomas Thomassen โ€” SketchUp Monkey & Coding addict
                            List of my plugins and link to the CookieWare fund

                            1 Reply Last reply Reply Quote 0
                            • TIGT Offline
                              TIG Moderator
                              last edited by

                              So if you just add the context-item without a selection search pre-check it's much quicker but the menu list gets stupidly long !

                              TIG

                              1 Reply Last reply Reply Quote 0
                              • thomthomT Offline
                                thomthom
                                last edited by

                                Yea - that's the downside with that. So I'm still looking for a better solution. I'm currently wondering if such menu items is not fit for a context menu.
                                The drawback of slowing down the menu is too big. Ideally, context menus should be optional. (Though I have a few plugins myself where they are not optional - simply because they where made to just do a specific job and adding UI to make it an option is an hazzle.)

                                But I'd like an conversation to this topic, because processing the whole selection simply becomes to expensive when you add it all up.

                                Thomas Thomassen โ€” SketchUp Monkey & Coding addict
                                List of my plugins and link to the CookieWare fund

                                1 Reply Last reply Reply Quote 0
                                • T Offline
                                  Tonysarus
                                  last edited by

                                  Is there a Plugin that converts infinitely long Clines into Lines on a selected face only (so that it automatically deletes the clines past the face's bounding edges and leaves lines within the selected face only). I would like to select a face or the bounding edges, execute the plug-in and have a face with lines on it and all the clines gone.

                                  1 Reply Last reply Reply Quote 0
                                  • TIGT Offline
                                    TIG Moderator
                                    last edited by

                                    No, this one here makes all clines into edges unless they are infinite rays or clines...
                                    You could take the code and rework it to do the calculation to project the 4 planes through the sides of the screen and the camera and intersect those with the cline to get the extents and draw a new line between those and erase the cline... ๐Ÿค“

                                    TIG

                                    1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      A24ron
                                      last edited by

                                      freakin awesome thanks.

                                      1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        show32167
                                        last edited by

                                        thx tig

                                        1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          Amazing Artist
                                          last edited by

                                          THX TIG

                                          [color=#FF40FF:20ov4k9m]T[/color:20ov4k9m][color=#FF40F9:20ov4k9m]h[/color:20ov4k9m][color=#FF40F2:20ov4k9m]a[/color:20ov4k9m][color=#FF40EC:20ov4k9m]t[/color:20ov4k9m][color=#FF40E5:20ov4k9m]'[/color:20ov4k9m][color=#FF40DF:20ov4k9m]s[/color:20ov4k9m] [color=#FF40D2:20ov4k9m]m[/color:20ov4k9m][color=#FF40CC:20ov4k9m]y[/color:20ov4k9m] [color=#FF40BF:20ov4k9m]s[/color:20ov4k9m][color=#F940B9:20ov4k9m]t[/color:20ov4k9m][color=#F240B2:20ov4k9m]o[/color:20ov4k9m][color=#EC40AC:20ov4k9m]r[/color:20ov4k9m][color=#E540A6:20ov4k9m]y[/color:20ov4k9m][color=#DF40A0:20ov4k9m],[/color:20ov4k9m] [color=#D24093:20ov4k9m]a[/color:20ov4k9m][color=#CC408D:20ov4k9m]n[/color:20ov4k9m][color=#C54086:20ov4k9m]d[/color:20ov4k9m] [color=#C53A7A:20ov4k9m]I[/color:20ov4k9m][color=#CC3373:20ov4k9m]'[/color:20ov4k9m][color=#D22D6D:20ov4k9m]m[/color:20ov4k9m] [color=#DF2060:20ov4k9m]s[/color:20ov4k9m][color=#E51A5A:20ov4k9m]t[/color:20ov4k9m][color=#EC1353:20ov4k9m]i[/color:20ov4k9m][color=#F20D4D:20ov4k9m]c[/color:20ov4k9m][color=#F90646:20ov4k9m]k[/color:20ov4k9m][color=#FF0040:20ov4k9m]i[/color:20ov4k9m][color=#F9004D:20ov4k9m]n[/color:20ov4k9m][color=#F20059:20ov4k9m]g[/color:20ov4k9m] [color=#E50073:20ov4k9m]t[/color:20ov4k9m][color=#DF0080:20ov4k9m]o[/color:20ov4k9m] [color=#D20099:20ov4k9m]i[/color:20ov4k9m][color=#CC00A6:20ov4k9m]t[/color:20ov4k9m][color=#C500B2:20ov4k9m]![/color:20ov4k9m]

                                          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