constraint: extend PointLineDistance to accept plane normal
This commit is contained in:
parent
03d9121351
commit
5d6f36c21a
|
@ -1145,6 +1145,7 @@ class PointOnLine(Base):
|
||||||
params[1] = params[1].ln
|
params[1] = params[1].ln
|
||||||
else:
|
else:
|
||||||
params[1] = params[1].entity
|
params[1] = params[1].entity
|
||||||
|
params = cls.getPropertyValues(obj) + params
|
||||||
ret = func(*params,group=solver.group)
|
ret = func(*params,group=solver.group)
|
||||||
solver.system.log('{}: {}'.format(cstrName(obj),ret))
|
solver.system.log('{}: {}'.format(cstrName(obj),ret))
|
||||||
return ret
|
return ret
|
||||||
|
@ -1183,10 +1184,8 @@ class PointsPlaneDistance(BaseMulti):
|
||||||
_cstrFuncName = 'addPointPlaneDistance'
|
_cstrFuncName = 'addPointPlaneDistance'
|
||||||
|
|
||||||
|
|
||||||
class PointLineDistance(Base):
|
class PointLineDistance(PointOnLine):
|
||||||
_id = 8
|
_id = 8
|
||||||
_entityDef = (_p,_l)
|
|
||||||
_workplane = True
|
|
||||||
_props = ["Distance"]
|
_props = ["Distance"]
|
||||||
_iconName = 'Assembly_ConstraintPointLineDistance.svg'
|
_iconName = 'Assembly_ConstraintPointLineDistance.svg'
|
||||||
_tooltip='Add a "{}" to constrain the distance between a point '\
|
_tooltip='Add a "{}" to constrain the distance between a point '\
|
||||||
|
|
Loading…
Reference in New Issue
Block a user