mover: fix checkFixedPart()

This commit is contained in:
Zheng, Lei 2019-06-12 07:20:44 +08:00
parent f66358d9d3
commit 2979dfea9d
2 changed files with 5 additions and 3 deletions

View File

@ -629,7 +629,8 @@ class Constraint(ProxyType):
# part that are fixed
continue
handled.add(obj)
if rollback is not False:
handled.add(obj)
for info0,info in zip(firstInfo,infos):
if info.Part in ret:
@ -645,7 +646,8 @@ class Constraint(ProxyType):
utils.getElementPlacement(info0.Shape))
pla = pla0.multiply(
utils.getElementPlacement(info.Shape).inverse())
if not utils.isSamePlacement(pla,info.Placement):
if rollback is not False and \
not utils.isSamePlacement(pla,info.Placement):
solver.touched = True
solver.system.log('attaching "{}" -> "{}"',
info.PartName, info0.PartName)

View File

@ -215,7 +215,7 @@ def checkFixedPart(info):
assembly = resolveAssembly(info.Parent)
cstrs = assembly.getConstraints()
partGroup = assembly.getPartGroup()
if info.Part in Constraint.getFixedParts(None,cstrs,partGroup):
if info.Part in Constraint.getFixedParts(None,cstrs,partGroup,False):
raise RuntimeError('cannot move fixed part')
def findAssembly(obj,subname):