teigha的示例代码找到的 你可以试下- public static Point3d toEyeToWorld(LayoutHelperDevice helperDevice, int x, int y)
- {
- using (Teigha.GraphicsSystem.View pView = helperDevice.ActiveView)
- {
- Point3d wcsPt = new Point3d(x, y, 0.0);
- wcsPt = wcsPt.TransformBy((pView.ScreenMatrix * pView.ProjectionMatrix).Inverse());
- wcsPt = new Point3d(wcsPt.X, wcsPt.Y, 0.0);
- using (AbstractViewPE pVpPE = new AbstractViewPE(pView))
- {
- return wcsPt.TransformBy(pVpPE.EyeToWorld);
- }
- }
- }
|