Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2016-09-28 11:36:19 +0300
committerGhostkeeper <rubend@tutanota.com>2016-09-28 12:48:06 +0300
commit622233bfd87b20dd1b203547ca8c7f0ff85161b7 (patch)
tree19babf3dc59c7bb40de350cb61654513b4218274 /cura/ConvexHullDecorator.py
parent18d67dc552b955d4de06b128db6cac5e5f61da56 (diff)
Remove duplicate code for creating circle approximations
This code is now in the Polygon class, so we can re-use it. Contributes to issue CURA-2407.
Diffstat (limited to 'cura/ConvexHullDecorator.py')
-rw-r--r--cura/ConvexHullDecorator.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py
index d1f3f07c4b..15dd9208e6 100644
--- a/cura/ConvexHullDecorator.py
+++ b/cura/ConvexHullDecorator.py
@@ -252,18 +252,7 @@ class ConvexHullDecorator(SceneNodeDecorator):
# adjust head_and_fans with extra margin
if extra_margin > 0:
- # In Cura 2.2+, there is a function to create this circle-like polygon.
- extra_margin_polygon = Polygon(numpy.array([
- [-extra_margin, 0],
- [-extra_margin * 0.707, extra_margin * 0.707],
- [0, extra_margin],
- [extra_margin * 0.707, extra_margin * 0.707],
- [extra_margin, 0],
- [extra_margin * 0.707, -extra_margin * 0.707],
- [0, -extra_margin],
- [-extra_margin * 0.707, -extra_margin * 0.707]
- ], numpy.float32))
-
+ extra_margin_polygon = Polygon.approximatedCircle(extra_margin)
poly = poly.getMinkowskiHull(extra_margin_polygon)
return poly