-
Notifications
You must be signed in to change notification settings - Fork 391
Fix plane rotation method (again...) #243
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
Conversation
|
Ok, so NumPy is not a dependency of CadQuery. 😅 Will have a look later, or tomorrow, to see if I see an alternative |
It must be at least an implicit dep of CQ 2.0 because I have a freshly built cadquery Anaconda environment and can do |
|
I personally would be fine with installing numpy via pip in the CI environments. It seems to be included in the Anaconda environment, and I think that Numpy is too natural of a package to use with CadQuery not to include it anyway. |
0febd8c to
e7608e1
Compare
|
@jmwright I added NumPy as a dependency for now. Just to make tests pass. I am more interested in receiving feedback about the implementation. If I have to remove NumPy dependency, happy to do so. That would be a minor thing. 😊 Anyway, NumPy feels natural to me here too. |
Codecov Report
@@ Coverage Diff @@
## master #243 +/- ##
==========================================
- Coverage 94.95% 94.87% -0.09%
==========================================
Files 18 18
Lines 4279 4308 +29
==========================================
+ Hits 4063 4087 +24
- Misses 216 221 +5
Continue to review full report at Codecov.
|
|
@Peque I do not get it - why the changes in geom? |
|
@adam-urbanczyk The rotation matrix ( I hope the tests are clear though. Plane rotations needed some tests. ❤️ |
|
By the way, the methods That is the reason why Codecov complains about some misses: I left an |
|
@adam-urbanczyk Friendly ping. 😇 |
adam-urbanczyk
left a comment
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.
Thanks for picking this up @Peque !
|
I'm cross-referencing issues here. |
|
@adam-urbanczyk Thanks for having a look at #255. 😊 This MR is ready too. I pushed changes after your suggestions/corrections. Did not resolve the conversations since I think only the one requesting changes should be deciding whether or not the changes actually resolved what they asked for. If you are okay with it, I will squash the fixup commits and force-push the branch before merging. I think it could be merged before reaching an agreement on a new API and implementing the required changes (#254). This MR only fixes the current behavior without changing the API. |
|
@adam-urbanczyk @Peque Where are we at on this PR? It sounds like it might be ready for a final check. |
|
Alright let's merge this - @Peque I added one minor comment request (to clarify the situation for ppl reading the code in the future - we abused the Vector to store angles which is probably very confusing). Note that the behavior w.r.t. original version is changing here (although the docs were describing the behavior implemented correctly in this PR). |
|
@adam-urbanczyk Tell me if you want me to squash this or if you would rather do it yourself (I have pushed all changes as "fixup" commits for easier review). Same for rebasing against |
|
@Peque Looks like the Black lint check threw an error. |
b78d4f2 to
79f220c
Compare
|
@jmwright Rebased and force-pushed, fixing formatting too. |
|
Looks good, thanks @Peque ! |
So, it seems the test I implemented in #235 was not very complete. Out of laziness, I only used "random" planes with the normal in the X, Y or Z directions. Therefore, the implementation was broken. 😓
Hopefully, these tests are now more complete and exhaustive.
About the implementation... I wanted to open the PR to hear from you. It looks so ugly and I do not know much, or anything, about Python-OCC. So I bet it can be implemented differently and more elegantly. 😇
@adam-urbanczyk @jmwright @dcowden @fragmuffin Any suggestions?