Cloud.rb & non-world origin
-
I use the "Import points cloud" ruby plugin a lot and find it extremely useful. I believe it uses the original axis (world axes?) position as its start point for the XYZ position.
I also tend to move the origin around my models, and would like to be able to use the new "origin" rather than the original file origin.Not to infringe DB's copy/right/left, but to learn a little. Who knows, he might even add it!
I'm no programmer, but digging around in the API docs, I think this is the operation of the SU Ruby API Point3d.new. I know there are various vector transform tools in the API, so if I can identify the new axes origin point, then the rest is simple ...
How do I identify the new origin? Closest I can find is ...
axes - Geom::Transformation.axes - this will translate form world axes to new axes (but I've already done that).Any hints appreciated!
PS - it seems that this may be difficult. So I'm looking at being able to mouse-click a point as the point cloud origin. Any thoughts?
-
Hi,
If I understand well, you would have to pick a point anywhere in your drawing which would be the new reference origin for the XYZ coordinates that you import (this means translating all the points from "world coordinates system" to this new "user coordinates system", autocadly speaking ?)This can be done quite easily I think.
Let me some time (a day or two )
It's on my to-do list...
Regards, -
Thank you Didier.
Yes. That is it exactly.
I have a series of XYZ points from an arbitrary "origin" 000.
I want to overlay this on a Google Earth terrain, but the centre
of the terrain (global origin) is not where I want to have my points origin.Currently, I do a translation in Excel before importing, but this seemed like an interesting way to get into SU Ruby, and save myself some double handling!
Advertisement