* add some tests of Path.area()
These tests currently fail because area() doesn't deal with Arc segments.
Fix in the following commit.
* make Path.area() approximate arcs
Fixes#37.
* Path.area(): fixup tabs/spaces for python3
* added asin to imports
* added asin to imports
* minor improvements to style, performance, and docstring
* add Line.point_to_t() and tests
These tests don't print anything while they run, and they use use the
assert() helpers from the unittest module.
* add Arc.point_to_t() and tests
These tests don't print anything while they run, and they use use the
assert() helpers from the unittest module.
* add a bunch of failing arc/line intersection tests
This commit contains a bunch of failing arc/line intersections that I
and other people have run into.
These tests don't print anything while they run, and they use use the
assert() helpers from the unittest module where possible.
All these tests are fixed in the following commit.
* better implementation of Arc.intersect(Line)
Fixesmathandy/svgpathtools#35.
This commit fixes all the arc/line intersection test cases added in the
previous commit.
This implementation provides special handling in Arc.intersect() when
`self` is a non-rotated Arc and `other_seg` is a Line. In this case
it uses the straight-forward closed-form solution to identify the
intersection points.
Rotated Arcs and Arcs intersecting with non-Line objects still use
the pre-existing intersection code, that part is totally untouched by
this commit.
* add Line.point_to_t() and tests
* add Arc.point_to_t() and tests
* add a bunch of failing arc/line intersection tests
This commit contains a bunch of failing arc/line intersections that I
and other people have run into.
All these tests are fixed in the following commit.
* better implementation of Arc.intersect(Line)
Fixesmathandy/svgpathtools#35.
This commit fixes all the arc/line intersection test cases added in the
previous commit.
This implementation provides special handling in Arc.intersect() when
`self` is a non-rotated Arc and `other_seg` is a Line. In this case
it uses the straight-forward closed-form solution to identify the
intersection points.
Rotated Arcs and Arcs intersecting with non-Line objects still use
the pre-existing intersection code, that part is totally untouched by
this commit.
* Some progress (and added CONTRIBUTING.md)
* fixed documentation line-width to be PEP 8 compliant
* fixed documentation line-width to be PEP 8 compliant
* style changes
* made some design changes
* Make the Document class available when importing the library
* Add a method to parse transform strings
* Iterate on the implementation of the Document class
* Tweaks to transform parsing implementation
* Implementing a depth-first flattening of groups
* Finish implementation of flatten_paths
* Beginning to write tests for groups
* Refactoring flatten_paths() into flatten_all_paths()
* Clean up implementation of document classes
* Debugging xml namespace behavior -- needs improvement
* Improve the way the svg namespace is handled
* Print out some paths to see that they're sane
* Fix multiplication of numpy matrices -- need to use .dot() instead of operator*
* Create a unit test for parsing SVG groups
* Return a reference to an element instead of a copied dictionary of attributes
* Add a test for <path> elements that contain a 'transform' attribute
* minor docstring improvements
* got rid of svg2path changes (reverted to master)
* updated to match master
* Remove accidental paranthesis
* Remove unnecessary import
* Use a default width and height of 0, as dictated by SVG specs, in case width or height is missing
* Expose the CONVERSIONS and CONVERT_ONLY_PATHS constants
* Fix the use of some numpy operations
* Remove untested functions
* Fix add_group() and write tests for adding groups and paths
* Update documentation of document module
* Add tests for parsing transforms
* Update the module name for svg_to_paths
* Improve Python3 compatibility
* Try to improve compatibility
* More tweaks for compatibility
This commit fixes#41.
In the test case added in the previous commit, two non-intersecting lines
are very nearly collinear, but float rounding errors lead to incorrect
intersections reported.
This commit makes Line.intersect() treat denominators below 1e-9 as 0,
to make it more accepting of float rounding.
-fixed quadratic/Arc intersections
-changed assertion that an arc's radii are positive to non-zero
-improved Arc.intersect() docstring to further explain partial
implementation
The rotated method of all objects was not using the origin argument but always self.point(0.5) even though it is all correctly handled in the rotate function they are all calling