• 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.7k 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.
  • T Offline
    TIG Moderator
    last edited by 7 Oct 2012, 16:39

    This tool 'Cut_to_plane' now has a sibling - 'Split_to_plane' - available here - http://sketchucation.com/forums/viewtopic.php?p=433732#p433732
    It's very similar in operation BUT it leaves both 'split' parts [A and B] in place, rather than keeping just the one...

    TIG

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 7 Oct 2012, 16:46

      @jorge2011 said:

      ...one question. how the tool works in the code, creates another solid and subtract?
      Yes you define the plane, a large new group containing a circular face is made centered on the first point you picked [its size based on that point and its distance from the selected object's bound center], the face's normal vector is set from the cross of the vectors to the other two points you picked. The face is then pushpulled into a large 3d solid and then that group is subtracted from the original selected object. The new group is given the properties of the original. In the 'split' version the selected object is duplicated in place and the pushpull reversed for the second 'cut' on the duplicate - leaving the original selected object appearing to have been split along the selected plane...

      TIG

      1 Reply Last reply Reply Quote 0
      • D Offline
        Dan Rathbun
        last edited by 7 Oct 2012, 18:24

        Nice job!

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • E Offline
          erikB
          last edited by 8 Oct 2012, 08:03

          thanks TIG, very handy!
          erikB

          1 Reply Last reply Reply Quote 0
          • V Offline
            veerlexyz
            last edited by 14 Oct 2012, 19:16

            Thanks! Almost perfect...
            Can you make it work with a combination of groups or/and components instead of ONE solid group?

            1 Reply Last reply Reply Quote 0
            • S Offline
              smicha
              last edited by 16 Oct 2012, 05:43

              You are the man, TIG. This is amazing as all of your works. I found a link to the video presentation to your plugins.

              It is on p. 20 of CatchUp Edition 15 - SketchUcation 2.0

              favicon

              (issuu.com)

              1 Reply Last reply Reply Quote 0
              • K Offline
                kingsi
                last edited by 16 Oct 2012, 10:41

                Many Thanks TIG

                Noobtastic

                1 Reply Last reply Reply Quote 0
                • D Offline
                  dermotcoll
                  last edited by 23 Oct 2012, 23:19

                  Thanks TIG. Looks like a very useful tool for woodworking and machining worksurfaces with a CNC.

                  When you burn your arse - you gotta sit on the blisters!!

                  1 Reply Last reply Reply Quote 0
                  • P Offline
                    penumbra
                    last edited by 11 Nov 2012, 03:02

                    Many thanks TIG. Is there a way to make this work on a non solid group? Or nested groups? zorro does something like what i need but is view dependent, you have to view your group from an orthogonal view if you want a "straight" cut.

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      TIG Moderator
                      last edited by 11 Nov 2012, 10:48

                      No.
                      This tool works on solids only.
                      Zorro2 will work by slicing along a Section Plane.
                      Place one where you want and use that Zorro2 option.
                      I haven't tried nesting the plane inside the group/instance so that the cur only applies to the active entities - try it and report back...

                      TIG

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        penumbra
                        last edited by 12 Nov 2012, 17:38

                        @TIG

                        Yes indeed, Zorro2 will cut through nested entities. There is a bit of clean up needed afterwards as some surfaces may need to be healed depending on how the section cut cuts through the objects.


                        Slicing nested groups with zorro2

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          shri
                          last edited by 23 Nov 2012, 06:19

                          great addition to the plugins list..thanks alot..can't wait playing with it
                          πŸŽ‰ πŸŽ‰ πŸŽ‰

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            rv1974
                            last edited by 26 Nov 2012, 13:19

                            Thank you TIG!
                            I wish this tool could:

                            1. work with non-solids (I won't miss section faces anyway)
                            2. I guess the fourth click to manually choose the side to be cut off would be even more user-friendly. No pop-ups, just a hint in status bar.
                            1 Reply Last reply Reply Quote 0
                            • P Offline
                              penumbra
                              last edited by 26 Nov 2012, 13:47

                              @ rv1974

                              For your #1 above you could use section tool in combination with zorro2.

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                rv1974
                                last edited by 26 Nov 2012, 14:09

                                @penumbra
                                Maybe the things got better, but Zorro was kinda minefield- too much crashes,- I stopped using it. And besides, 3 clicks to define the cutting plane is the nicest way to cut.

                                1 Reply Last reply Reply Quote 0
                                • bmikeB Offline
                                  bmike
                                  last edited by 26 Nov 2012, 14:18

                                  Wonderful TIG!!!!

                                  😍

                                  mike beganyi design + consulting llc

                                  1 Reply Last reply Reply Quote 0
                                  • bmikeB 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
                                          • 1
                                          • 2
                                          • 1 / 2
                                          • First post
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement