diff options
author | Garret Fick <garret@ficksworkshop.com> | 2016-08-06 09:51:58 +0800 |
---|---|---|
committer | Garret Fick <garret@ficksworkshop.com> | 2016-08-06 09:51:58 +0800 |
commit | 8d5e782ccf220d77f0aad5a4e5605dc5cbe0f410 (patch) | |
tree | 8415fede2e664716a5b3a09fbb4c09baca78bcf8 /gerber/primitives.py | |
parent | 8cd842a41a55ab3d8f558a2e3e198beba7da58a1 (diff) | |
download | gerbonara-8d5e782ccf220d77f0aad5a4e5605dc5cbe0f410.tar.gz gerbonara-8d5e782ccf220d77f0aad5a4e5605dc5cbe0f410.tar.bz2 gerbonara-8d5e782ccf220d77f0aad5a4e5605dc5cbe0f410.zip |
Fix multiple problems with the merge. There are still errors, but I will intentionally leave them because future merges might resolve them
Diffstat (limited to 'gerber/primitives.py')
-rw-r--r-- | gerber/primitives.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gerber/primitives.py b/gerber/primitives.py index 98b3e1c..d78c6d9 100644 --- a/gerber/primitives.py +++ b/gerber/primitives.py @@ -16,12 +16,14 @@ # limitations under the License.
+from itertools import combinations
import math
from operator import add
-from itertools import combinations
- -from .utils import validate_coordinates, inch, metric, convex_hull, rotate_point, nearly_equal +from .utils import validate_coordinates, inch, metric, convex_hull, rotate_point, nearly_equal
+
+
+ class Primitive(object):
""" Base class for all Cam file primitives
@@ -721,7 +723,8 @@ class Rectangle(Primitive): def _abs_height(self):
return (math.cos(math.radians(self.rotation)) * self.height +
math.sin(math.radians(self.rotation)) * self.width)
- +
+ @property def axis_aligned_height(self):
return (self._cos_theta * self.height + self._sin_theta * self.width)
|