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

    Get objects at specified poitn

    Scheduled Pinned Locked Moved Developers' Forum
    11 Posts 3 Posters 474 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.
    • K Offline
      kwalkerman
      last edited by

      Is there any way to get all the objects at a specific point in 3d space, other than model.raytest? In this case, I know the exact 3d coordinate.

      Thanks,

      --
      Karen

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

        each entity with a vertex at that point, or also edges and planes that cross the point?

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

        1 Reply Last reply Reply Quote 0
        • K Offline
          kwalkerman
          last edited by

          I think just vertices would be ok, but some of them are nested components, and I'm trying to avoid running through all components to create a database... having raytest return hidden entities is really messing me up!

          Not sure if there's a way to do it with a view and pickhelper, or something like that... I'm not so familiar with those methods.

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

            Just wait for the SketchUp maintenance release. It is going to fix the raytest so it does not fail anymmore, and so that it does not stop on hidden entities anymore.

            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 you use raytest you can recast the ray when you hit hidden entities.

              But if you can use the pickhelper, then that would be the best one.

              
              ph = view.pick_helper
              ph.do_pick(x,y)
              # Iterate all the possible pick paths (note that the same entity might appear in multiple paths)
              (0...ph.count).each { |i|
                for e in ph.path_at(i)
                  # ... 
                end
              }
              
              

              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

                @chris fullmer said:

                and so that it does not stop on hidden entities anymore.

                Is that confirmed?

                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

                  The benefit of the pickhelper is that you don't have to worry about the raytest issues.
                  (and it's the most appropriate method to get the entities for a given mouse position)

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

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    kwalkerman
                    last edited by

                    Chris,

                    you made my day, I'll stop worrying about it then.

                    Thanks!

                    --
                    Karen

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

                      http://groups.google.com/group/sketchupruby/browse_thread/thread/79b9dab46dd374c0

                      Read that thread. Tyler Miller said they got the raycast bug fixed where it is not stable. Then I nentioned this hidden issue (thanks to Karen for bringing it up). He confrimed it will be fixed as well. It was all part of the same bug.

                      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

                        Rightio! When is the service release coming then...! eh? eh?

                        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

                          Good question, hopefully soon.

                          Now we'll have to add a version check to make sure people are not running SU 8, original release. But that's ok, the fix will be well recieved.

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

                          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