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

View File

@ -215,7 +215,7 @@ def checkFixedPart(info):
assembly = resolveAssembly(info.Parent) assembly = resolveAssembly(info.Parent)
cstrs = assembly.getConstraints() cstrs = assembly.getConstraints()
partGroup = assembly.getPartGroup() 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') raise RuntimeError('cannot move fixed part')
def findAssembly(obj,subname): def findAssembly(obj,subname):