Commit d1cfd3bb authored by sumpfralle's avatar sumpfralle

changed default model to "pycam.stl"


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@398 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 5e3ea06a
......@@ -28,6 +28,12 @@ from optparse import OptionParser
import sys
import os
EXAMPLE_MODEL_LOCATIONS = (
os.path.join(os.path.dirname(__file__), "Samples", "STL"),
"/usr/share/pycam/Samples/STL")
DEFAULT_MODEL_FILE = "pycam.stl"
# check if we were started as a separate program
if __name__ == "__main__":
inputfile = None
......@@ -119,7 +125,15 @@ if __name__ == "__main__":
else:
gui = gui_class()
# try to load the default model file ("pycam" logo)
if not inputfile:
for inputdir in EXAMPLE_MODEL_LOCATIONS:
inputfile = os.path.join(inputdir, DEFAULT_MODEL_FILE)
if os.path.isfile(inputfile):
gui.open(inputfile)
break
else:
# fall back to the simple test model
from pycam.Importers.TestModel import TestModel
gui.load_model(TestModel())
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment