Commit Graph

21 Commits

Author SHA1 Message Date
AU
995d1393bd Free function api (#1469)
* Initial free functions

* Mypy fixes

* Add a mypy plugin that handles _get*

* More helpers and fixes

* black

* More hooks

* More ops and primitives

* Fill with constraints and cap

* Minimal docstrings and mypy fix

* Bool op operators for Shape

* Extra docstring

* Added spline primitive

* Added alternative constructors

* Update solid

* Add shape normalization

* Add text

* Added moved overload

* Another moved overload

* Convert location constructor to multimethod

* Additional Loc constructor

* Extra vertex constructor

* Additional cone overload

* Start with tests

* Fix compouund normalization

* Bool op tests

* Additional Location overload

* test moved and fix bool ops

* Different cap params

* More tests

* Test revolve and offset

* Test sweep and loft

* Add bool ops

* More tests

* Test text

* Improve coverage for utils

* More move[d] and Location overloads

* Start working on some docs

* Update index

* Doc fix

* Typo fix

* More move/moved overloads

* Small doc update

* Better Location coverage

* Fix angle units in Location

* More docs and a usability fix

* Cosmetics

* Mypy fix

* Remove dead code

* Coverage tweaks

* More docs'

* Box centering and box/plane arg order

* Docs cosmetics - nicer sweep

* Apply suggestions

Co-authored-by: Jeremy Wright <wrightjmf@gmail.com>

* Add docstrings

* Doc tweaks

* Bump multimethod version

* Add occ_impl.shapes

* Mention free funcs in the primer

* Typos

* Typo

* Punctuation

---------

Co-authored-by: Jeremy Wright <wrightjmf@gmail.com>
2024-05-05 11:25:45 +02:00
3451007f8e Add support for 2D and 3D Wire fillet (#1549)
* Add support for 2D and 3D Wire fillet

* Change wire fillet signature to vertex coordinate list instead of index list

* Fix type error in Wire.fillet

* Simplify logic a little bit

* black fix

* Trying to fix the test

* Additional methods for Wire

* Fix formatting and logic

* Fix for closed wires

* Fix test

* Remove unused methods

* Fix typo in shapes.Wire.fillet comment

---------

Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
2024-04-06 20:41:00 +02:00
d1a3a921e9 Add matrix of inertia (#1460)
* add matrix of inertia + test

* ran black and revert changes made by isort

* add test to cover NotImplementedError for Vertex
2024-01-02 08:16:56 -05:00
24ae7bc61c Add close option to Wire.makePolygon
Close wire when creating polygonal face in Sketch
2023-02-02 20:32:48 -05:00
AU
53045e7fd1 Surface modeling functionality (#1007)
* Thicken and extend nsided

* Accept wires too

* Implement project

* Add distance(s), project and constructOn

* Convert to VectorLike

* Allow VectorLike everywhere

* Implement Location ** and allow VectorLike

* Additional tests for Location

* Refactor interpPlate

* Fix tests

* Project and distance tests

* More tests

* More tests

* Use Real for dispatch

* Better coverage
2022-07-08 08:15:25 +02:00
f19c35c83c until extrude/cutblind (#875)
* Move dprism to Mixin3D

Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
Co-authored-by: Marcus Boyd <mwb@geosol.com.au>
2021-09-26 20:05:56 +09:30
AU
1508f15d03 Merge branch 'master' into master 2021-09-08 08:17:06 +02:00
93623fa9bd #788 Add __repr__ and __str__ methods to Matrix (#791)
* #788 Add __repr__ and __str__ methods to Matrix

* Shortened code with join & improved test

* Renamed variable and fixed use of join

* Replaced __getitem__ with transposed_list

* Optimized repr and removed str methods

* Cleanup comment

* Increased geom.py code coverage to near 100%

* Reformatted with black 19.10b0 defaults

* Remove the typing import
2021-08-12 20:38:06 +02:00
AGD
2fbb68f4c3 Added '*' operator support for cq.Vector where cq.Vector is the right operand 2021-07-26 10:02:09 +08:00
AGD
1688a82b6b Added unit test for cq.Vector.projectToLine() 2021-07-25 16:14:02 +08:00
3136ede020 Added radius method to Mixin1D 2020-11-18 19:39:17 +10:30
c8c21d7d11 Black fix 2020-09-09 11:48:08 +02:00
cc4dd03e54 Test additional Loc ctor 2020-09-04 10:18:11 +02:00
86810448e1 More tests for the Location class 2020-06-22 17:35:58 +02:00
191d78d558 Test fixes 2020-06-17 21:04:54 +02:00
eda79b40e9 Merge branch 'master' into OCP 2020-03-22 17:53:01 +01:00
ae305501e1 Merge branch 'master' into marcus7070/tangentArc 2020-03-19 08:46:22 +01:00
a499a4b5d3 Ellipse (#265)
* added ellipse

* removed unused math imports

* added method ellipseArc and adapted method ellipse to circle

* introduced sense for ellipse building

* adapted ellipse test cases

* exclude vscode config folder

* use gp_Ax2(p, zdir, xdir) for ellipse building

* ran black against the changes

* Fix docstring of makeEllipse

Co-Authored-By: Adam Urbańczyk <adam-urbanczyk@users.noreply.github.com>

* Fix return value in docstring of makeEllips

Co-Authored-By: Adam Urbańczyk <adam-urbanczyk@users.noreply.github.com>

* Formatting fix

* Increase test coverage

* Formatting fixes

* Add test for makeEllipse

* Test fix

* Formatting + typo fix

Co-authored-by: Bernhard <bwalter42@gmail.com>
Co-authored-by: Adam Urbańczyk <adam-urbanczyk@users.noreply.github.com>
2020-03-15 14:04:48 +01:00
b89bc44f86 Added Workplane.tangentArcToPoint, occ_impl.shapes.Edge.makeTangentArc 2020-03-14 19:44:11 +10:30
102c16c14e Add Black formatting check to CI (#255)
* Add Black formatting check to CI
* Add some documentation for code contributors
* Use uncompromised code formatting
2020-01-20 20:52:12 +01:00
5069483aef Use pytest to run the test suite 2019-12-12 20:58:47 +01:00