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

[plugin] Divide By Material

Scheduled Pinned Locked Moved Plugins
17 Posts 9 Posters 17.0k Views 9 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.
  • S Offline
    sdmitch
    last edited by sdmitch 2 Jun 2011, 18:53

    This plugin was created at the request of srx who, because of rendering requirements, needed to sub-divide faces with a given material. The plugin works with a selected subset or all faces in the model with the material selected from a list of all materials present in the model. The maximum size to the sub-division is also entered. The actual size is calculated based on the dimensions of the face. The faces are assumed to be rectangular. Faces inside groups and components are accessed and processed by the plugin.


    Sub-divide faces with given material

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

    http://sdmitch.blogspot.com/

    1 Reply Last reply Reply Quote 0
    • G Offline
      Gaieus
      last edited by 3 Jun 2011, 00:58

      πŸ‘

      Thanks again, Sam!

      Gai...

      1 Reply Last reply Reply Quote 0
      • S Offline
        srx
        last edited by 3 Jun 2011, 08:49

        β˜€
        Thank you Sam. I am glad for being part of this modest contribution to SC forum to which I own so much.

        www.saurus.rs

        1 Reply Last reply Reply Quote 0
        • D Offline
          Didier Bur
          last edited by 3 Jun 2011, 09:01

          Hi,
          The script doesn't do anything here, no subdivision, no material paint 😲

          DB

          1 Reply Last reply Reply Quote 0
          • S Offline
            srx
            last edited by 3 Jun 2011, 11:10

            First select geometry (not groups) with different materials applied.
            Run plugin and chose the material which you want to subdivide and the maximum size of subdivision...and
            It works for me...
            but only for geometry not in groups or components .
            Guess the next step is to make it work for all nested geometry πŸ˜„

            www.saurus.rs

            1 Reply Last reply Reply Quote 0
            • S Offline
              sdmitch
              last edited by 3 Jun 2011, 15:35

              srx, Glad that the plugin works for you. The plugin posted to this forum doesn't require you to pre-select the faces. If there are no selected faces, it looks at all faces in the model and sub-divides the ones with the given material.

              As far as groups and components go, you can sub-divide their faces if you enter edit mode before running the plugin. This selects the faces and makes them accessable.

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

              http://sdmitch.blogspot.com/

              1 Reply Last reply Reply Quote 0
              • D Offline
                Didier Bur
                last edited by 3 Jun 2011, 16:05

                Works on my PC at home (Win 7 SU8 Pro) but doesn't work at my office (WinXP SU8 Pro).
                Would it be possible to have the localized material names instead of english names ?

                DB

                1 Reply Last reply Reply Quote 0
                • S Offline
                  srx
                  last edited by 4 Jun 2011, 05:49

                  @unknownuser said:

                  As far as groups and components go, you can sub-divide their faces if you enter edit mode before running the plugin.

                  This means that I have to enter every group - component in model manual?
                  Is it a problem to make it work for all nested geometry in model? This would be even more useful πŸ˜„

                  www.saurus.rs

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdmitch
                    last edited by 5 Jun 2011, 17:46

                    srx, Your wish is granted. DivideByMaterial.rb now handels faces in groups and components.


                    Updated to handle groups and components

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

                    http://sdmitch.blogspot.com/

                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      EarthMover
                      last edited by 5 Jun 2011, 19:41

                      Nice work Sam. πŸ‘ Thanks for the update. Perhaps update the first post as well.

                      3D Artist at Clearstory 3D Imaging
                      Guide Tool at Winning With Sketchup
                      Content Creator at Skapeup

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        srx
                        last edited by 6 Jun 2011, 04:47

                        πŸ˜„
                        😳
                        Thank you Sam. Very kind of you.
                        I agree you should update the first post.

                        www.saurus.rs

                        1 Reply Last reply Reply Quote 0
                        • Z Offline
                          ZFRPS
                          last edited by 7 Jun 2011, 06:35

                          nice!
                          Thank you Sam ![img][url][/url][/img]

                          sketchup is bim

                          1 Reply Last reply Reply Quote 0
                          • D Offline
                            Daryan
                            last edited by 15 Dec 2013, 15:11

                            "undefined method `file_loaded?' for main:Object"

                            1 Reply Last reply Reply Quote 0
                            • Dave RD Offline
                              Dave R
                              last edited by 15 Dec 2013, 15:16

                              @daryan said:

                              "undefined method `file_loaded?' for main:Object"

                              Very probably it's an install error but since we don't know anything whatsoever about your SketchUp version, operating system, nor how you went about installing the plugin, there's not much help to be given. Please complete your profile and help us help you.

                              Etaoin Shrdlu

                              %

                              (THERE'S NO PLACE LIKE)

                              G28 X0.0 Y0.0 Z0.0

                              M30

                              %

                              1 Reply Last reply Reply Quote 0
                              • D Offline
                                Daryan
                                last edited by 15 Dec 2013, 16:34

                                Sorry, your right. Because im very bad in english i usualy say the less possible.

                                Windows 8.1
                                Sketchup 8 pro

                                install the plugin : just copy past the file "DivideByMaterial.rb" in C:\Program Files (x86)\Google\Google SketchUp 8\Plugins

                                1 Reply Last reply Reply Quote 0
                                • TIGT Offline
                                  TIG Moderator
                                  last edited by 15 Dec 2013, 21:00

                                  The file is missing a line at its start:
                                  require("sketchup.rb")
                                  This is not needed IF an earlier loaded script has already required/loaded sketchup.rb...
                                  But I suspect you do not have that happening...
                                  Rather than edit the main file... Add this new file to your Plugins folder...!.rb
                                  On a restart of SketchUp any scripts missing the ' require("sketchup.rb")' should be OK because the !.rb files loads very early and will have done that for them...

                                  TIG

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    Daryan
                                    last edited by 15 Dec 2013, 23:49

                                    Thanks a lot TIG !

                                    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