Commit Graph

1385 Commits

Author SHA1 Message Date
c66a8cd341 Attempt to Fix spline() DocString Indentation
* Updated DocString indentation. Hopefully, that fixes the Sphinx-generated documentation. I can't currently build locally.
2021-02-17 06:19:01 -05:00
59b4d0d4c8 Don't Use Assert to Check Input Parameters
* Updated `makeSpline` to construct an explicit exception, rather than use an `assert` to check input parameters.
2021-02-17 06:14:41 -05:00
d9b0b506c8 Don't Use an Overly Restrictive Type Hint for spline()'s parameters Argument
* Changed the type hint to `Sequence` instead of `List`, since other list-like objects are acceptable, as wel.
2021-02-17 06:08:27 -05:00
172ae85c01 Put Spline scale Parameter Tests Cases Together
* Moved the tests cases, so they're next to each other.
* Added a comment about the relationship between the two test cases.
2021-02-17 06:06:34 -05:00
0a54c701ce Tidy Edge.makeSpline docstring 2021-02-16 22:04:55 +10:30
d4879652db Use Different Temporary Variables to Satisfy MyPy
* Updated `Edge.makeSpline()` to use different temporary variables in
the several for loops in the function body. Python for
[loop target variables
leak](https://eli.thegreenplace.net/2015/the-scope-of-index-variables-in-pythons-for-loops/)
to the function (or enclosing module) scope, and MyPy doesn't accept
[reusing the same variable name with a different
type](https://github.com/python/mypy/issues/1174) (except in specific
cases, and when `--allow-redefinition` is used).
2021-02-14 22:57:16 -05:00
59c7283dbc Reformat Code with black 19.10b
* Reformatted the code with `black` 19.10b. This is the version that's used by the Travis continuous integration check. The default version of `black` that comes with Conda is 20.8b1, which produces different formatting.

<environment.yml> should be updated to require the specific version of `black` used to check code before it's merged.
2021-02-14 18:40:39 -05:00
1caae595ed Add Support for Specifying Arbitrary Tangents, etc. to spline()
* Added support for specifying the tangents at arbitrary interpolation
points when interpolating a B-spline curve with `Workplane.spline()`.

* Added support for specifying whether the tangents should be
automatically scaled. (I.e., only use the tangent vector directions,
rather than their magnitudes.)

* Added support for specifying the value of the curve function
parameter at the interpolation points.

* Added support for specifying the interpolator's tolerance value.

Q: _There are a number of whitespace, and other formatting changes
introduced by `black`. Is there a specific list of parameters that you
use when running code formatting?_
2021-02-14 06:33:24 -05:00
d1ebfbac22 Merge pull request #630 from greyltc/layer-case-fix
force dxf layer name case agreement
2021-02-12 19:23:19 -05:00
5ffb1af6d3 Explain why .lower() is needed 2021-02-12 18:19:15 +01:00
0d96f63e94 Merge pull request #569 from RubenRubens/boolean
Boolean operation syntactic sugar
2021-02-12 12:04:57 -05:00
79f4bb84ce Document special members 2021-02-12 08:35:45 +01:00
ec3cef2e36 Explicit __add__ implementation 2021-02-12 08:26:59 +01:00
c9896310f2 fix lint 2021-02-11 15:01:38 +00:00
4273331406 force dxf layer name case agreement
fixes #624
2021-02-11 09:43:51 +00:00
4f820109ed + operator test 2021-02-11 08:23:50 +01:00
9f5badb42a Implement + operator 2021-02-11 08:20:47 +01:00
b6beba7cb1 Centered option (#617)
* Added 2d centered option to rect

* Added single bool center option to box

* Add single bool center option to sphere

* Added single bool center option to wedge

* Added 2d centered option to rarray

* Black fix

* Centered docstrings

Change all docstrings for centered options to be consistent and more
clear

* Docstring fixes

* Fix type hint on wedge method
2021-02-10 18:02:43 +01:00
184a985066 Merge pull request #615 from CadQuery/v2.1-update
Updates to prepare for the release of 2.1
2.1
2021-02-03 12:25:13 -05:00
7c0394c126 Updates to prepare for the release of 2.1 2021-02-03 09:55:09 -05:00
d0695ec594 Assy docs fix (#614) 2021-02-03 08:25:20 +01:00
e5e0fef27a Merge pull request #613 from marcus7070/wedge-center
Wedge center
2021-02-01 17:16:37 -05:00
be851aa98b Added tests for wedge centering 2021-02-01 20:51:27 +10:30
d42a1e6906 Fix another error in wedge centering 2021-02-01 20:36:33 +10:30
2e8d674f86 Merge pull request #611 from CadQuery/wedge-fix
Fix wedge centering
2021-01-31 19:51:24 -05:00
8fa1753a62 Fix wedge centering 2021-01-31 21:59:43 +01:00
94e0976119 Fix examples and start testing them (#609)
* Fix examples

* Added test for examples

* Fix example testing code

* Sweep example fix

* Reformat examples

* Test examples from the docs too

* Add docutils to the test requirements

* Example test fix on win+cleanup

* Use union
2021-01-31 19:00:21 +01:00
68bac660a2 Merge pull request #607 from marcus7070/fix-rect-in-tests
fix .rect calls in tests
2021-01-30 10:32:57 -05:00
490f2720e6 fix .rect calls in tests 2021-01-30 21:39:03 +10:30
36d4178024 Expose SVG Export Options and Add Some Useful Extras (#596)
* Exposed getSVG opt parameter and added project dir

* Added additional options based on feedback

* Lint updates

* Added docstring for getSVG

* Fix strange black formatting suggestion.

Co-authored-by: Marcus Boyd <50230945+marcus7070@users.noreply.github.com>

* Fixed another Lint error that I did not see locally

* Added test for STL options

* Trying to get codecov to see that line 260 is covered

* Fixed copy-paste error of the wrong test

* Mention opt in the docstring

Co-authored-by: Marcus Boyd <50230945+marcus7070@users.noreply.github.com>
Co-authored-by: Adam Urbańczyk <adam-urbanczyk@users.noreply.github.com>
2021-01-28 22:04:35 +01:00
3348c18889 cutThruAll fix for non-planar faces (#604)
* reworked cutThruAll to support non-planar faces

* Added test
2021-01-26 08:49:15 +01:00
8fcfb02ca1 Merge pull request #597 from adam-trhon/master
Fix ellipse documentation formatting
2021-01-21 05:38:33 -05:00
c0ebebab44 Merge pull request #592 from greyltc/fix-empty-solve
fix unconstrained assembly.solve()
2021-01-21 05:29:55 -05:00
27ec5c9003 Fix ellipse documentation formatting
An empty line is missing after ellipse short summary, causing the whole
text to be inserted to API Reference
(http://cadquery.readthedocs.io/en/latest/apireference.html)
2021-01-21 10:45:10 +01:00
53a76d4f28 Merge pull request #594 from daemacles/jay/add_helix_example
Add Ex025 for sweeping a wire along a helix from cq.Wire.makeHelix()
2021-01-19 05:40:13 -05:00
48d7800271 Black fix 2021-01-19 08:54:42 +01:00
ccc1983c86 Added empty solve test 2021-01-19 08:12:50 +01:00
033456ec53 Rework to raise an error 2021-01-19 08:10:05 +01:00
e483b04a70 Run black linter 2021-01-18 22:28:19 -08:00
039952cb62 Add Ex025 for sweeping a wire along a helix from cq.Wire.makeHelix() 2021-01-18 16:03:13 -08:00
311f7a8fe4 fix unconstrained assembly.solve() 2021-01-18 15:41:26 +00:00
4c77c87eac Merge pull request #584 from RubenRubens/fix-example3
remove unused variable
2021-01-16 11:24:18 -05:00
1afae0a10e remove unused variable 2021-01-16 16:20:49 +01:00
583a46b78e Use __or__ & __and__ 2021-01-16 10:58:51 +01:00
3098c90080 Indicate additional breaking changes + docstring fixes (#573)
* Additional breaking changes

* Update Wire.combine docstring

* Added relevant PR #

* Removed FreeCAD refernces in the docstrings
2021-01-15 18:27:13 +01:00
75a4ad3fa7 Change readthedocs logo (#581)
* change readthedocs logo

* remove old logo
2021-01-14 17:35:31 +01:00
c381e49240 Merge pull request #574 from RubenRubens/docs
Fix split docs
2021-01-12 20:44:57 -05:00
51373fbc35 Fix split docs 2021-01-12 18:49:36 +01:00
ccf56e6455 Merge pull request #571 from RubenRubens/docs
Change CQContext docs indentation
2021-01-12 05:29:51 -05:00
b78fa2c145 Change CQContext docs indentation 2021-01-12 10:36:08 +01:00