assembly: fix constraint multiply element update
This commit is contained in:
parent
5da0bd5554
commit
0c1f659fde
|
@ -2304,7 +2304,7 @@ class AsmConstraint(AsmGroup):
|
||||||
# element shape
|
# element shape
|
||||||
|
|
||||||
offset = FreeCAD.Vector(getattr(obj,'OffsetX',0),
|
offset = FreeCAD.Vector(getattr(obj,'OffsetX',0),
|
||||||
getattr(obj,'Offset&',0),
|
getattr(obj,'OffsetY',0),
|
||||||
getattr(obj,'Offset',0))
|
getattr(obj,'Offset',0))
|
||||||
poses = poses[:count]
|
poses = poses[:count]
|
||||||
infos0 = firstChild.Proxy.getInfo(expand=True)[:count]
|
infos0 = firstChild.Proxy.getInfo(expand=True)[:count]
|
||||||
|
@ -2374,6 +2374,10 @@ class AsmConstraint(AsmGroup):
|
||||||
firstChild.Proxy.infos = order
|
firstChild.Proxy.infos = order
|
||||||
self.prevOrder = used
|
self.prevOrder = used
|
||||||
|
|
||||||
|
from . import solver
|
||||||
|
if solver.isBusy():
|
||||||
|
return
|
||||||
|
|
||||||
# now for those instances that are 'out of place', lets assign some
|
# now for those instances that are 'out of place', lets assign some
|
||||||
# initial placement
|
# initial placement
|
||||||
|
|
||||||
|
@ -2403,14 +2407,21 @@ class AsmConstraint(AsmGroup):
|
||||||
if ref:
|
if ref:
|
||||||
pla = pla.multiply(ref)
|
pla = pla.multiply(ref)
|
||||||
else:
|
else:
|
||||||
pla = info0.Placement.multiply(pla.multiply(pla0.inverse()))
|
pla = pla.multiply(p0.inverse())
|
||||||
showPart(partGroup,info0.Part)
|
showPart(partGroup,info0.Part)
|
||||||
touched = True
|
touched = True
|
||||||
setPlacement(info0.Part,pla,True)
|
|
||||||
|
|
||||||
if touched:
|
# DO NOT purgeTouched here. We shall leave it as touched and
|
||||||
firstChild.Proxy.getInfo(True)
|
# trigger a second pass of recomputation to property update the
|
||||||
firstChild.purgeTouched()
|
# associated element of this part.
|
||||||
|
#
|
||||||
|
# setPlacement(info0.Part,pla,purgeTouched=True)
|
||||||
|
#
|
||||||
|
setPlacement(info0.Part,pla)
|
||||||
|
|
||||||
|
# if touched:
|
||||||
|
# firstChild.Proxy.getInfo(True)
|
||||||
|
# firstChild.purgeTouched()
|
||||||
|
|
||||||
def execute(self,obj):
|
def execute(self,obj):
|
||||||
if not getattr(self,'_initializing',False) and\
|
if not getattr(self,'_initializing',False) and\
|
||||||
|
|
Loading…
Reference in New Issue
Block a user