Skip to content

Commit d6d080a

Browse files
authored
refactor: Use TOL.is_close for checking if scaling is needed in Robot class (#436)
* refactor: Use TOL.is_close for checking if scaling is needed in Robot class * not
1 parent 9195ee5 commit d6d080a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compas_fab/robots/robot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from compas.data import Data
88
from compas.geometry import Frame
99
from compas.geometry import Transformation
10+
from compas.tolerance import TOL
1011
from compas_robots import Configuration
1112
from compas_robots import RobotModel
1213
from compas_robots.model import Joint
@@ -1389,7 +1390,7 @@ def plan_cartesian_motion(self, waypoints, start_configuration=None, group=None,
13891390
# =======
13901391
# Scaling
13911392
# =======
1392-
need_scaling = self.scale_factor != 1.0
1393+
need_scaling = not TOL.is_close(self.scale_factor, 1.0, rtol=1e-8)
13931394

13941395
if need_scaling:
13951396
waypoints = waypoints.scaled(1.0 / self.scale_factor)

0 commit comments

Comments
 (0)