sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Refresh model viewing extents?

    Scheduled Pinned Locked Moved Developers' Forum
    13 Posts 3 Posters 501 Views 3 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.
    • thomthomT Offline
      thomthom
      last edited by

      Tool.getExtents
      http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/tool.html#getExtents

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        That's the one! Thanks Thom, I kept looking in the view class and model class and boundingbox class. I didn't think to check the tool class, thanks!

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          So does getExtents help with the clipping that occurs sometimes when drawing with the openGL primitives in a Tool?

          Hi

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            I hope so. That is what I understood fromt he description.

            I am writing a few tiny code snippets to show to to work with the view.draw methods. And one of them is severly handicapped by clipping. So I thought it would be a good time to try this method out. I have not played with it yet though.

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              @jim said:

              So does getExtents help with the clipping that occurs sometimes when drawing with the openGL primitives in a Tool?

              It seems that SU will only draw stuff that lies within the model boundary unless you implement the getExtents method.

              For my teapot plugin I just fed the boundingbox the points in my PolygonMesh and it then drew everything fine without ever clipping.

              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • Chris FullmerC Offline
                Chris Fullmer
                last edited by

                Yup, it worked like a charm. I had some cliping because I was trying to draw GL lines well outside the model bounds. Implemented that and it fixed it right up. I get no more clipping, hooray!

                Thanks again for remembering what it was called Thom.

                Chris

                Lately you've been tan, suspicious for the winter.
                All my Plugins I've written

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  What are you working on this time Chris?

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • Chris FullmerC Offline
                    Chris Fullmer
                    last edited by

                    Nothing cool right now. I am just trying to learn the screen drawing stuff better. I have implemented it in Shape Bender, but quite frankly I'm surprised it works because how poorly I understood what it was doing when I wrote it.

                    I am getting a much more solid grasp now on these various draw methods, and then I think I'll just post a bunch of simple examples of how drawing to the screen works, and how to use some of the tool classes, like resume and suspend to help the screen drawing look smooth.

                    Its just personal stuff that I want to learn, then I'll post what I figured out.

                    Chris

                    Then once I figure it out, I'll need to find something fun to put it to use on 😄

                    Lately you've been tan, suspicious for the winter.
                    All my Plugins I've written

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      @chris fullmer said:

                      Then once I figure it out, I'll need to find something fun to put it to use on 😄

                      I'm sure you got some ideas brewing already!

                      Thomas Thomassen — SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • Chris FullmerC Offline
                        Chris Fullmer
                        last edited by

                        Did you have something fun to work on together?

                        I have one script brewing(for months now), but its more tedious than fun. Math!

                        Chris

                        Oh! you beat me to the response...

                        Lately you've been tan, suspicious for the winter.
                        All my Plugins I've written

                        1 Reply Last reply Reply Quote 0
                        • thomthomT Offline
                          thomthom
                          last edited by

                          If only the 3D drawing methods would draw something other than solid black fill... 😕

                          Thomas Thomassen — SketchUp Monkey & Coding addict
                          List of my plugins and link to the CookieWare fund

                          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