• Login
sketchucation logo sketchucation
  • Login
๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] TIG-Cut_to_plane v1.1 20130107

Scheduled Pinned Locked Moved Plugins
32 Posts 19 Posters 46.8k Views 19 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.
  • B Offline
    bmike
    last edited by 26 Nov 2012, 14:25

    how does one get this into the right click menu? would love to see it right under 'solid solver'...

    and, is there a way to customize my rubies so i can better order my right click menu?

    mike beganyi design + consulting llc

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 26 Nov 2012, 15:12

      This is the code that adds 'SolidSolver' to the menu AND the context-menu.

      unless file_loaded?(__FILE__)
        cmd=UI;;Command.new("SolidSolver"){self.solidsolver()}
        UI.menu("Tools").add_item(cmd)
        UI.add_context_menu_handler{|menu|
          if self.solidsolver_unsolid?()
            menu.add_item(cmd)
          end
        }	
      end
      file_loaded(__FILE__)
      

      The basis here is to make a command, and then add that to the the context-menu. Because this code is within the TIG module it says self.solidsolver(); however, TIG.solidsolver() would work otherwise... It also uses the built-in test self.solidsolver_unsolid?() [aka TIG.solidsolver_unsolid?()] which checks if the selected object is solid, otherwise there is no context-menu entry - try it with a selected line and the menu item is not added.
      To add any tool to the context-menu you simply make a command of it and add it, perhaps testing that some 'case' is met in a selection etc before adding the item.
      This example adds ' TIG-Cut_to_plane' to the context-menu... add this new code instead of the menu making code in ~line#259

      UI.menu("Plugins").add_item("TIG-Cut_to_plane"){Sketchup.active_model.select_tool(TIG;;Cut_to_plane.new())}
      

      becomes

      cmd=UI;;Command.new("TIG-Cut_to_plane"){Sketchup.active_model.select_tool(TIG;;Cut_to_plane.new())}
      UI.menu("Plugins").add_item(cmd)
      UI.add_context_menu_handler{|menu|
          ss=Sketchup.active_model.selection[0]
          if ss and (ss.is_a?(Sketchup;;Group) || ss.is_a?(Sketchup;;ComponentInstance)) and ss.manifold?
            menu.add_item(cmd)
          end
        }	
      
      

      Change 'Plugins' to 'Tools' etc as desired...
      To do the same for its sibling tool ' TIG-Split_to_plane' add this new code instead of the menu making code in ~line#298

      UI.menu("Plugins").add_item("TIG-Split_to_plane"){Sketchup.active_model.select_tool(TIG;;Split_to_plane.new())}
      

      becomes

      cmd=UI;;Command.new("TIG-Split_to_plane"){Sketchup.active_model.select_tool(TIG;;Split_to_plane.new())}
      UI.menu("Plugins").add_item(cmd)
      UI.add_context_menu_handler{|menu|
          ss=Sketchup.active_model.selection[0]
          if ss and (ss.is_a?(Sketchup;;Group) || ss.is_a?(Sketchup;;ComponentInstance)) and ss.manifold?
            menu.add_item(cmd)
          end
        }	
      
      

      To do it to other tools you need to read and understand how they run and how to make a command from their code...

      Be aware that adding too many 'commands' to SketchUp can cause the gray-out issue in the context-menu - this has bee 'fixed' by allowing you to have a lot more before it happens, but go bonkers adding them and items will spontaneously disable themselves and 'gray-out',

      TIG

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 7 Jan 2013, 16:50

        Here's v1.1 http://sketchucation.com/forums/viewtopic.php?p=433723#p433723
        Now at Point 3 an alternative <Enter> press cuts vertically, keeping left-side parts.
        Also Context-menu if selection suitable.

        TIG

        1 Reply Last reply Reply Quote 0
        • B Offline
          Ben Ritter
          last edited by 7 Jan 2013, 19:14

          Thank you TIG.

          1 Reply Last reply Reply Quote 0
          • R Offline
            rainboworiver
            last edited by 4 Feb 2014, 20:45

            does it work on sketch 2013 (freeware) ? only on pro?

            1 Reply Last reply Reply Quote 0
            • R Offline
              Rich O Brien Moderator
              last edited by 4 Feb 2014, 20:50

              @rainboworiver said:

              does it work on sketch 2013 (freeware) ? only on pro?

              @unknownuser said:

              Note for Pro >=v.8 only...

              Download the free D'oh Book for SketchUp ๐Ÿ“–

              1 Reply Last reply Reply Quote 0
              • D Offline
                designerbursa
                last edited by 10 Mar 2015, 11:26

                to select the portion to be cut

                1 Reply Last reply Reply Quote 0
                • T Offline
                  TIG Moderator
                  last edited by 10 Mar 2015, 15:07

                  @designerbursa said:

                  to select the portion to be cut
                  Was that a question ?
                  The direction of the 3 points defining the plane determine what is kept.
                  Try clockwise/counterclockwise and see the results...
                  Please read the usage notes...

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    Alain
                    last edited by 16 Aug 2018, 13:38

                    Thank alot TIG, it's a fantastic Plugin! It fullfits my needs ๐Ÿ˜„

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      kumudugayashan
                      last edited by 20 Aug 2018, 08:12

                      Awesome!

                      1 Reply Last reply Reply Quote 0
                      • H Offline
                        hgdar
                        last edited by 9 Dec 2020, 12:43

                        Great tools, thanks.

                        But i can't cut multiple objets at the same time, which is very frustrating.
                        Is there a custom version that can do this or a free alternative.

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          rv1974
                          last edited by 28 Apr 2022, 18:18

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

                          Advertisement