Skip to content
Discussion options

You must be logged in to vote

fundamentally, you need the transform between the CAD coordinate system and the image coordinate system. Then, assuming the cad coordinates are in millimetres anyway, any distance in the CAD can be converted to a distance in pixels and vice versa. If the CAD isn't in millimetres, then you need to first scale between the CAD units and millimetres.

see my answer here: #219 (comment) for one possible solution for getting the transformation between the cad coordinate system and pixels of the resulting image.
note that to transform a vector (i.e. distance) rather than a point using a homogeneous transformation matrix can be done with:

def transform_vector(x:float, y: float, m: np.ndarray) -> T…

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mozman
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
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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
Converted from issue

This discussion was converted from issue #228 on December 11, 2020 04:51.