cadquery
cadquery copied to clipboard
Fix lineTo to do nothing instead of raising error when 0 length
Before the change it raised an error when startPoint and endPoint were equal
Codecov Report
Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
Project coverage is 94.83%. Comparing base (
33f72d2) to head (e3d6907).
| Files | Patch % | Lines |
|---|---|---|
| cadquery/cq.py | 0.00% | 1 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #1606 +/- ##
==========================================
- Coverage 94.86% 94.83% -0.04%
==========================================
Files 28 28
Lines 6231 6233 +2
Branches 1264 1265 +1
==========================================
Hits 5911 5911
- Misses 193 194 +1
- Partials 127 128 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Why is this desired? 0 length line sounds like a user mistake that should result in an error.
When automating parametric design, it can be more comfortable not having to deal with the edge case of 0 length. At least in my case, it allowed for easier and more flexible parametric modelling. (A line that in some configurations has a finite length, can easily be omitted in other configurations when it is not needed)