I am trying to make autodimensioning feature for detail views. To do it I am trying to firstly convert from detail view world coordinating system to screen coordinating system and then from screen coordinating system to layout coordinating system, to have a point where dimension object should be placed on layout.
Problem appears when detail view area is earlier updated by ZoomBoundingBox() function. It changes items that are apearing on detail view, but GetTransform() function is still returning the same value, do after transformation i have point coordinates that was good before zooming, not after.
Fragment of my code:
if detail: pageview.SetActiveDetail(detail.Id) #sets camera for main detail view mx=detail.Viewport.GetTransform(Rhino.DocObjects.CoordinateSystem.World,Rhino.DocObjects.CoordinateSystem.Screen)# detail.Viewport.ZoomBoundingBox(box) HideLayersOnActiveDetail(name) doc.Views.Redraw() m1=detail.Viewport.GetTransform(Rhino.DocObjects.CoordinateSystem.World,Rhino.DocObjects.CoordinateSystem.Screen) m2=pageview.MainViewport.GetTransform(Rhino.DocObjects.CoordinateSystem.Screen,Rhino.DocObjects.CoordinateSystem.World) m=m2*m1 point=Rhino.Geometry.Point3d(0,-50600,1325) Layoutpoint=m*point
debugger shows that m1=mx (was not updated by ZoomBoundingBox() function) and Layoutpoint stores coordinates of where point was before zooming.
Am I doing something wrong, do I have to commit some changes to have proper transformation matrix generated, or is it just a bug.
Any idea how to make it work?