-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix percentage distance methods #339
base: main
Are you sure you want to change the base?
Conversation
…by update to get_coordinate_from_distance methods.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #339 +/- ##
==========================================
+ Coverage 87.08% 87.20% +0.12%
==========================================
Files 20 20
Lines 2028 2048 +20
==========================================
+ Hits 1766 1786 +20
Misses 262 262 |
@JackB-Ansys You will need to improve the existing tests to cover all the new lines of code |
return Coordinate(x, y) | ||
|
||
def get_coordinate_from_distance(self, ref_coordinate, distance): | ||
def get_coordinate_from_distance( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change. @matthewAnsys thoughts?
@@ -531,14 +531,31 @@ def test_line_length(): | |||
assert line.length == sqrt(2) | |||
|
|||
|
|||
def test_arc_get_coordinate_from_percentage_distance(): | |||
def test_arc_get_coordinate_from_fractional_distance(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make sure this also works for arcs with negative radius
Needs merge from main |
…entage_distance_methods # Conflicts: # src/ansys/motorcad/core/geometry.py # tests/test_geometry.py
… tests for new optional arguments)
…ts for warnings when multiple arguments are given)
…t for arc drawn with negative radius)
Deprecate get_coordinate_from_percentage_distance methods because these actually use fractional distances. Replace this functionality by adding optional arguments for get_coordinate_from_distance, where user can specify a percentage or fraction instead of specifying an absolute distance.