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

    [REQUEST] Drop on target

    Scheduled Pinned Locked Moved Plugins
    7 Posts 3 Posters 268 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.
    • P Offline
      Panga
      last edited by

      Hi all,

      I'm often using all the drop plugins available for sketchup, including the raytracer plugin of ThomThom. But whatever the plugin, I still have problems with some components that do not drop, or that goes down just a little without droping. I have also a lot of issues when components to drop are intersecting themselves...

      So the idea is : Would it be possible do define a target for drop ? Something like Select the components to drop, Launch the plugin and select the target.

      Thanks in advance for all your ideas.

      Cheers.

      Panga.

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

        Yes.
        The simple versions of the 'drop' tools do a downwards raytrace and stop at the first object encountered, and move the objects down to those points.
        Having a pre-selected object - e.g. a group 'ground mesh' would let you test the raytest point and if the object found at it were not that group it re-raytests from that point until the next found point is on that group - that way dropping instances shouldn't usually interfere with themselves. Of course it might still fail if a previously dropped component were directly under another and the raytest point hit on it happened to be also the point on the hoped for 'group' too...

        I sure one of the 'drop' tools' authors could readily add that option... πŸ€“

        TIG

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

          That could be added. But do you have an example of where components drop only a little bit?

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

          1 Reply Last reply Reply Quote 0
          • P Offline
            Panga
            last edited by

            After a few more tests, It appears that the drop fails when the origin of axes in the component is higher (on Z) than the lowest part of the component. If I put the origin of axes at the lowest part of the mesh, everything goes fine.

            Could it be the fact that the intersecting method take in acount the mesh and not the origin of axes in the component ? Could it be modified ?

            @Thomthom : I could send you the file, but I think i found the issue. I'll temporarily change the origin of axes for this time.

            Cheers.

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

              The issue of a partial drop will be because the component's origin is inside the form, the raytest starts at that point so the downwards raytest can hit a face in the component itself and so it then drops the component down to where that was.
              This is also easily sorted as the initial test point for the raytest can be either the tp=instance.bounds.min
              or
              tp=instance.bounds.center tp.z=instance.bounds.min.z
              which moves the test point down to the bottom of the instance's bounds, but still centered...
              OR
              the raytest checks to see of its returned point is from geometry within the instance itself, and if so it re-raytests from that new point down until it hits something other than within the instance itself - that way you can drop an object by its origin, even if that is within the object...

              TIG

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

                That's true, Raytracer doesn't check for hits on self. That can be worked around - would be similar to Drop to Target.

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

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Panga
                  last edited by

                  Humm, some other experiments may indicate that nested components could be the problem. I'll take a look at it more closely and give feedback soon.

                  Cheers, and thanks for your help !! πŸ‘

                  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