本文整理汇总了Python中FreeCADGui.updateGui方法的典型用法代码示例。如果您正苦于以下问题:Python FreeCADGui.updateGui方法的具体用法?Python FreeCADGui.updateGui怎么用?Python FreeCADGui.updateGui使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FreeCADGui
的用法示例。
在下文中一共展示了FreeCADGui.updateGui方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: step
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def step(self,now):
sayd("Styler step!" + str(now))
if now<=self.obj2.start or now>self.obj2.end:
say("ausserhalb")
pass
else:
gob=FreeCADGui.ActiveDocument.getObject(self.obj2.obj.Name)
if not self.obj2.obj:
errorDialog("kein Sketch zugeordnet")
raise Exception(' self.obj2.obj nicht definiert')
if self.obj2.transparency:
gob.Transparency=90
relativ=1.00/(self.obj2.end-self.obj2.start)
gob.Transparency= int(relativ* (self.obj2.transpaEnd -self.obj2.transpaStart)*(now-self.obj2.start)) + self.obj2.transpaStart
if now==self.obj2.start+1 or now==self.obj2.end:
if self.obj2.visibility:
gob=FreeCADGui.ActiveDocument.getObject(self.obj2.obj.Name)
gob.Visibility = not gob.Visibility
FreeCADGui.updateGui()
示例2: updateGui
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def updateGui():
try:
FreeCADGui.updateGui()
except Exception:
pass
示例3: trace
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def trace(self,msg):
if self._isEnabledFor(4):
FreeCAD.Console.PrintLog(msg+'\n')
updateGui()
示例4: log
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def log(self,msg):
if self._isEnabledFor(3):
FreeCAD.Console.PrintLog(msg+'\n')
updateGui()
示例5: info
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def info(self,msg):
if self._isEnabledFor(2):
FreeCAD.Console.PrintMessage(msg+'\n')
updateGui()
示例6: warning
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def warning(self,msg):
if self._isEnabledFor(1):
FreeCAD.Console.PrintWarning(msg+'\n')
updateGui()
示例7: onRun
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def onRun(self):
self.Run = True
# the selected variable
varName = self.varList.currentText()
begin = self.minValue.value()
end = self.maxValue.value()
step = self.stepValue.value()
sleep = self.sleepValue.value()
# basic checks
if varName:
varValue = begin
# if we go forwards ...
if end>begin and step>0:
while varValue <= end and self.Run:
setattr( self.Variables, varName, varValue )
self.slider.setValue(varValue)
App.ActiveDocument.Model.recompute('True')
Gui.updateGui()
varValue += step
time.sleep(sleep)
# ... or backwards
elif end<begin and step<0:
while varValue >= end and self.Run:
setattr( self.Variables, varName, varValue )
self.slider.setValue(varValue)
App.ActiveDocument.Model.recompute('True')
Gui.updateGui()
varValue += step
time.sleep(sleep)
return
示例8: sliderMoved
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def sliderMoved(self):
self.Run = False
varName = self.varList.currentText()
varValue = self.slider.value()
setattr( self.Variables, varName, varValue )
App.ActiveDocument.Model.recompute('True')
Gui.updateGui()
return
示例9: animforward
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def animforward(self):
FreeCADGui.ActiveDocument.ActiveView.setAnimationEnabled(False)
for i in range(101):
self.obj2.time=float(i)/100
FreeCAD.ActiveDocument.recompute()
FreeCADGui.updateGui()
time.sleep(0.02)
示例10: animbackward
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def animbackward(self):
FreeCADGui.ActiveDocument.ActiveView.setAnimationEnabled(False)
for i in range(101):
self.obj2.time=float(100-i)/100
FreeCAD.ActiveDocument.recompute()
FreeCADGui.updateGui()
time.sleep(0.02)
示例11: run
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def run(self,intervall=-1):
sayd("run intervall=" + str(intervall))
FreeCADGui.ActiveDocument.ActiveView.setAnimationEnabled(False)
if (intervall<0):
intervall=self.obj2.intervall
if hasattr(self,'obj2'):
t=FreeCAD.ActiveDocument.getObject(self.obj2.Name)
else:
raise Exception("obj2 not found --> reinit the file!")
for ob in t.OutList:
say(ob.Label)
ob.Proxy.initialize()
ob.Proxy.execute(ob)
firstRun=True
bigloop=0
#while firstRun or os.path.exists("/tmp/loop"):
while firstRun or FreeCAD.ParamGet('User parameter:Plugins/animation').GetBool("loop"):
say("manager infinite loop #################################")
firstRun=False
bigloop += 1
for nw in range(self.obj2.start):
say("---- manager before" + str(nw))
for nw in range(intervall+1):
self.step(nw)
FreeCAD.ActiveDocument.recompute()
FreeCADGui.updateGui()
time.sleep(self.obj2.sleeptime)
FreeCADGui.Selection.clearSelection()
FreeCADGui.Selection.addSelection(FreeCAD.ActiveDocument.getObject(self.obj2.Name))
示例12: finalize
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def finalize(self,wait=5):
for obj in self.obj.targets:
obj.toInitialPlacement()
FreeCADGui.updateGui()
time.sleep(wait)
#-------------------------
# testdialig in comboview task fenster
示例13: run
# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def run(self,s):
say(s.Label)
print(s.Shape)
say(s.Shape.Vertexes)
i=0
for v in s.Shape.Vertexes:
i += 1
if i > 5: break
say(["Point: ", v.Point])
FreeCADGui.updateGui()
self.addpoint(v.Point)