sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    Mac User? | Join the Rayscaper Beta for Mac Learn More

    [Plugin] Image 2 Model

    Scheduled Pinned Locked Moved Plugins
    20 Posts 7 Posters 19.4k Views 7 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.
    • sdmitchS
      sdmitch
      last edited by

      If Susan is showing up it because she is in your default template.

      I take a look at exploding.

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

      http://sdmitch.blogspot.com/

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

        You could always some code at the start to erase all model entities...
        Sketchup.active_model.entities.erase_entities(Sketchup.active_model.entities.to_a)
        [or a Sketchup.active_model.entities.clear [edit]]
        Then .purge_unused for all model components, materials, layers and styles before adding the new image into the now sanitized model.
        Surely image.explode will do the desired extra step ?

        TIG

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

          Added a .clear! to make sure the new file is empty. Exploded the image and hide the edges.


          Image2Model.rb

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

          http://sdmitch.blogspot.com/

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

            The 'entities.clear' only erases the instance of Susan [and any other stuff placed in the default template].
            BUT the definition still remains in the SKP, as do any now-unused related materials, layers etc.
            It's best to have a '.purge_unused' for these after the '.clear'...

            TIG

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

              I haven't been able to find .purge_unused.

              sorry, I did find it for materials and styles.

              Searching returned no results.

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

              http://sdmitch.blogspot.com/

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

                Your search tool is faulty...
                https://developers.google.com/sketchup/docs/ourdoc/definitionlist#purge_unused
                https://developers.google.com/sketchup/docs/ourdoc/materials#purge_unused
                https://developers.google.com/sketchup/docs/ourdoc/layers#purge_unused
                https://developers.google.com/sketchup/docs/ourdoc/styles#purge_unused

                TIG

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

                  I did the search, .purge_unused, at

                  https://developers.google.com/sketchup/docs/

                  which is the Ruby API page and it found nothing. Apparently it was the "." that cause the failed search. Lots of results without it.

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

                  http://sdmitch.blogspot.com/

                  1 Reply Last reply
                  Reply Quote 0
                  • EarthMoverE
                    EarthMover
                    last edited by

                    First post updated with [plugin] tag.

                    Got a bit busy and haven't had a chance to truly say thanks! SDMitch, I owe you a beer! Plugin works great. Thanks again!

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

                    1 Reply Last reply
                    Reply Quote 0
                    • guanjinG
                      guanjin
                      last edited by

                      @sdmitch said:

                      Added a .clear! to make sure the new file is empty. Exploded the image and hide the edges.

                      I opened the PNG image, the view does not show

                      I come from China, is to learn

                      1 Reply Last reply
                      Reply Quote 0
                      • C
                        coreymurray
                        last edited by

                        Just wanted to say thanks for this plugin, it really is super helpful!

                        1 Reply Last reply
                        Reply Quote 0
                        • S
                          shoopa
                          last edited by

                          @Earthmover
                          can You do a quick explanation video tutorial?
                          thanks!!

                          1 Reply Last reply
                          Reply Quote 0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better đź’—

                          Register Login
                          • 1 / 1
                          • First post
                            Last post
                          Buy SketchPlus
                          Buy SUbD
                          Buy WrapR
                          Buy eBook
                          Buy Modelur
                          Buy Vertex Tools
                          Buy SketchCuisine
                          Buy FormFonts

                          Advertisement