mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-05 18:10:44 +08:00
Some changes for the project manager.
This commit is contained in:
parent
507c932207
commit
0ed8e32b0c
@ -46,10 +46,15 @@ __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agp
|
|||||||
def main():
|
def main():
|
||||||
parser = OptionParser(usage="usage: %prog [options] <filename>.stl")
|
parser = OptionParser(usage="usage: %prog [options] <filename>.stl")
|
||||||
parser.add_option("-p", "--profile", action="store", type="string", dest="profile", help="Use these profile settings instead of loading current_profile.ini")
|
parser.add_option("-p", "--profile", action="store", type="string", dest="profile", help="Use these profile settings instead of loading current_profile.ini")
|
||||||
|
parser.add_option("-P", "--project", action="store_true", dest="openprojectplanner", help="Open the project planner")
|
||||||
parser.add_option("-r", "--print", action="store", type="string", dest="printfile", help="Open the printing interface, instead of the normal cura interface.")
|
parser.add_option("-r", "--print", action="store", type="string", dest="printfile", help="Open the printing interface, instead of the normal cura interface.")
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
if options.profile != None:
|
if options.profile != None:
|
||||||
profile.loadGlobalProfileFromString(options.profile)
|
profile.loadGlobalProfileFromString(options.profile)
|
||||||
|
if options.openprojectplanner != None:
|
||||||
|
from gui import projectPlanner
|
||||||
|
projectPlanner.main()
|
||||||
|
return
|
||||||
if options.printfile != None:
|
if options.printfile != None:
|
||||||
from gui import printWindow
|
from gui import printWindow
|
||||||
printWindow.startPrintInterface(options.printfile)
|
printWindow.startPrintInterface(options.printfile)
|
||||||
|
@ -136,7 +136,7 @@ def getProfileInformation():
|
|||||||
'Infill_Width': storedSettingFloat("nozzle_size"),
|
'Infill_Width': storedSettingFloat("nozzle_size"),
|
||||||
'Loop_Order_Choice': DEFSET,
|
'Loop_Order_Choice': DEFSET,
|
||||||
'Overlap_Removal_Width_over_Perimeter_Width_ratio': DEFSET,
|
'Overlap_Removal_Width_over_Perimeter_Width_ratio': DEFSET,
|
||||||
'Turn_Extruder_Heater_Off_at_Shut_Down': DEFSET,
|
'Turn_Extruder_Heater_Off_at_Shut_Down': "False",
|
||||||
'Volume_Fraction_ratio': DEFSET,
|
'Volume_Fraction_ratio': DEFSET,
|
||||||
},'fill': {
|
},'fill': {
|
||||||
'Activate_Fill': "True",
|
'Activate_Fill': "True",
|
||||||
@ -376,7 +376,7 @@ def getProfileInformation():
|
|||||||
'Retraction_Distance_millimeters': storedSettingFloat('retraction_amount'),
|
'Retraction_Distance_millimeters': storedSettingFloat('retraction_amount'),
|
||||||
'Restart_Extra_Distance_millimeters': storedSettingFloat('retraction_extra'),
|
'Restart_Extra_Distance_millimeters': storedSettingFloat('retraction_extra'),
|
||||||
},'alteration': {
|
},'alteration': {
|
||||||
'Activate_Alteration': "True",
|
'Activate_Alteration': storedSetting('add_start_end_gcode'),
|
||||||
'Name_of_End_File': "end.gcode",
|
'Name_of_End_File': "end.gcode",
|
||||||
'Name_of_Start_File': "start.gcode",
|
'Name_of_Start_File': "start.gcode",
|
||||||
'Remove_Redundant_Mcode': "True",
|
'Remove_Redundant_Mcode': "True",
|
||||||
@ -395,7 +395,7 @@ def getProfileInformation():
|
|||||||
'gcode_step': DEFSET,
|
'gcode_step': DEFSET,
|
||||||
'gcode_time_segment': DEFSET,
|
'gcode_time_segment': DEFSET,
|
||||||
'gcode_small': DEFSET,
|
'gcode_small': DEFSET,
|
||||||
'File_Extension': DEFSET,
|
'File_Extension': storedSetting('gcode_extension'),
|
||||||
'Name_of_Replace_File': DEFSET,
|
'Name_of_Replace_File': DEFSET,
|
||||||
'Save_Penultimate_Gcode': "False",
|
'Save_Penultimate_Gcode': "False",
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,31 @@ def DrawMachine(machineSize):
|
|||||||
glVertex3f(0, machineSize.y, machineSize.z)
|
glVertex3f(0, machineSize.y, machineSize.z)
|
||||||
glEnd()
|
glEnd()
|
||||||
|
|
||||||
|
def DrawBox(vMin, vMax):
|
||||||
|
glBegin(GL_LINE_LOOP)
|
||||||
|
glVertex3f(vMin.x, vMin.y, vMin.z)
|
||||||
|
glVertex3f(vMax.x, vMin.y, vMin.z)
|
||||||
|
glVertex3f(vMax.x, vMax.y, vMin.z)
|
||||||
|
glVertex3f(vMin.x, vMax.y, vMin.z)
|
||||||
|
glEnd()
|
||||||
|
|
||||||
|
glBegin(GL_LINE_LOOP)
|
||||||
|
glVertex3f(vMin.x, vMin.y, vMax.z)
|
||||||
|
glVertex3f(vMax.x, vMin.y, vMax.z)
|
||||||
|
glVertex3f(vMax.x, vMax.y, vMax.z)
|
||||||
|
glVertex3f(vMin.x, vMax.y, vMax.z)
|
||||||
|
glEnd()
|
||||||
|
glBegin(GL_LINES)
|
||||||
|
glVertex3f(vMin.x, vMin.y, vMin.z)
|
||||||
|
glVertex3f(vMin.x, vMin.y, vMax.z)
|
||||||
|
glVertex3f(vMax.x, vMin.y, vMin.z)
|
||||||
|
glVertex3f(vMax.x, vMin.y, vMax.z)
|
||||||
|
glVertex3f(vMax.x, vMax.y, vMin.z)
|
||||||
|
glVertex3f(vMax.x, vMax.y, vMax.z)
|
||||||
|
glVertex3f(vMin.x, vMax.y, vMin.z)
|
||||||
|
glVertex3f(vMin.x, vMax.y, vMax.z)
|
||||||
|
glEnd()
|
||||||
|
|
||||||
def DrawSTL(mesh):
|
def DrawSTL(mesh):
|
||||||
for face in mesh.faces:
|
for face in mesh.faces:
|
||||||
glBegin(GL_TRIANGLES)
|
glBegin(GL_TRIANGLES)
|
||||||
|
@ -66,6 +66,8 @@ profileDefaultSettings = {
|
|||||||
'raft_base_material_amount': '100',
|
'raft_base_material_amount': '100',
|
||||||
'raft_interface_material_amount': '100',
|
'raft_interface_material_amount': '100',
|
||||||
'bottom_thickness': '0.0',
|
'bottom_thickness': '0.0',
|
||||||
|
'add_start_end_gcode': 'True',
|
||||||
|
'gcode_extension': 'gcode',
|
||||||
}
|
}
|
||||||
preferencesDefaultSettings = {
|
preferencesDefaultSettings = {
|
||||||
'wizardDone': 'False',
|
'wizardDone': 'False',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user