[REQUEST] Drop on target
-
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.
-
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...
-
That could be added. But do you have an example of where components drop only a little bit?
-
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.
-
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 thetp=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... -
That's true, Raytracer doesn't check for hits on self. That can be worked around - would be similar to Drop to Target.
-
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 !!
Advertisement