thank you for your fast reply.
I already worked with this method and for simple point transformations it works.
The bad thing about this method is, it returns a transformation with a zero length z vector which results in a “flat” output. If you just need the position, it works perfect, but in my case i need to evaluate in which direction a vector is showing in a specific detail view. And with this transformation my vector will be flatten in z direction.
At the moment i use following code:
CRhinoPageView* page_view = 0;
CRhinoView* view = RhinoApp().ActiveView();
if (view && view->IsKindOf(RUNTIME_CLASS(CRhinoPageView)))
page_view = static_cast<CRhinoPageView*>(view);
if (0 != page_view)
ON_Xform world2screen, screen2page;
detailedViews[i]->Viewport().m_v.m_vp.GetXform(ON::world_cs, ON::screen_cs, world2screen);
page_view->Viewport().m_v.m_vp.GetXform(ON::screen_cs, ON::world_cs, screen2page);
world_to_page = screen2page * world2screen;
// TODO: transform stuff here...
But with this one i get wrong transformation in perspective views.