Commit Graph

1629 Commits

Author SHA1 Message Date
b316461b49 Added popPendingEdges and popPendingWires to CQ Context
Also tests
2021-03-08 14:17:47 +10:30
0325474f72 findSolid errors (#655)
* findSolid returns None when no solids found

Removed a line in the findSolid docstring about raising an error if no
solids found. Added exceptions to several methods that were previously
failing with AttributeErrors when they tried to treat the None object as
a solid.

* findSolid needed type hint Optional on it's return value

* Type hint and test Workplane.findFace

* Rewrite to raise ValueError in findSolid

* I forgot about findFace again

* add exceptions to docstrings
2021-03-03 21:03:19 +01:00
0f32de98a5 Merge pull request #668 from CadQuery/docs-update
Adding dedicated import-export doc
2021-03-01 05:40:10 -05:00
45227c9971 Added a docstring to exportStl and used it in the docs 2021-02-27 07:53:59 -05:00
c06cfa5948 Update doc/importexport.rst
Updated description on TJS format

Co-authored-by: Marcus Boyd <50230945+marcus7070@users.noreply.github.com>
2021-02-27 07:24:57 -05:00
e271164efa Update doc/importexport.rst
Clarification of operation type called after toPending()

Co-authored-by: Marcus Boyd <50230945+marcus7070@users.noreply.github.com>
2021-02-27 07:23:34 -05:00
394b1b6a78 Update doc/importexport.rst
Pull importDXF docstring into docs

Co-authored-by: Marcus Boyd <50230945+marcus7070@users.noreply.github.com>
2021-02-27 07:22:14 -05:00
aa0eb803bc properly added .svg to .gitattributes 2021-02-27 15:27:12 +10:30
6328fd12e2 added .svg to .gitattributes 2021-02-27 15:20:50 +10:30
dc9b0e70d1 Merge pull request #633 from CadQuery/7.5
Move to OCCT/OCP 7.5
2021-02-26 19:36:20 -05:00
0885b198b1 Merge branch 'master' into 7.5 2021-02-26 23:05:02 +01:00
a1d00758cc Pin stubs to 7.5.1 2021-02-26 22:36:35 +01:00
622f59bcfd Finished importers-exporters documentation 2021-02-26 14:15:17 -05:00
89e6976721 Add XCAF doc init 2021-02-26 17:36:22 +01:00
3b8ebf6e16 Merge branch 'master' of github.com:CadQuery/cadquery into docs-update 2021-02-26 09:00:34 -05:00
d350c1b81a Pinning OCP-stubs version 2021-02-26 08:52:29 -05:00
f3c3d7cc7d Syncing STL export doc 2021-02-26 08:49:13 -05:00
6dd55fd65b Added DXF import, STEP import, and started STL export 2021-02-26 08:47:20 -05:00
c35b8ae224 Merge pull request #654 from RubenRubens/regex
Fix deprecation warning on regex
2021-02-26 08:17:01 -05:00
2b2c06b4a3 Started to add dedicated import-export doc 2021-02-25 17:24:32 -05:00
112024d2e3 Escape pipe symbol in selector docstrings
Sphinx decided it was a link to something
2021-02-25 12:29:18 +10:30
dc15aeab4f Fixed spelling mistakes in qc.py (#659) 2021-02-24 18:56:51 +01:00
2085054caa Fix Edge.makeEllipse HTML docs 2021-02-24 17:58:42 +10:30
e4ed881617 Merge pull request #648 from RubenRubens/remove_outdated_docs
Removes outdated docs of _extrude
2021-02-19 12:24:59 -05:00
283d92d7a7 Merge pull request #644 from CadQuery/pin-black
Pin black
2021-02-19 11:52:54 -05:00
f614780c97 Removes outdated docs of _extrude 2021-02-19 16:18:17 +01:00
606eb2773e offset2D for construction (#639)
* Added forConstruction option to Workplane.offset2D

* Added Workplane.offset2D example

Co-authored-by: Adam Urbańczyk <adam-urbanczyk@users.noreply.github.com>
2021-02-19 10:49:09 +10:30
2803243e4d Pin black 2021-02-18 17:56:23 +01:00
3505fc2ff6 Merge pull request #636 from pavpen/spline-tangents-parameters-tolerance
Add Support for Specifying Arbitrary Tangents, etc. in spline()
2021-02-18 20:57:35 +10:30
8d2c0b90c2 Black 19.10 fix 2021-02-18 11:02:55 +10:30
ff0b123889 Test periodic splines with parameters 2021-02-18 10:38:49 +10:30
6f5f0cc984 Validate Edge.makeSpline parameters for periodic splines 2021-02-18 10:38:36 +10:30
b5e4aa940f Validate Edge.makeSpline parameters input 2021-02-18 07:20:40 +10:30
a8f7a027ab Black fix 2021-02-17 21:40:05 +01:00
173f33de20 Black fix 2021-02-17 21:38:57 +01:00
9efe66c482 Fix Unit Test after Rename of spline() Parameter tolerance to tol
* Fixed the `testSplineTangentMagnitudeBelowToleranceThrows` unit test. It was failing since `spline()`'s parameter `tolerance` seems to have been renamed to `tol`.
2021-02-17 14:02:27 -05:00
bec5036d34 Additional test for spline 2021-02-17 18:04:29 +01:00
1b2a23b4f2 Shorter error message 2021-02-17 17:59:32 +01:00
e055d267df Rename param + shorter code 2021-02-17 17:54:58 +01:00
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
0dcccc351d tangentAt fix (#641)
* tangentAt fix

* Better testTangengAt

* Change default to length

* tests fix
2021-02-15 21:18:09 +01:00
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
4653834677 black fix 2021-02-13 22:58:51 +01: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