开源cura二次开版问题
最近需要用到一个cura二次开发版本的软件 加密了输出文件的格式 正常为G-code 现在为gcx 跪求大神帮忙分析下 还有个pyc的文件转回py后代码不全# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import GCxWriter
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"mesh_writer": {
"output": [{
"extension": "gcx",
"description": catalog.i18nc("@item:inlistbox", "Encoded gcode File"),
"mime_type": "text/x-gcx",
"mode": GCxWriter.GCxWriter.OutputMode.TextMode
}]
}
}
def register(app):
return { "mesh_writer": GCxWriter.GCxWriter() }
以下为原版代码
# Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from . import GCodeWriter
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
return {
"plugin": {
"name": catalog.i18nc("@label", "GCode Writer"),
"author": "Ultimaker",
"version": "1.0",
"description": catalog.i18nc("@info:whatsthis", "Writes GCode to a file."),
"api": 3
},
"mesh_writer": {
"output": [{
"extension": "gcode",
"description": catalog.i18nc("@item:inlistbox", "GCode File"),
"mime_type": "text/x-gcode",
"mode": GCodeWriter.GCodeWriter.OutputMode.TextMode
}]
}
}
def register(app):
return { "mesh_writer": GCodeWriter.GCodeWriter() }
页:
[1]