From 70336ae171892ea60102c884094f21e7db6c3012 Mon Sep 17 00:00:00 2001 From: bishibashiB Date: Sun, 21 Nov 2021 22:57:35 +0100 Subject: [PATCH 1/2] remove twice applying interval_ratio for odd number of tabs --- lasercut/join.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lasercut/join.py b/lasercut/join.py index 3b9a12d..e73d06b 100644 --- a/lasercut/join.py +++ b/lasercut/join.py @@ -37,8 +37,8 @@ def get_slot_positions(tab_properties): if tab_properties.tabs_number % 2 == 1: slots_list.append(0.0 + tab_properties.tabs_shift) for i in range(half_tab_number): - left = float(i+1) * interval_length * tab_properties.interval_ratio - right = float(-i-1) * interval_length * tab_properties.interval_ratio + left = float(i+1) * interval_length + right = float(-i-1) * interval_length if tab_properties.interval_ratio != 1.0: left *= tab_properties.interval_ratio right *= tab_properties.interval_ratio From 678a792b77aa74f0ddc2bd439d50b7e5953f5179 Mon Sep 17 00:00:00 2001 From: bishibashiB Date: Sun, 21 Nov 2021 22:58:10 +0100 Subject: [PATCH 2/2] allow 3 digits precision for intervall_ratio --- panel/tab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/tab.py b/panel/tab.py index 892efbd..a86a568 100644 --- a/panel/tab.py +++ b/panel/tab.py @@ -48,7 +48,7 @@ def __init__(self, tab_properties): WidgetValue(type=float, name="tabs_shift", show_name="Shift", widget=None, interval_value=[-300, 300.], step=1., decimals=2), WidgetValue(type=float, name="interval_ratio", show_name="Interval ratio", - widget=None, interval_value=[0.1, 5.], step=0.1, decimals=2), + widget=None, interval_value=[0.1, 5.], step=0.1, decimals=3), WidgetValue(type=bool, name="dog_bone", show_name="Dog bone hole", widget=None), WidgetValue(type=bool, name="tab_dog_bone", show_name="Tab dog bone hole", widget=None) ])