* Correcting poping from Path objects
Poping from a 1-lengthed Path would yield an error due to not considering that the _segments attribute would be empty after deleting the last element.
* Correcting point function
Unspecified behavior if _segments is empty
* Correcting setter and getter of start and end
* 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.
* 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
* 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.
* 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