Пример #1
0
def main():
    app = QApplication(sys.argv)

    root = SoSeparator()
    col = SoBaseColor()
    col.rgb = SbColor(1, 1, 0)
    root.addChild(col)
    root.addChild(SoCone())

    viewer = QuarterWidget()
    viewer.setSceneGraph(root)

    viewer.setWindowTitle("minimal")
    viewer.show()
    sys.exit(app.exec_())
Пример #2
0
def main():
    app = QApplication(sys.argv)

    root = SoSeparator()
    col = SoBaseColor()
    col.rgb = SbColor(1, 1, 0)
    root.addChild(col)
    root.addChild(SoCone())

    viewer = QuarterWidget()
    viewer.setSceneGraph(root)

    viewer.setWindowTitle("minimal")
    viewer.show()
    sys.exit(app.exec_())
Пример #3
0
def main():
    try:
        import FreeCAD
    except ValueError:
        print(
            'FreeCAD library not found. Please check the FREECADPATH variable in this script is correct'
        )
        sys.exit(1)
    simapp = QtGui.QApplication(sys.argv)
    simappwindow = QtGui.QMainWindow()
    simappwindow.setWindowTitle("EQ Simulator")

    s = None
    s = Simulator.Simulator()
    s.Build()
    manualsettingswidget = DockManualSetting(s)
    simulationwidget = DockSimulation(s, manualsettingswidget)
    simappwindow.addDockWidget(QtCore.Qt.BottomDockWidgetArea,
                               manualsettingswidget)
    simappwindow.addDockWidget(QtCore.Qt.LeftDockWidgetArea, simulationwidget)
    # FreeCAD integration: see http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Embedding_FreeCADGui/fr
    # Utilisation d'un module tiers (en l'occurence Quarter ?)
    #FreeCADGui.setupWithoutGUI()

    widget3D = QtGui.QWidget()
    widget3D.setMinimumSize(712, 400)
    qw = QuarterWidget(widget3D)
    qw.setMinimumSize(712, 400)

    qw.setSceneGraph(s.scene)

    #Http server
    #server=BaseHTTPServer.HTTPServer(('', 8000), HTTPHandler)
    #server.serve_forever()

    #TCP Server
    server = QtNetwork.QTcpServer()
    server.setMaxPendingConnections(1)
    server.currentClient = None
    server.newConnection.connect(
        lambda: acceptClient(server, simulationwidget.process_config))
    server.listen(QtNetwork.QHostAddress.Any, 64101)

    #s.Embed(widget3D)
    simappwindow.setCentralWidget(widget3D)
    simappwindow.show()
    #SoGui.mainloop()
    simapp.exec_()
Пример #4
0
def main():
    try:
        import FreeCAD
    except ValueError:
        print('FreeCAD library not found. Please check the FREECADPATH variable in this script is correct')
        sys.exit(1)
    simapp=QtGui.QApplication(sys.argv)
    simappwindow=QtGui.QMainWindow()
    simappwindow.setWindowTitle("EQ Simulator")


    s=None
    s=Simulator.Simulator()
    s.Build()
    manualsettingswidget=DockManualSetting(s)
    simulationwidget=DockSimulation(s, manualsettingswidget)
    simappwindow.addDockWidget(QtCore.Qt.BottomDockWidgetArea, manualsettingswidget)
    simappwindow.addDockWidget(QtCore.Qt.LeftDockWidgetArea, simulationwidget)
# FreeCAD integration: see http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Embedding_FreeCADGui/fr
# Utilisation d'un module tiers (en l'occurence Quarter ?)
#FreeCADGui.setupWithoutGUI()



    widget3D=QtGui.QWidget()
    widget3D.setMinimumSize(712,400)
    qw=QuarterWidget(widget3D)
    qw.setMinimumSize(712, 400)

    qw.setSceneGraph(s.scene)

    #Http server
    #server=BaseHTTPServer.HTTPServer(('', 8000), HTTPHandler)
    #server.serve_forever()
     
    #TCP Server
    server=QtNetwork.QTcpServer()
    server.setMaxPendingConnections(1)
    server.currentClient=None
    server.newConnection.connect(lambda:acceptClient(server, simulationwidget.process_config))
    server.listen(QtNetwork.QHostAddress.Any, 64101)

#s.Embed(widget3D)
    simappwindow.setCentralWidget(widget3D)
    simappwindow.show()
#SoGui.mainloop()
    simapp.exec_() 
Пример #5
0
motorstatusdockwidget.setWidget(tabwidget)
simappwindow.addDockWidget(QtCore.Qt.LeftDockWidgetArea, motorstatusdockwidget)

# FreeCAD integration: see http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Embedding_FreeCADGui/fr
# Utilisation d'un module tiers (en l'occurence Quarter ?)
#FreeCADGui.setupWithoutGUI()

s=Simulator()
s.Build()

widget3D=QtGui.QWidget()
widget3D.setMinimumSize(640,480)
qw=QuarterWidget(widget3D)
qw.setMinimumSize(640, 480)

qw.setSceneGraph(s.scene)

#s.Embed(widget3D)
simappwindow.setCentralWidget(widget3D)
simappwindow.show()
#SoGui.mainloop()
simapp.exec_() 

#if __name__ == "Simulator":
#if __name__ == "__main__":
#    main()

#print __name__

#rotationz=SoRotationXYZ()
#rotationz.axis=SoRotationXYZ.Z