2D coordinates of curve endpoints in View3D

Anonymous

2D coordinates of curve endpoints in View3D

Anonymous
Not applicable

Hello everybody,

 

I want to obtain 2D coordinates at the viewport of curve endpoints within a View3D.

Therefore, I filter the visible elements with the FilteredElementCollector. Is there a way to directly obtain the 2D coordinates on the screen without doing perspective transformation of the element to the camera coordinates and project it to the image plane?

 

Greetings,

 

Chris

0 Likes
Reply
497 Views
1 Reply
Reply (1)

jeremytammik
Autodesk
Autodesk

Dear Chris,

 

Yes, there is.

 

You can use the UIView class and its two methods GetZoomCorners and GetWindowRectangle.

 

The former returns Revit XYZ coordinates, the latter a Rectangle on the screen.

 

I show how to make use of this in 

 

http://thebuildingcoder.typepad.com/blog/2012/10/uiview-windows-coordinates-referenceintersector-and...

 

Did you find any other interesting solution in the (long) meantime?

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes