summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gerbonara/apertures.py2
-rw-r--r--gerbonara/cam.py6
-rw-r--r--gerbonara/graphic_primitives.py2
-rw-r--r--gerbonara/rs274x.py2
4 files changed, 6 insertions, 6 deletions
diff --git a/gerbonara/apertures.py b/gerbonara/apertures.py
index bdebf50..b411412 100644
--- a/gerbonara/apertures.py
+++ b/gerbonara/apertures.py
@@ -452,7 +452,7 @@ class PolygonAperture(Aperture):
def _params(self, unit=None):
rotation = self.rotation % (2*math.pi / self.n_vertices)
- if math.isclose(rotation, 0, abs_tol=1-e6):
+ if math.isclose(rotation, 0, abs_tol=1e-6):
rotation = None
if self.hole_dia is not None:
diff --git a/gerbonara/cam.py b/gerbonara/cam.py
index 0ee67a5..d94175e 100644
--- a/gerbonara/cam.py
+++ b/gerbonara/cam.py
@@ -248,10 +248,10 @@ class Polyline:
(x0, y0), *rest = self.coords
d = f'M {float(x0):.6} {float(y0):.6} ' + ' '.join(f'L {float(x):.6} {float(y):.6}' for x, y in rest)
- width = f'{self.width:.6}' if not math.isclose(self.width, 0) else '0.01mm'
+ width = f'{float(self.width):.6}' if not math.isclose(self.width, 0) else '0.01mm'
return tag('path', d=d,
- fill='none', stroke=color,
- stroke_width=f'{float(width):.6}')
+ fill='none', stroke=color, stroke_linecap='round', stroke_linejoin='round',
+ stroke_width=width)
class CamFile:
diff --git a/gerbonara/graphic_primitives.py b/gerbonara/graphic_primitives.py
index 13854e1..ca3783f 100644
--- a/gerbonara/graphic_primitives.py
+++ b/gerbonara/graphic_primitives.py
@@ -275,5 +275,5 @@ class Rectangle(GraphicPrimitive):
color = fg if self.polarity_dark else bg
x, y = self.x - self.w/2, self.y - self.h/2
return tag('rect', x=prec(x), y=prec(y), width=prec(self.w), height=prec(self.h),
- *svg_rotation(self.rotation, self.x, self.y), fill=color)
+ **svg_rotation(self.rotation, self.x, self.y), fill=color)
diff --git a/gerbonara/rs274x.py b/gerbonara/rs274x.py
index 271880b..01cdccf 100644
--- a/gerbonara/rs274x.py
+++ b/gerbonara/rs274x.py
@@ -267,7 +267,7 @@ class GerberFile(CamFile):
for aperture in self.apertures:
if isinstance(aperture, apertures.ApertureMacroInstance):
- macro_def = am_stmt(aperture._rotated().macro)
+ macro_def = am_stmt(aperture.rotated().macro)
if macro_def not in processed_macros:
processed_macros.add(macro_def)
yield macro_def