Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Feature: Polar Array #301

Merged
merged 8 commits into from Nov 29, 2018
Merged

Feature: Polar Array #301

merged 8 commits into from Nov 29, 2018

Conversation

bweissinger
Copy link
Contributor

Adds #299

@coveralls
Copy link

coveralls commented Nov 27, 2018

Coverage Status

Coverage increased (+0.01%) to 92.287% when pulling f0c75a3 on bweissinger:polar-array into ae8eaed on dcowden:master.

@AppVeyorBot
Copy link

@codecov-io
Copy link

codecov-io commented Nov 27, 2018

Codecov Report

Merging #301 into master will increase coverage by <.01%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #301      +/-   ##
==========================================
+ Coverage   92.81%   92.82%   +<.01%     
==========================================
  Files          10       10              
  Lines        2213     2230      +17     
==========================================
+ Hits         2054     2070      +16     
- Misses        159      160       +1
Impacted Files Coverage Δ
cadquery/cq.py 94.33% <94.11%> (-0.01%) ⬇️

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 ae8eaed...f0c75a3. Read the comment docs.

Copy link
Contributor

@fragmuffin fragmuffin left a comment

Choose a reason for hiding this comment

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

Just putting in my 2cents

cadquery/cq.py Outdated
"""

if radius <= 0:
raise ValueError("Radius must be > 0 ")
Copy link
Contributor

Choose a reason for hiding this comment

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

A negative radius would work just fine, and may be a result of figuring out geometry mathematically.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I agree it should go. I suppose I just didn't like the idea of a filthy negative radius...

cadquery/cq.py Outdated
4 elements will set elements at 0, 30, 60, and 90 as expected. Angle /
count would place elements at 0, 22.5, 45, and 67.5. If fill angle
is a full circle, the correction is not needed.
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't be added to the docstring, should this be a comment?

cadquery/cq.py Outdated
raise ValueError("Angle cannot be 0")

if startAngle < -360 or startAngle > 360:
raise ValueError("Start angle must be in range: -360 to 360")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why? similar to negative radius restriction

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Completely correct, that does not need to be there.

@bweissinger
Copy link
Contributor Author

@fragmuffin brought up some good points. I think the only restriction that needs to stay is the count, although maybe change that to allow for a single element array?

The logic for fill angle calculation should also be changed to a more general form. Why don't I go back and make some tweaks and clean things up a bit.

@AppVeyorBot
Copy link

@jmwright
Copy link
Collaborator

@bweissinger It looks like the comments from @fragmuffin have been addressed. Is this ready to merge?

@dcowden
Copy link
Owner

dcowden commented Nov 29, 2018

This looks great to me!
Is it ready to merge?

@bweissinger
Copy link
Contributor Author

I believe so.

@jmwright jmwright merged commit a0e6b6d into dcowden:master Nov 29, 2018
@jmwright
Copy link
Collaborator

@bweissinger Thanks for another great contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants