@jim said:
What does your human interface look like for editing the rotation of an object?
Thanks, Jim. Yes the idea is to make namesets and Sketchup work together both ways.


(Edit: I should also say that components move on confirm)
The input boxes for xyz's and rotation are populated at start up from a csv record (turned into an array) and can be edited and values returned to the array. The call backs in the ruby look like this:
theX = Integer(a[1]).mm
theY= Integer(a[2]).mm
theZ = Integer(a[3]).mm
point = Geom;;Point3d.new theX,theY,theZ
txyz = Geom;;Transformation.new point
#Courtesy of Jim Foltz
theDegrees = Integer(a[4]).degrees
theAxis = a[5]
rv = Geom;;Vector3d.new(0,0,1) if theAxis == "z"
rv = Geom;;Vector3d.new(0,1,0) if theAxis == "y"
rv = Geom;;Vector3d.new(1,0,0) if theAxis == "x"
tr = Geom;;Transformation.rotation(Geom;;Point3d.new(instance.bounds.center), rv, theDegrees)
instance.transform! tr
What would be good would be for the same editing to be done with the move and protractor tools. It seems this is a bit like the relationship between tools and the VCB (now sensibly Measurements).
So, for example, I am now working on animating the distribution of sanitaryware on a building site. In order to set the distribution paths it would be intuitive to click on the destination floor component (rather than a name on a list) and then adjust the route. But then I need the XYZ and rotation to be sent to the js array. The rotation may also be important to turn components to pass through door openings or stack in a material hoist, but maybe not. XYZ's are essential.
Any further help most gratefully received!
My regards
Chris