Commit Graph

291 Commits (35aca0f609f21238f36cab23a3a453f45735185d)

Author SHA1 Message Date
Andrew Port ee58270f66 fix incorrectly written assertTrue tests 2020-12-08 18:38:51 -08:00
Andrew Port 30f517e735 fix Arc.center being nan cause of switch to np.sqrt raising different error than math.sqrt 2020-12-08 18:21:24 -08:00
Andrew Port 44e88d54e5 derivative, normal, and unit_tangent now generalize to vectors for path segments (not paths) 2020-12-01 22:49:38 -08:00
Andrew Port f9febbd85e minor, 2/360 -> 180 2020-12-01 22:38:41 -08:00
Andrew Port 1c9363d426 arc.point now supports numpy arrays and math and cmath functions now imported from numpy 2020-12-01 22:09:20 -08:00
Andrew Port 69e2e27efb update travis secure token for pypi 2020-12-01 20:35:08 -08:00
Andrew Port ceffdc4a5b replaced f-strings to keep compatibility with python<3.6 2020-12-01 20:32:26 -08:00
Andrew Port 2fb96b0906 remove no longer used os.getcwd import 2020-12-01 20:03:30 -08:00
Andrew Port 07771be9bf remove unnecessary code block that appends CWD to filenames not involving directories 2020-12-01 20:02:35 -08:00
Andrew Port 5aeb6e3bf7 aesthetic cleanup 2020-12-01 20:00:59 -08:00
Andrew Port 0f4c9c598a set tempdir as default for writing svgs and changed timestamp default behavior 2020-12-01 19:44:54 -08:00
tatarize b3d9544624
Approximate Arcs With Beziers (#130)
* Approximate Arcs With Beziers

* Quadratic in documentation.

* Test Coverage, approximate arcs.
2020-12-01 18:37:15 -08:00
Andrew Port 45dc873f82 fix zero-radius arc crashes and crashes related to use of degenerate Path.closed attribute in parse_path() 2020-11-15 16:23:27 -08:00
Andrew Port cae729bd48 prepared for pypi 2020-11-14 23:44:19 -08:00
Andrew Port 110acc9e00 version -> 1.4.1 2020-11-14 23:42:36 -08:00
Andrew Port 7a183c4e3c aesthetic changes 2020-11-14 23:37:09 -08:00
Andrew Port 9fa559a070 change setup to use md readme and remove rst readme 2020-11-14 23:31:53 -08:00
Andrew Port 1b4ed34ac9 fix messed up setup 2020-11-14 23:30:19 -08:00
Andrew Port 772d6698bf add markdown readme 2020-11-14 23:29:16 -08:00
Andrew Port bdbd976e0a commit branch 2020-11-14 23:22:09 -08:00
Andy Port d354b8ffe4 auto-deploy with travis-ci on new tag 2020-08-04 18:52:45 -07:00
Andy Port 8f92e43f58 prep for PyPI update 2020-08-04 18:22:20 -07:00
Andy Port 4342501591 prep for PyPI update 2020-08-04 18:22:15 -07:00
tatarize 0c9dd318aa
Fix Issue #99 + Test Coverage. (#115) 2020-07-16 17:51:07 -07:00
Andy Port 1a4807e929 fix error related feeding str to polyline2pathd 2020-07-06 17:33:24 -07:00
Andy Port 12c8d07bad fix error related feeding str to polyline2pathd 2020-07-06 17:30:30 -07:00
Andy Port 22f3dafe87 remove unused numpy import 2020-07-06 17:21:29 -07:00
Andy Port 945ae49967 fixed test_group_flatten for document.py changes 2020-07-06 11:13:47 -07:00
tatarize 90dfeb7b13
Move Path Parsing into Path. (#114) 2020-07-06 11:01:15 -07:00
Andy Port c89c68f421 speed up randialrange for Line objects 2020-07-01 22:31:57 -07:00
Andy Port ab44fcd564 save and write fixed, __repr__() and pretty() methods added 2020-06-23 22:42:23 -07:00
Andy Port 4b7f17c7bd minor line width fix 2020-06-23 22:18:26 -07:00
Andy Port 70534a6b6c added vectorized points() method for bezier segments 2020-06-23 22:16:09 -07:00
Andy Port 1f7503aabd some renames and add __repr__ and pretty() 2020-06-23 21:54:58 -07:00
Andy Port 445899b2eb renamed Document.flatten_all_paths to flattened_paths 2020-06-23 20:54:27 -07:00
Andy Port d673176347 Document now stores element and transform in path and Document.display() is fixed 2020-06-23 20:50:43 -07:00
NataliaTs b503b9b3a5
fix polyline and polygon conversion (#85)
* fix polyline and polygon conversion

* update version

* revert version
2020-06-19 20:32:01 -07:00
Andy Port b714ff872d add Path.attributes and Path.meta attributes 2020-06-19 20:21:28 -07:00
Sebastian Kuzminsky 685f9a6eaf
fix Arc/Arc intersections (#110)
* add some failing Arc.intersect(Arc) tests

* implementing Arc.intersect(Arc)

This commit adds special handling in Arc.intersect() when the other
segment is an Arc, and when both segments are circular and non-rotated.

This particular case is common, and quick and easy to solve algebraically.

This commit fixes the failing tests added in the previous commit.
2020-06-19 19:40:38 -07:00
Matthew Carruth 5ae88df6d5
actually return svgwrite.Drawing if requested (#102)
no use having the option if the wsvg and paths2Drawing entry points do not return `dwg` back from disvg
2020-06-19 19:39:38 -07:00
David Romero 90f8f76185
Method for checking if one path is inside another path (#105)
* Added method is_contained_by to the Path class

* Adding a requirements.txt file

Signed-off-by: David Romero <dromero.fisica@gmail.com>

* Correcting tests of is_contained_by
2020-06-19 19:36:22 -07:00
Grey f99f9d6bb3
Support flattening paths of only nested groups (#88)
* Fixed document.flatten_group(~) for nested groups and added a test

* Add space for PEP8 conformance

* Add documentation for document.get_group()

* Use group_search_xpath to be consistent and customizable

* Fix lexical mistake in comments

* Fix grammar mistake in comments
2020-06-19 18:59:47 -07:00
Antoine Beyeler b117f85811
Fixed crash in line2pathd() (#101)
* Fixed crash in line2pathd().

* Further fixed to support implicit attributes
2020-06-19 18:58:25 -07:00
ugultopu 538b8777e1
Remove explicitly installing requirements (#76)
Since a PIP package has requirements data in it, when installing that package, if requirements have not already been installed, PIP handles installing them automatically. There is no need to install them explicitly.
2020-06-19 18:55:32 -07:00
Antoine Beyeler b767536e38
Fixed MutableSequence import (importing from collections is deprecated) (#100) 2020-06-19 18:52:09 -07:00
Sebastian Kuzminsky 2eb8fb62ed
test: show arguments that failed, to aid debugging (#83) 2020-06-19 18:47:04 -07:00
Sebastian Kuzminsky 929202aa62
Cache arc length (#82)
* add Arc.__hash__()

This function returns a hash of the Arc parameters, providing a kind of
Arc object fingerprint.

* Arc: cache segment length

Computing the length of an Arc segment takes a relatively long time.

This commit teaches the Arc class to remember its segment length,
to avoid recomputing it.  It invalidates the cache and recomputes the
segment length if any of the Arc parameters have changed.
2020-06-19 18:45:56 -07:00
taoari c7b6c030a6
relative path support (#81)
* relative path support

* add test for path.d(rel=True)

* add path test to test_path.py
2020-06-19 18:43:29 -07:00
Sebastian Kuzminsky 8457dc01ee
fix Arc.sweep when transform scale flips it around (#112)
Fixes #111.
2020-06-19 18:29:36 -07:00
skef fd7348a1df Fix tuple assignment (#86) 2019-01-07 21:24:35 -08:00