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

Add glue option to combine() #535

Merged
merged 11 commits into from
Dec 11, 2020
Merged

Add glue option to combine() #535

merged 11 commits into from
Dec 11, 2020

Conversation

bragostin
Copy link
Contributor

This is the pull request solving issue #533

Add glue option to combine()
Add test of glue=True to combine()
update testcombine()
Reformat combine()
@codecov
Copy link

codecov bot commented Dec 6, 2020

Codecov Report

Merging #535 (c959907) into master (1b52f10) will increase coverage by 0.22%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #535      +/-   ##
==========================================
+ Coverage   93.94%   94.17%   +0.22%     
==========================================
  Files          30       30              
  Lines        6115     6210      +95     
  Branches      640      655      +15     
==========================================
+ Hits         5745     5848     +103     
+ Misses        235      224      -11     
- Partials      135      138       +3     
Impacted Files Coverage Δ
cadquery/cq.py 89.56% <100.00%> (+0.64%) ⬆️
tests/test_cadquery.py 99.04% <100.00%> (+<0.01%) ⬆️
tests/test_workplanes.py 99.30% <0.00%> (-0.70%) ⬇️
cadquery/occ_impl/shapes.py 91.92% <0.00%> (+0.59%) ⬆️

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 1b52f10...c959907. Read the comment docs.

Added tol=None to testCombine()
@bragostin
Copy link
Contributor Author

Codecov complains that "Added line #L2874 was not covered by tests" in cadquery/cq.py#L2874
even though I added in line 2168 of tests/test_cadquery.py

        objects1.combine(glue=True, tol=None)
        self.assertEqual(11, objects1.faces().size())

to cover the new glue=True option in combine().
Any idea what is missing?

@jmwright
Copy link
Member

jmwright commented Dec 7, 2020

@bragostin Unless it's something serious, I take what codecov says with a grain of salt (not too seriously). It often complains about things that are either non-issues or not anything major.

@adam-urbanczyk
Copy link
Member

Codecov does not make that kind of mistakes AFAIK. Probably you have only one item (cq. Compound) in objects. Just put a breakpoint in this test and verify yourself.

@bragostin
Copy link
Contributor Author

You are right @adam-urbanczyk , the problem was that I had one Compound only in objects, now Codecov passes.
What I don't understand though, is that initially I simply copied the original test, which has also one Compound only when I print objects1.vals() before combine is used.

@adam-urbanczyk
Copy link
Member

You touched this line and that's why it was taken into account in the delta coverage calculation.

@adam-urbanczyk
Copy link
Member

BTW: is this ready?

@bragostin
Copy link
Contributor Author

@adam-urbanczyk yes it is

Copy link
Member

@jmwright jmwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bragostin !

cadquery/cq.py Show resolved Hide resolved
@adam-urbanczyk adam-urbanczyk merged commit ac585b4 into CadQuery:master Dec 11, 2020
@adam-urbanczyk
Copy link
Member

Merging, thanks for the contribution @bragostin !

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.

3 participants