Jump to content

Screen X Value


Recommended Posts

Hi @Jiajing,

   The math is quite convoluted, so if you can avoid it I recommend you do.

 

   There are functions that translate between Model Space (rotated plan view) and Screen Plane:

ModelPt2DToScreenPt()

ModelVecToScreenVec()

and

ScreenPtToModelPt2D()

ScreenVecToModelVec()

 

   At one point I tried to figure out the differences between the function pairs, but didn't find anything so I quit looking. When I wrote scripts to work in Rotated Plan, I always used ModelVecToScreenVec() to return the screen X&Y from the model coordinates, and ScreenVecToModelVec() to change screen coordinates to model coordinates. If you need to understand the math to do the same thing, send me a PM and we chat offline. 

 

   None of the basic VectorScript commands (meaning all of the Get and Set graphic commands) work directly in Rotated Plan, but if you massage the coordinates you want with the functions above, you can send the massaged numbers through the standard calls to make things look right. For some tasks it may be easier to unrotate the view, run your code, and re-rotate the view when done. Oh, I almost forgot, if the User Origin is moved, it's worse – much worse.

 

HTH,

Raymond

Link to comment
  • 3 weeks later...
Posted (edited)

Hello @MullinRJ

 

This is great to get me started. I will try out those first, I'm sure I'll send a DM after I tried out his.

 

The context is exactly what you mentioned, it is about origin, user origin , hoist origin and rotated view.

 

Thank you.

 

Jiajing

Edited by Jiajing
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...