mover: fix checkFixedPart()
This commit is contained in:
parent
f66358d9d3
commit
2979dfea9d
|
@ -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)
|
||||||
|
|
2
mover.py
2
mover.py
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user