From 5d6f36c21aacb6496409e1001dc11d9a7b3764ac Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Wed, 1 Aug 2018 17:55:07 +0800 Subject: [PATCH] constraint: extend PointLineDistance to accept plane normal --- constraint.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/constraint.py b/constraint.py index 5ee4956..3a44c62 100644 --- a/constraint.py +++ b/constraint.py @@ -1145,6 +1145,7 @@ class PointOnLine(Base): params[1] = params[1].ln else: params[1] = params[1].entity + params = cls.getPropertyValues(obj) + params ret = func(*params,group=solver.group) solver.system.log('{}: {}'.format(cstrName(obj),ret)) return ret @@ -1183,10 +1184,8 @@ class PointsPlaneDistance(BaseMulti): _cstrFuncName = 'addPointPlaneDistance' -class PointLineDistance(Base): +class PointLineDistance(PointOnLine): _id = 8 - _entityDef = (_p,_l) - _workplane = True _props = ["Distance"] _iconName = 'Assembly_ConstraintPointLineDistance.svg' _tooltip='Add a "{}" to constrain the distance between a point '\