You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I am using construction entities for simple simple operations - intersections, orientations, etc.
ConstructionLine class does not have a dedicated direction method, but potentially you can determine it from ray->direction property.
This approach is buggy, as i will show briefly.
Surely this is not intended way to determining direction, but i would prefer to have direction accessible from ConstructionLine without jumping hoops.
Anyway ConstructionLine.ray is defined (ezdxf v 1.4.2) as follows:
but ConstructionRay._direction (and thus property) defined as
which does not interpret p1&p2 as start&end, but flips based on x projection. This causes direction inversions.
Simplest way to fix it is to define ConstructionLine.ray via point point and angle to avoid projection checks!
Of course we could have direction method or prop directly, as ray property is not used elsewhere in ConstructionLine class
Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I am using construction entities for simple simple operations - intersections, orientations, etc.
ConstructionLine class does not have a dedicated direction method, but potentially you can determine it from ray->direction property.
This approach is buggy, as i will show briefly.
Surely this is not intended way to determining direction, but i would prefer to have direction accessible from ConstructionLine without jumping hoops.
Anyway ConstructionLine.ray is defined (ezdxf v 1.4.2) as follows:
but ConstructionRay._direction (and thus property) defined as
which does not interpret p1&p2 as start&end, but flips based on x projection. This causes direction inversions.
Simplest way to fix it is to define ConstructionLine.ray via point point and angle to avoid projection checks!
Of course we could have direction method or prop directly, as ray property is not used elsewhere in ConstructionLine class
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions