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

    Screen Coords

    Scheduled Pinned Locked Moved Developers' Forum
    9 Posts 2 Posters 311 Views 2 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.
    • A Offline
      Anton_S
      last edited by

      Does anyone knows or has the source code for function view.screen_coords or not the actual code, but something similiar to that?

      I want to examine how it works and more stuff. I have looked in blender source code as someone previously sugested, but haven't found the function that could convert 3d pos to screen coords.

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

        Your question is cryptic. What do you want? Do you want to convert a Point3d location in the model into screen coordinates?

        Or are you writing your own 3d modeling software and you want to figure out how to convert a 3d point in your software into screen coordinates?

        Or why isn't the SketchUp method provided good enough? What is it lacking?

        Based on your actual question:

        @anton_s said:

        Does anyone knows or has the source code for function view.screen_coords or not the actual code, but something similiar to that?

        The answer is "no". Google does not publish SketchUp's uncompiled code. So none of us have a copy of it sitting around.

        ❓

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

        1 Reply Last reply Reply Quote 0
        • A Offline
          Anton_S
          last edited by

          Its not really about sketchup, but I just want to write my own function that would convert 3d pos to 2d by having parameter as: camera pos(eye), camera target, camera up and view type(perspective or parallel)

          I still don't have too much math about 3d space and perspective stuff, so I decided to ask here for help. A good url to some learning would also help.

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

            What are you doing the 3d programming in?

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

            1 Reply Last reply Reply Quote 0
            • A Offline
              Anton_S
              last edited by

              @chris fullmer said:

              What are you doing the 3d programming in?

              Rightnow, in Sketchup. Later, in other 3d space softwares.

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

                You're not really doing 3d programming though. You're interfacing with a 3d SketchUp model.

                I think this is a hard question to answer because you don't fully understand what your asking.

                So again, what is it about SketchUp's native screen coordinates tool that is not enough?

                My suggestions would be to master the SketchUp API. Then when you are ready to move on to a different software, you can learn their API. They will probably also have a way to supply you with the screen coordinates of a 3d point.

                But again, what is it that you really want? You're asking about how to get the screen coordinates. Well, use the SketchUp API. But what about that is not a good enough answer? What more do you need it to do?

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

                1 Reply Last reply Reply Quote 0
                • A Offline
                  Anton_S
                  last edited by

                  @chris fullmer said:

                  But again, what is it that you really want? You're asking about how to get the screen coordinates. Well, use the SketchUp API. But what about that is not a good enough answer? What more do you need it to do?

                  Rightnow I'm good with sketchup and I hopely mastered the API. πŸ€“

                  If I would wan't something to sketchup, I will post to SU[n] wishes.

                  What I wanted was just some more skills on perspective drawings. Sketchup doesn't has to do with what I want, it's an example, which has a defined function that could clone 3d pos to 2d. The defined function it self has parameters, which are view and 3d pos. I was trying to learn what code or math calculations the function does to clone the 3d coordinates to 2d coordinates.

                  Chris, is that clear enough?

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

                    Ok, it sounds like you're generally interested in calculating 3d graphics.

                    Going from a 3d point to a 2d plane is called 3d projection:

                    Link Preview Image
                    3D projection - Wikipedia

                    favicon

                    (en.wikipedia.org)

                    The way you implement that varies by software, but the principle is the same. So read up on that, and it will enlighten you (or confuse you if you were me) πŸ˜„

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

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      Anton_S
                      last edited by

                      Okay, Thanks πŸ˜„

                      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