Andy Port
acb4085fb2
Merge pull request #58 from mxgrey/ElementTree
...
Element tree
2018-05-28 21:58:24 -07:00
Michael X. Grey
0fdaad0284
Remove unnecessary import
2018-05-29 12:54:20 +08:00
Michael X. Grey
79ab1e6a43
Remove accidental paranthesis
2018-05-29 12:42:25 +08:00
Michael X. Grey
a3649bc51e
Merging with latest upstream ElementTree branch
2018-05-29 12:34:08 +08:00
Andy Port
d4ab8ad435
updated to match master
2018-05-28 20:40:54 -07:00
Andy Port
45d3389303
Merge pull request #57 from mathandy/master
...
minor docstring improvements
2018-05-28 20:25:38 -07:00
Andy Port
609cbc776a
got rid of svg2path changes (reverted to master)
2018-05-28 20:14:45 -07:00
Andy Port
f966999bc5
minor docstring improvements
2018-05-28 19:48:48 -07:00
Andy Port
6fcc71d63b
minor docstring improvements
2018-05-28 19:46:38 -07:00
Andy Port
30d511577b
Updated with master
2018-05-28 19:35:40 -07:00
Andy Port
6da601f8a7
Merge pull request #56 from DmitryMilk/polyline-adjust-to-specification
...
Polyline/polygon parsing adjusted to specification
2018-05-28 18:50:12 -07:00
Dmitry_Milk
321e097a4e
polygon/polyline parsing tests added
2018-05-27 12:34:12 +03:00
Dmitry_Milk
2dcfa88cf2
Adjust polyline/polygon parsing to W3C specification
...
https://www.w3.org/TR/SVG11/shapes.html#PointsBNF
2018-05-27 11:47:44 +03:00
Michael X. Grey
ff96a37d16
Add a test for <path> elements that contain a 'transform' attribute
2018-05-25 16:50:40 +08:00
Michael X. Grey
a6ceec4f0d
Return a reference to an element instead of a copied dictionary of attributes
2018-05-25 16:42:36 +08:00
Michael X. Grey
b547969846
Create a unit test for parsing SVG groups
2018-05-24 19:40:41 +08:00
Michael X. Grey
29eb1e9364
Fix multiplication of numpy matrices -- need to use .dot() instead of operator*
2018-05-24 19:36:22 +08:00
Michael X. Grey
1c8ca10f73
Print out some paths to see that they're sane
2018-05-10 17:06:16 -07:00
Michael X. Grey
457a054fb8
Improve the way the svg namespace is handled
2018-05-10 17:05:47 -07:00
Michael X. Grey
a29b392234
Debugging xml namespace behavior -- needs improvement
2018-05-10 16:45:41 -07:00
Michael X. Grey
be675f1b1c
Clean up implementation of document classes
2018-05-10 12:55:19 -07:00
Michael X. Grey
f5a7fe77d1
Refactoring flatten_paths() into flatten_all_paths()
2018-05-09 17:40:49 -07:00
Michael X. Grey
3512f86968
Beginning to write tests for groups
2018-05-09 17:39:54 -07:00
Michael X. Grey
332e959f52
Finish implementation of flatten_paths
2018-05-08 16:52:36 -07:00
Michael X. Grey
88e21fcbc0
Fix merge conflicts with master
2018-05-08 13:24:50 -07:00
Michael X. Grey
70f6a78288
Implementing a depth-first flattening of groups
2018-05-08 13:22:19 -07:00
Michael X. Grey
8a4801bcde
Tweaks to transform parsing implementation
2018-05-08 11:55:37 -07:00
Michael X. Grey
17d283abe0
Iterate on the implementation of the Document class
2018-05-07 18:31:06 -07:00
Michael X. Grey
9370d3f5a2
Add a method to parse transform strings
2018-05-07 18:30:15 -07:00
Michael X. Grey
f2897f6b79
Make the Document class available when importing the library
2018-05-07 18:29:19 -07:00
Andy Port
71b4403375
fix typo `joins_smoothl_with`
2018-04-13 14:34:28 -07:00
Andy Port
29a49197a7
Merge pull request #42 from SebKuzminsky/line-line-intersect
...
Fix Line.intersect(Line) (bug #41 )
2018-02-27 22:38:33 -08:00
Andy Port
a50c522f86
use np.close to check to check for vanishing denom
...
Just to offer users some amount of control over the tolerance.
2018-02-27 22:38:01 -08:00
Sebastian Kuzminsky
89d9acf06e
Line.intersect(Line): fix a "miss some intersections" bug
...
Negative numbers are allowed in the denominator, what we really want to
avoid is near-zero denominators.
2018-01-20 20:46:54 -07:00
Sebastian Kuzminsky
cc4573ffc7
add a failing Line.intersect(Line) test
...
I introduced this bug recently, sorry! The bug is fixed in the following
commit.
2018-01-20 20:45:47 -07:00
Sebastian Kuzminsky
de600f9b91
rename test to make room for more
2018-01-20 20:36:06 -07:00
Sebastian Kuzminsky
fc34d2c4cf
deal with float rounding error in Line.intersect(Line)
...
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.
2018-01-06 23:15:43 -07:00
Sebastian Kuzminsky
847b270bc2
add a failing Line.intersect(Line) test
...
These two lines are parallel but do not intersect. Line.intersect()
finds an incorrect intersection.
2018-01-06 23:05:55 -07:00
Andy
bf95944c49
moved test for checking if `Arc()` throws `acos` domain error due to numerical error
2017-12-26 00:57:48 -05:00
Andy Port
50d7db0352
Merge pull request #31 from andersgb/acos-roundoff-fix
...
Arc parsing round-off fix
2017-12-25 23:55:26 -05:00
Andy Port
c32c7a627b
Merge pull request #34 from SebKuzminsky/fixup-offset-example
...
README: fix a type error in Offseting Paths example
2017-12-23 02:51:50 -08:00
Sebastian Kuzminsky
2a456b168d
README: remove dead code from Offsetting Paths example
2017-12-18 08:22:40 -07:00
Sebastian Kuzminsky
8c93eb0f2f
README: fix a type error in Offseting Paths example
...
Before this commit the `t = k / steps` math is done with integers,
which always results in `t = 0`.
This commit forces the math to be done with floating-point numbers,
which results in the progression of `t` values we want.
2017-12-18 00:07:26 -07:00
Andy
b54bf778b4
changed version number in preparation for PyPI update
2017-11-27 15:27:25 -08:00
Andy Port
1f074d5adc
changed setup to auto-install svgwrite + numpy
2017-11-27 15:17:29 -08:00
Anders Granskogen Bjørnstad
ec63d0c312
Arc: Handle round-off issue with acos()
...
math.acos raises outside of valid range [-1, 1]. Handle round-off errors
gracefully by using `round()` here too.
2017-11-10 13:44:24 +01:00
Anders Granskogen Bjørnstad
316dc8bfe9
test_parsing.py: Add test_roundoff example
...
This test currently fails due to math.acos(1.0000000000001) raising a
ValueError.
2017-11-10 13:43:39 +01:00
Andy
52ffcf1746
made some design changes
2017-09-19 20:47:36 -04:00
Andy
4d18ef885f
style changes
2017-09-14 22:17:58 -04:00
Andy
8a44431d5a
fixed documentation line-width to be PEP 8 compliant
2017-09-14 22:16:37 -04:00