当前位置: 首页>>代码示例>>Python>>正文


Python FreeCADGui.updateGui方法代码示例

本文整理汇总了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() 
开发者ID:microelly2,项目名称:Animation,代码行数:23,代码来源:Animation.py

示例2: updateGui

# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def updateGui():
    try:
        FreeCADGui.updateGui()
    except Exception:
        pass 
开发者ID:realthunder,项目名称:fcad_pcb,代码行数:7,代码来源:kicad.py

示例3: trace

# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def trace(self,msg):
        if self._isEnabledFor(4):
            FreeCAD.Console.PrintLog(msg+'\n')
            updateGui() 
开发者ID:realthunder,项目名称:fcad_pcb,代码行数:6,代码来源:kicad.py

示例4: log

# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def log(self,msg):
        if self._isEnabledFor(3):
            FreeCAD.Console.PrintLog(msg+'\n')
            updateGui() 
开发者ID:realthunder,项目名称:fcad_pcb,代码行数:6,代码来源:kicad.py

示例5: info

# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def info(self,msg):
        if self._isEnabledFor(2):
            FreeCAD.Console.PrintMessage(msg+'\n')
            updateGui() 
开发者ID:realthunder,项目名称:fcad_pcb,代码行数:6,代码来源:kicad.py

示例6: warning

# 需要导入模块: import FreeCADGui [as 别名]
# 或者: from FreeCADGui import updateGui [as 别名]
def warning(self,msg):
        if self._isEnabledFor(1):
            FreeCAD.Console.PrintWarning(msg+'\n')
            updateGui() 
开发者ID:realthunder,项目名称:fcad_pcb,代码行数:6,代码来源:kicad.py

示例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 
开发者ID:Zolko-123,项目名称:FreeCAD_Assembly4,代码行数:32,代码来源:AnimationLib.py

示例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 
开发者ID:Zolko-123,项目名称:FreeCAD_Assembly4,代码行数:10,代码来源:AnimationLib.py

示例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) 
开发者ID:microelly2,项目名称:Animation,代码行数:9,代码来源:Animation.py

示例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) 
开发者ID:microelly2,项目名称:Animation,代码行数:9,代码来源:Animation.py

示例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)) 
开发者ID:microelly2,项目名称:Animation,代码行数:39,代码来源:Animation.py

示例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 
开发者ID:microelly2,项目名称:Animation,代码行数:10,代码来源:Animation.py

示例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) 
开发者ID:microelly2,项目名称:Animation,代码行数:13,代码来源:VertexTracker.py


注:本文中的FreeCADGui.updateGui方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。