summaryrefslogtreecommitdiff
path: root/examples/test_arc_approx.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2025-08-22 13:24:02 +0200
committerjaseg <git@jaseg.de>2025-08-22 13:24:34 +0200
commit379cf273cb39813aa8819a7c81bf4d2e6de0f948 (patch)
tree8f5078d5e462e5eab50db44c2046479ffdeef442 /examples/test_arc_approx.py
parentda6d8349faa5ed96e73b36be524b9973b004ebf8 (diff)
downloadgerbonara-379cf273cb39813aa8819a7c81bf4d2e6de0f948.tar.gz
gerbonara-379cf273cb39813aa8819a7c81bf4d2e6de0f948.tar.bz2
gerbonara-379cf273cb39813aa8819a7c81bf4d2e6de0f948.zip
Fix out-of-date documentationmain
Diffstat (limited to 'examples/test_arc_approx.py')
-rw-r--r--examples/test_arc_approx.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/test_arc_approx.py b/examples/test_arc_approx.py
index 76d4116..a93864a 100644
--- a/examples/test_arc_approx.py
+++ b/examples/test_arc_approx.py
@@ -2,6 +2,7 @@
import math
+from gerbonara.utils import MM
from gerbonara.graphic_objects import Arc
from gerbonara.graphic_objects import rotate_point
@@ -22,7 +23,8 @@ def approx_test():
x1, y1 = rotate_point(0, -1, start_angle*eps)
x2, y2 = rotate_point(x1, y1, sweep_angle*eps*(-1 if clockwise else 1))
- arc = Arc(x1+cx, y1+cy, x2+cx, y2+cy, -x1, -y1, clockwise=clockwise, aperture=None, polarity_dark=True)
+ arc = Arc(x1+cx, y1+cy, x2+cx, y2+cy, -x1, -y1, clockwise=clockwise, aperture=None,
+ polarity_dark=True, unit=MM)
lines = arc.approximate(max_error=max_error)
print(f'<path style="fill: {color}; stroke: none;" d="M {cx} {cy} L {lines[0].x1} {lines[0].y1}', end=' ')