@mgianzero said:
@thomthom said:
@mgianzero said:
But how do I convert these x, y coordinates into something useful, like RGB (or true x,y,z) cartesian coordinates? I know is has something to do with the InputPoint method.
Yes - you create in InputPoint object and call the .pick method with the x and y arguments given from the Tool's mouse events. After the pick you can extract the various data you want. For X,Y,Z use inputpoint.position.
Thanks for the comments. But could you please show exactly what you mean by example? Perhaps using my code above and modify it.
Sorry but I find that I can follow these suggestions better when I have a piece of code I can work off of.
Hi Marc,
I have just started leaning ruby and not a programmer, so can't help with programming info. But look at Plugins\Utilities\utilitiestools.rb as an example. You have to activate the extension "Utilites Tools". You use the tool from the Tools menu in sketchup => Tools/Utilities/"Query Tool". It displays cursor position in the bottom title space and the VCB.
Using that as an example, helped me to write a plugin. With a little cut and paste and trial/error. My plugin just rotates everything, that is initially selected, to be parallel with an axis. You select, two points to indicate a line. And the line provides the angles for the rotation.
-Kwok