c236fdb81b
Add __repr__ methods to most objects`
...
These are closer to what __str__ should be and will likely change in the
future.
2020-05-11 20:31:07 -07:00
c79eee2a8c
Stricter locking (lock contained ndarrays and turn lists into tuples)
2020-05-11 19:29:00 -07:00
157df47884
Improve type annotations based on mypy errors
2020-05-11 19:09:35 -07:00
bd4085365f
Path should create a Path, not a Polygon
2020-05-11 19:04:25 -07:00
9bfb3bef9f
avoid unnecessarily nested classes
...
Still provide a class variable for convenience
2020-05-11 19:03:55 -07:00
fa8fc52dd6
Improve consistency of ndarray members
2020-05-11 18:49:30 -07:00
334633662e
Remove extra __author__ declarations
2020-05-11 18:41:13 -07:00
df179c9233
Improve type annotations for layer
2020-05-11 18:39:02 -07:00
5adabfd25a
Docstring format change
...
(new param and return format)
Also some minor code formatting fixes in utils
2020-02-17 21:02:53 -08:00
25c9e591cb
shapes: unlock before modifying during deepcopy
2019-12-13 21:18:31 -08:00
e0db621595
allow locking of all objects
2019-12-13 21:18:31 -08:00
2259e7987b
don't rename shape.to_polygons() args
2019-06-09 23:59:55 -07:00
dcd8324eb4
Use to_polygons() for bounds calculation for simple path shapes
2019-05-20 21:06:28 -07:00
75b42f6b63
Use normalize_mirror for all 2d-to-1d mirroring
2019-05-18 15:05:30 -07:00
ca80b14ee4
Fix text get_bounds
...
was addressing list using numpy slices
2019-05-17 01:20:10 -07:00
a154555902
Add TODO noting that polygon mirroring could be normalized
2019-05-17 00:42:14 -07:00
f00d283c56
Add missing imports
2019-05-17 00:41:43 -07:00
032c410b43
Add mirror_x to extrinsic properties
...
It's not implemented for Polygon shapes, since I haven't thought about
how to normalize those for reflection yet
2019-05-17 00:41:26 -07:00
2e54cf1080
initialize identifier for text shapes
2019-05-17 00:39:56 -07:00
16c6bfc70a
Cosmetic changes to argument lists
2019-05-17 00:39:46 -07:00
38f64f7c62
Use __slots__ for class members
...
Also use the other sort of type hints for instance variables
2019-05-17 00:37:56 -07:00
a461446059
Custom deepcopy() implementations to help speed things up
2019-05-15 00:19:37 -07:00
94410dffc9
Fix clockwise (to-perp) path bends
2019-05-15 00:18:43 -07:00
2909b25fd7
Missing args for commit bc43be48bc
(cap_extensions)
2019-05-15 00:17:40 -07:00
a44a7c176e
Add type hints
2019-05-15 00:14:35 -07:00
bc43be48bc
Implement SquareCustom end-caps and gds output
2019-05-15 00:14:17 -07:00
9ab1372c7b
Allow shapes to carry an arbitrary identifier (Tuple)
2019-05-13 23:55:14 -07:00
ee6699a7de
fix alternate polygon constructors
2019-04-20 15:44:45 -07:00
783c0c0844
Add support for gds paths
2019-04-20 15:25:19 -07:00
d53c9487ff
Comment and error-checking fixes
2019-04-20 14:19:18 -07:00
8fe8bbd655
Normalization-related fixes
2019-04-20 14:18:52 -07:00
c6fac19fe0
Set standard constructor arg order and add rotation
and mirrored
args where reasonable
2019-04-20 14:18:25 -07:00
8dfb6d4440
Move vertex-cleanup functions to utils and generalize for non-closed paths
2019-04-20 00:35:53 -07:00
e3586a4574
fix variable names (manhattanize_fast fixes)
2019-04-16 22:24:43 -07:00
c6830abe22
Fix corners in manhattanize_fast
2019-04-16 00:42:48 -07:00
bc557a54b7
fix typo in comment
2019-03-31 20:57:18 -07:00
eb6a5d8e8c
Add shapes.Polygon.rect() for simpler construction of various axis-aligned rectangles
2018-11-23 18:31:56 -08:00
ef305cbac9
Fix syntax
2018-11-23 18:09:14 -08:00
5bce2005b6
Add docstring for manhattanize_fast
2018-11-13 23:32:44 -08:00
ab483fc9d4
Remove pyclipper dependency; remove shape.cut()
2018-11-13 23:32:26 -08:00
df5c61f1d4
Clarify that rectangle/square is centered on the origin
...
Eventually, should allow arbitrary limit combination (rather than center
+ width)
2018-10-28 13:34:09 -07:00
b295c318a9
Fix arc bounding box calculation
2018-10-28 13:32:04 -07:00
f3115baabe
Add get_cap_edges()
2018-09-16 20:33:55 -07:00
832e3b46fa
Add general angle-to-parameter helper function
...
and improve accuracy of to_polygons
2018-09-16 20:32:19 -07:00
86068102d9
Clarify that layer can be a tuple
2018-08-30 23:06:56 -07:00
6bafaaf4fc
Fix typo in arc docs
2018-08-30 23:06:45 -07:00
d5a255a9d7
Add mirror() to shapes
...
Might need to fix ordering on Text.to_polygons()
2018-04-14 15:27:56 -07:00
4c535e6564
return self from Text's scale_by and rotate
2018-04-14 14:38:42 -07:00
e2b05d7c86
add fast approximate manhattanization function
2018-01-15 23:55:28 -08:00
9308454ad4
allow cutting any shape, always require pyclipper
2017-10-17 12:35:56 -07:00
87c2ef5948
use pyclipper for polygon cutting
2017-10-17 11:09:53 -07:00
b3f99ee123
abs when thresholding raster for manhattanization
2017-10-17 11:09:53 -07:00
83d163a102
fix typo
2017-09-08 14:26:27 -07:00
f4b8f513d4
fix typos
2017-09-08 10:30:56 -07:00
01395134ee
Also clean vertices before cutting
2017-09-07 21:59:44 -07:00
a817bf6642
Remove debug code
2017-09-06 21:04:57 -07:00
10cd0778b8
Add copy() method to Shape
2017-09-06 21:04:44 -07:00
723944018e
add documentation to Polygon.cut()
2017-09-06 21:03:39 -07:00
cea172e7f2
Make cut generate clean polygons
2017-09-06 21:03:23 -07:00
4466198924
Add cut() function for polygon
2017-09-06 01:16:44 -07:00
ffbaf8f4c4
Add manhattanization functionality
2017-09-06 01:16:24 -07:00
3d52566016
Improve error handling
2017-09-06 01:14:46 -07:00
ccfd0f7f4f
remove whitespace
2017-09-05 11:00:50 -07:00
3d89cd42a0
further fixes to ellipse bounding box
2017-08-29 16:55:06 -07:00
8256a540dc
Use polar angle for ellipse bounds
2017-08-29 15:51:00 -07:00
b99509289a
Let layer be a tuple of ints (or just a single int like before)
2017-08-12 19:31:02 -07:00
0a7c26bb08
No need to subclass 'object' in python3
2017-08-12 19:30:31 -07:00
6cc6556e8a
typo fix
2017-04-20 13:05:58 -07:00
434178c853
correctly preserve total arc angle during normalize
2017-04-20 13:01:31 -07:00
ff76626e21
fix multiple bugs in arc and ellipse
2017-04-19 18:54:58 -07:00
jan
103e72628c
Remove extra spaces
2016-10-19 16:52:40 -07:00
jan
3a460a9296
Add Text shape
...
Rendered using freetype-py and matplotlib
Can eliminate the matplotlib dependency if I write my own bezier code,
but that's work (and I already use matplotlib...).
2016-10-19 16:52:28 -07:00
jan
2a20a540b9
remove extra spaces
2016-03-16 15:16:01 -07:00
jan
5bf486ac81
Add all files to repository
2016-03-15 19:12:39 -07:00