Skip to content
Discussion options

You must be logged in to vote

@anmolshres98 I was able to get your desired behavior working as a view overlay, working off of Paul's comment.

If you want to extend the axis lines all the way to the edge of the viewport, you can use two points, such as the origin (in view coordinates) and the origin plus an axis's unit vector, to calculate the slope of the line you want to draw. Then you can use that slope to find where the line intersects the edge of the viewport (the left and right side of the ViewRect).

Here's a function I wrote to do that given the viewport, origin in world coordinates, and unit vector of one of the axes:

function GetAxisPoints(vp: ScreenViewport, origin: Point3d, unitVector: Vector3d): Point3d[] {
  

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@anmolshres98
Comment options

anmolshres98 Apr 3, 2025
Collaborator Author

Answer selected by anmolshres98
Comment options

anmolshres98
Apr 3, 2025
Collaborator Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants