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

improve SVG import color hadling #366

Merged
merged 2 commits into from
Nov 4, 2023
Merged

Conversation

snoyer
Copy link
Contributor

@snoyer snoyer commented Nov 4, 2023

I fixed a bug in ocpsvg regarding shapes declared as filled in an SVG document but that cannot be imported as faces, for example a single line segment. That included a better method to retrieve the correct color based on the imported OCP shape type.

This PR changes the SVG importer to use the new color_for(shape) method.
The behavior should be functionally identical except for aforementioned degenerate cases. I mostly want to push this change so build123d doesn't break when I deprecate the previously used color property from ocpsvg.

Copy link

codecov bot commented Nov 4, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6389aa3) 95.80% compared to head (10b4448) 95.81%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #366      +/-   ##
==========================================
+ Coverage   95.80%   95.81%   +0.01%     
==========================================
  Files          23       23              
  Lines        7143     7144       +1     
==========================================
+ Hits         6843     6845       +2     
+ Misses        300      299       -1     
Files Coverage Δ
src/build123d/importers.py 97.46% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gumyr gumyr merged commit a27c8bd into gumyr:dev Nov 4, 2023
10 checks passed
@snoyer snoyer deleted the svg-import-color branch November 5, 2023 09:10
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