Skip to content
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 dxf arc export for some partial circles #455

Merged
merged 3 commits into from
Sep 27, 2020

Conversation

snagy
Copy link
Contributor

@snagy snagy commented Sep 25, 2020

Hey folks!

I'm not sure if this is the 'right' fix, but some partial circles (specifically, the ones with c_dz.XYZ().Z() < 0) were exporting flipped for me.

The changes are pretty minor, and fixed all the broken arcs on my data. Basically, rotate the arc 180 degrees. I also flipped the start/end and used the is_counterclockwise flag for those arcs.

Broken:
Screen Shot 2020-09-24 at 11 41 26 PM

Fixed:
Screen Shot 2020-09-24 at 11 41 57 PM

@adam-urbanczyk
Copy link
Member

Thanks a lot @snagy ! Could you fix the formatting (black is complaining in CI)? It would be also great if you could share some code that triggers this issue - maybe we could add it to the tests.

@snagy
Copy link
Contributor Author

snagy commented Sep 27, 2020

@adam-urbanczyk done and done!

@codecov
Copy link

codecov bot commented Sep 27, 2020

Codecov Report

Merging #455 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #455   +/-   ##
=======================================
  Coverage   93.61%   93.62%           
=======================================
  Files          25       25           
  Lines        5326     5332    +6     
  Branches      554      554           
=======================================
+ Hits         4986     4992    +6     
  Misses        215      215           
  Partials      125      125           
Impacted Files Coverage Δ
cadquery/occ_impl/exporters/dxf.py 92.85% <100.00%> (ø)
tests/test_exporters.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da07216...6217bc6. Read the comment docs.

@adam-urbanczyk
Copy link
Member

Looks good, thanks @snagy !

@adam-urbanczyk adam-urbanczyk merged commit c819dfc into CadQuery:master Sep 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants