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!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download

    Lock inference to X, Y or Z_

    Scheduled Pinned Locked Moved Developers' Forum
    12 Posts 4 Posters 923 Views 4 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

      facepalm! 😳

      Yea - use the .pick method! I just got so fixed on looking for a .new method that took a Point3d argument.

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

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

        Wait... when you use screen coords like that - don't you risk picking a point that isn't exactly on the axis you want to pick from?
        If the is geometry near by from your first pick point that you offset - won't it pick from the surface of that geometry instead?

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

        1 Reply Last reply Reply Quote 0
        • C Offline
          cjthompson
          last edited by

          It looks like it. 😞 although I can't see any way to get an input point from 3d coordinates, so I don't really think it can be avoided.

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

            Back to square one then...

            ..or....

            line = [ip1.position, ip1.position.offset(Z_AXIS)] ip2.project_to_line(line)

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

            1 Reply Last reply Reply Quote 0
            • X Offline
              xrok1
              last edited by

              could you not draw a hidden reference axis for yourself when your tool is invocked then use this as a reference to X,Y,Z?

              β€œThere are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

              http://www.Twilightrender.com try it!

              1 Reply Last reply Reply Quote 0
              • C Offline
                cjthompson
                last edited by

                well, another thing you could do is to add an edge going along the axis you want, lock the inference from that IP, and delete the edge again.

                You might have the same problems with geometry getting your way, though.

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

                  @cjthompson said:

                  well, another thing you could do is to add an edge going along the axis you want, lock the inference from that IP, and delete the edge again.

                  how would one get an IP from that?

                  My idea in the previous post isn't working as I want it. I get extra inferring...

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

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

                    Just in case someone comes across this topic again: it is possible to create input points with arbitrary 3d points: http://forums.sketchucation.com/viewtopic.php?f=180&t=14608
                    ip=Sketchup::InputPoint.new( [1,2,3] )
                    or
                    ip=Sketchup::InputPoint.new( Geom::Point3d.new(1,2,3) )

                    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

                      Is that the same idea as it is shown in the View.inputpoint class?

                      http://code.google.com/apis/sketchup/docs/ourdoc/view.html#inputpoint

                      It states you can supply it with a point and/or another inputpoint.

                      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:

                        a point and/or another inputpoint.

                        I only see it referring to InputPoints...

                        And I think the ip it takes as argument are meant for inferring...

                        ...the docs are a wee bit unclear here...

                        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