From 837f2eabb81d3f4c7e32a4d6d0366ae78e5c40a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCdepohl?= Date: Mon, 13 Feb 2017 18:49:41 +0100 Subject: [PATCH] PathHelix: Be more liberal in what constitues a straight cylinder --- src/Mod/Path/PathScripts/PathHelix.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathHelix.py b/src/Mod/Path/PathScripts/PathHelix.py index db8ecd740..72fb10cc5 100644 --- a/src/Mod/Path/PathScripts/PathHelix.py +++ b/src/Mod/Path/PathScripts/PathHelix.py @@ -53,9 +53,10 @@ else: def z_cylinder(cyl): """ Test if cylinder is aligned to z-Axis""" - if cyl.Surface.Axis.x != 0.0: + axis = cyl.Surface.Axis + if abs(axis.x) > 1e-10 * abs(axis.z): return False - if cyl.Surface.Axis.y != 0.0: + if abs(axis.y) > 1e-10 * abs(axis.z): return False return True