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

    Flatten and Rename/renumber scenes Plugin for Sketchup 2015

    Scheduled Pinned Locked Moved Plugins
    18 Posts 5 Posters 798 Views 5 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.
    • onzkiO Offline
      onzki
      last edited by

      Hi everyone,

      Back in version 8, I have 2 plugins that successfully worked well.

      1. Flatten- Just one command and it flattens the newly imported CAD plan.
      2. Rename/Renumber scene- (scene_rename.rb) Very useful in keeping scenes in order, it sorts the numbering of scenes.

      Unfortunately, I didn't find one that works with Sketchup 2015, Any suggestions?
      Thanks! πŸ˜„


      [/hr]Dell Alienware Area-51. SKU 2021 Pro. AutoCAD 2023. Landscape design firm

      1 Reply Last reply Reply Quote 0
      • Bob JamesB Offline
        Bob James
        last edited by

        Why not PM Todd Burch and see if he'll update the Smustard 2007 version?

        i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

        1 Reply Last reply Reply Quote 0
        • onzkiO Offline
          onzki
          last edited by

          Thanks! will do..


          [/hr]Dell Alienware Area-51. SKU 2021 Pro. AutoCAD 2023. Landscape design firm

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

            @onzki said:

            Hi everyone,

            Back in version 8, I have 2 plugins that successfully worked well.

            1. Flatten- Just one command and it flattens the newly imported CAD plan.
            2. Rename/Renumber scene- (scene_rename.rb) Very useful in keeping scenes in order, it sorts the numbering of scenes.

            Unfortunately, I didn't find one that works with Sketchup 2015, Any suggestions?
            Thanks! πŸ˜„

            Just a guess but test this on a sample model to see if satisfies both needs.

            You can execute it by copying and pasting in the Ruby Console.

            mod = Sketchup.active_model
            ent = mod.active_entities
            sel = mod.selection
            #Flatten to XY plane
            vers = [];vecs = []
            ent.grep(Sketchup;;Edge).each{|e|vers<<e.vertices}
            vers.flatten!;vers.uniq!
            vers.each{|v|vecs<<Geom;;Vector3d.new(0,0,-v.position.z)}
            ent.transform_by_vectors(vers,vecs)
            #Rename Scenes
            pages = mod.pages
            new_name = 'Scene 0'
            for page in pages
             new_name = new_name.next
             page.name = new_name
            end
            
            

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

            http://sdmitch.blogspot.com/

            1 Reply Last reply Reply Quote 0
            • CadFatherC Offline
              CadFather
              last edited by

              both working flawless. on flatten, need to explode any curves if present, but amazing lean code! πŸ‘

              would be fantastic if only the visible lines from a top view were flattened - basically making 2d shapes for cad drawings! 😲

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

                @cadfather said:

                both working flawless. on flatten, need to explode any curves if present, but amazing lean code! πŸ‘

                would be fantastic if only the visible lines from a top view were flattened - basically making 2d shapes for cad drawings! 😲

                "lean" is my middle name!

                "only the visible lines from a top view"?

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

                http://sdmitch.blogspot.com/

                1 Reply Last reply Reply Quote 0
                • CadFatherC Offline
                  CadFather
                  last edited by

                  ...my own middle name has been 'chabbo' for quite sometime now! 😎

                  yes, only the lines visible from above.

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

                    @cadfather said:

                    yes, only the lines visible from above.

                    What about lines that are partially visible?

                    I assume any vertical line would not be visible.

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

                    http://sdmitch.blogspot.com/

                    1 Reply Last reply Reply Quote 0
                    • CadFatherC Offline
                      CadFather
                      last edited by

                      yes, no vertical lines. i'm thinking of a chair, one needs the profile lines and the main visible ones, as long as they're not vertical.

                      (though now you make me think it'd be fab having it flatten on the red or green plane too (!), for which case verticals are ok but not horizontals) 😲

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

                        @cadfather said:

                        yes, no vertical lines. i'm thinking of a chair, one needs the profile lines and the main visible ones, as long as they're not vertical.

                        (though now you make me think it'd be fab having it flatten on the red or green plane too (!), for which case verticals are ok but not horizontals) 😲

                        THE PLOT THICKENS!!!!!!!!!!!!!!

                        So simple. All we need is an option for Top, Front, or Right view.

                        Some horizontals would be OK if they are perpendicular to the axis of choice.

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

                        http://sdmitch.blogspot.com/

                        1 Reply Last reply Reply Quote 0
                        • CadFatherC Offline
                          CadFather
                          last edited by

                          @sdmitch said:

                          Some horizontals would be OK if they are perpendicular to the axis of choice.

                          the plot is as thick as it gets!!! πŸ˜†

                          1 Reply Last reply Reply Quote 0
                          • F Offline
                            faust07
                            last edited by

                            I will not slow your enthusiasm, but I think TIG has a plugin for it: CADup V1.2a. Whether it is suitable for the newer versions of SketchUp, don't know ...

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

                              @faust07 said:

                              I will not slow your enthusiasm, but I think TIG has a plugin for it: CADup V1.2a. Whether it is suitable for the newer versions of SketchUp, don't know ...

                              You are correct. http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=31895%26amp;hilit=Flatten

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

                              http://sdmitch.blogspot.com/

                              1 Reply Last reply Reply Quote 0
                              • CadFatherC Offline
                                CadFather
                                last edited by

                                ok thanks, i'll check it out, (had to be TIG! πŸ˜† )

                                EDIT. actually i do know that script and it is very good, though it only works if you have workplane installed.

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

                                  @cadfather said:

                                  ok thanks, i'll check it out, (had to be TIG! πŸ˜† )

                                  EDIT. actually i do know that script and it is very good, though it only works if you have workplane installed.

                                  The WorkPlane plugin is really not required. All you need is a group named WorkPlane which contains a single face that defines the desired plane. Then you can comment out or delete line 51 "require WorkPlane.rb".

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

                                  http://sdmitch.blogspot.com/

                                  1 Reply Last reply Reply Quote 0
                                  • CadFatherC Offline
                                    CadFather
                                    last edited by

                                    great, that's what i'll do then. makes it for a slightly faster job as well.

                                    just as i was getting chaffed about the all new flatten plugin...the idea of the visible lines was a good one though!

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

                                      @cadfather said:

                                      great, that's what i'll do then. makes it for a slightly faster job as well.

                                      just as i was getting chaffed about the all new flatten plugin...the idea of the visible lines was a good one though!

                                      Maybe I have an old version of Flatten To Plane but it seems to have a problem with embedded components.

                                      Post a model,v2014, with a sample or two what you would want the plugin to flatten to visible lines only.

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

                                      http://sdmitch.blogspot.com/

                                      1 Reply Last reply Reply Quote 0
                                      • CadFatherC Offline
                                        CadFather
                                        last edited by

                                        i was thinking of these situations (attached file). of course to view with hidden geometry on.

                                        for a human figure, from 3000 edges we go up to 20000 when flat.


                                        flattens.zip

                                        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