Skip to content

Commit 993e487

Browse files
committed
added is_scalable to compas.robots.Joint
1 parent 3bb81ac commit 993e487

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/compas/robots/model/joint.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,15 @@ def calculate_transformation(self, position):
317317
def is_configurable(self):
318318
"""Returns ``True`` if the joint can be configured, otherwise ``False``."""
319319
return self.type != Joint.FIXED
320+
321+
def is_scalable(self):
322+
"""Returns ``True`` if the joint can be scaled, otherwise ``False``."""
323+
return self.type in [Joint.PLANAR, Joint.PRISMATIC]
320324

321325
def scale(self, factor):
322326
self.origin.scale(factor)
323327
self.init_origin.point *= factor
324-
if self.type in [Joint.PLANAR, Joint.PRISMATIC]:
328+
if self.is_scalable():
325329
self.limit.scale(factor)
326330

327331

0 commit comments

Comments
 (0)