FlyingSamson
1771fbfb06
Add factory method for creating from string holding svg object
2022-05-22 15:30:48 +02:00
FlyingSamson
50b335f3da
Add convenience functions for converting svgs contained in a string to paths
2022-05-22 14:37:27 +02:00
FlyingSamson
ce43c75cd8
Allow file-like object as input to Documents ctor and svg2paths function
2022-05-22 13:09:13 +02:00
chanicpanic
19df25b99b
Fix Document.add_path for empty groups ( #170 )
2022-02-27 18:48:50 -08:00
Andrew Port
c84c897bf2
aesthetic cleanup
2022-02-03 18:11:55 -08:00
Andrew Port
ac138b8e5d
aesthetic cleanup
2022-02-03 18:10:00 -08:00
Andrew Port
2dc06df20f
rounded rect now parsed properly if only rx or only ry is included
2022-02-03 18:09:09 -08:00
Andrew Port
72fa3dcf17
Merge branch 'master' of github.com:mathandy/svgpathtools
2022-01-25 17:45:24 -08:00
Catherine Holloway
6c655ad220
add support for rounded rectangles ( #161 )
2022-01-25 17:23:04 -08:00
Andrew Port
5037fac574
fix issue with filenames with no directory causing error
2021-11-26 18:34:58 -08:00
Andrew Port
abd99f0846
fix issue with filenames with no directory causing error
2021-11-26 18:31:38 -08:00
Andrew Port
d1421d6286
fix issue with filenames with no directory causing error
2021-11-26 18:23:07 -08:00
Julian Rüth
39d3ba713f
Fix implementation of points() ( #155 )
...
fix incorrect implementation of `points` method
2021-09-26 18:22:09 -07:00
Andrew Port
e993ff95c5
fix issue 156 caused by arc.intersect returning values of t outside [0, 1]
2021-09-23 00:17:19 -07:00
Andrew Port
e0f212a334
make paths and path semgents hashable
2021-09-22 21:19:13 -07:00
Andrew Port
9c2e403036
style change to prevent false codacy critical alert
2021-09-17 23:38:01 -07:00
Andrew Port
3d22a7cf52
remove redundant is_bezier_segment and is_path_segment defs
2021-09-17 22:35:27 -07:00
Vrroom
baba1d18b2
arc transform fixed ( #98 )
...
* arc transform fixed
* Update svgpathtools/path.py
Co-authored-by: Matthijs Kooijman <matthijs@stdin.nl>
* Fixed rotation bug in transformation of arcs
* Made compatible with python2.7
Changed the shorthand @ for np matrix multiplication to matmul
Co-authored-by: vrroom <vrroomc@github.com>
Co-authored-by: Matthijs Kooijman <matthijs@stdin.nl>
2021-06-22 20:28:24 -07:00
Wes Bouaziz
1e5bfb4252
Correcting a few functions not handling Path having empty _segments ( #143 )
...
* 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
2021-05-10 21:12:06 -07:00
Nathan Hurst
a0fc28849c
add support for units and handle mindim=None correctly. ( #149 )
...
* add support for units and handle mindim=None correctly.
* Move baseunit positional argument to the end to avoid disruption.
2021-05-10 21:09:58 -07:00
tatarize
3a1fe8695d
Bug Corrections. Closes #113 , #95 , #94 , and #71 ( #136 )
...
* Closes #113
Previous fix stopped working because numpy is more liberal dividing by zero and returning nan values.
* Closes #71
* Closes #95
* Closes #94
2021-01-16 20:08:58 -08:00
Andrew Port
091394b5e3
fixed problem with path joints becoming discontious after transformation
2020-12-08 22:36:16 -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
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
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
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