Skip to content

Commit

Permalink
馃挰 Cura Legacy => CuraEngine Legacy
Browse files Browse the repository at this point in the history
As discussed in

  https://community.octoprint.org/t/tronxy-x5s-looking-for-profile/8742/3

We don't want people to confuse this with the OctoPrint plugin for Cura.
  • Loading branch information
foosel committed Apr 4, 2019
1 parent 656b1e0 commit a88caca
Show file tree
Hide file tree
Showing 13 changed files with 160 additions and 102 deletions.
20 changes: 10 additions & 10 deletions README.md
@@ -1,12 +1,12 @@
# OctoPrint Cura Legacy Plugin
# OctoPrint CuraEngine Legacy Plugin

The Cura Plugin allows slicing of STL files uploaded to OctoPrint directly via the CuraEngine **up to and including
The CuraEngine Legacy Plugin allows slicing of STL files uploaded to OctoPrint directly via the CuraEngine **up to and including
version 15.04.x**. It was bundled with OctoPrint up until version 1.3.10.

> 馃摑 **Note**
>
> Versions of CuraEngine later than 15.04.x have changed their calling parameters in such a way that this
> plugin is not compatible to it. For this reason, please use only CuraEngine versions up to and including 15.04,
> plugin is not compatible to it. For this reason, please use only CuraEngine Legacy versions up to and including 15.04,
> as available in the `legacy` branch of the CuraEngine repository on Github.
The plugin offers a settings module that allows configuring the path to the CuraEngine executable to use, as well as
Expand Down Expand Up @@ -53,21 +53,21 @@ make
After this has completed, you鈥檒l find your shiny new build of CuraEngine in the build folder (full path for above
example: `~/CuraEngine/build/CuraEngine`).

### Using Cura Profiles
### Using Cura Legacy Profiles

The Cura Plugin supports importing your existing profiles for Cura **up to and including Cura 15.04.x**. Newer Cura
releases (e.g. 15.06 or 2.x) use a different internal format that will not work with the Cura Legacy Plugin.
The CuraEngine Legacy Plugin supports importing your existing profiles for Cura legacy versions **up to and including Cura 15.04.x**. Newer Cura
releases (e.g. 15.06, 2.x, 3.x, 4.x, ...) use a different internal format that will **not** work with the CuraEngine Legacy Plugin.

You can find downloads of Cura 15.04.x for Windows, Mac and Linux on [Ultimaker鈥檚 download page](https://ultimaker.com/en/products/cura-software/list).

In order to export a slicing profile from the Cura desktop UI, open it, set up your profile, then click on "File" and
there on "Save Profile". You can import the .ini-file this creates via the "Import Profile" button in the Cura Settings
In order to export a slicing profile from the legacy Cura desktop UI, open it, set up your profile, then click on "File" and
there on "Save Profile". You can import the .ini-file this creates via the "Import Profile" button in the CuraEngine Legacy Settings
within OctoPrint.

## Configuration

The Cura plugin needs to be configured with the full path to your copy of the CuraEngine executable that it鈥檚 supposed
to use. You can do this either via the Cura plugin settings dialog or by manually configuring the path to the
The CuraEngine Legacy plugin needs to be configured with the full path to your copy of the CuraEngine Legacy executable that it鈥檚 supposed
to use. You can do this either via the CuraEngine Legacy plugin settings dialog or by manually configuring the path to the
executable via ``config.yaml``, example:

``` yaml
Expand Down
28 changes: 14 additions & 14 deletions octoprint_curalegacy/__init__.py
Expand Up @@ -23,13 +23,13 @@
from .profile import GcodeFlavors
from .profile import parse_gcode_flavor

class CuraLegacyPlugin(octoprint.plugin.SlicerPlugin,
octoprint.plugin.SettingsPlugin,
octoprint.plugin.TemplatePlugin,
octoprint.plugin.AssetPlugin,
octoprint.plugin.BlueprintPlugin,
octoprint.plugin.StartupPlugin,
octoprint.plugin.WizardPlugin):
class CuraEngineLegacyPlugin(octoprint.plugin.SlicerPlugin,
octoprint.plugin.SettingsPlugin,
octoprint.plugin.TemplatePlugin,
octoprint.plugin.AssetPlugin,
octoprint.plugin.BlueprintPlugin,
octoprint.plugin.StartupPlugin,
octoprint.plugin.WizardPlugin):

# noinspection PyMissingConstructor
def __init__(self):
Expand Down Expand Up @@ -84,7 +84,7 @@ def _is_profile_available(self):

def get_template_vars(self):
return dict(
homepage="https://github.com/OctoPrint/OctoPrint-CuraLegacy/"
homepage="https://github.com/OctoPrint/OctoPrint-CuraEngineLegacy/"
)

##~~ WizardPlugin API
Expand Down Expand Up @@ -306,7 +306,7 @@ def do_slice(self, model_path, printer_profile, machinecode_path=None, profile_p

executable = normalize_path(self._settings.get(["cura_engine"]))
if not executable:
return False, u"Path to CuraEngine is not configured "
return False, u"Path to legacy CuraEngine is not configured "

working_dir = os.path.dirname(executable)

Expand Down Expand Up @@ -515,17 +515,17 @@ def _convert_to_engine(self, profile_path, printer_profile, pos_x=None, pos_y=No
def get_update_information(self):
return dict(
curalegacy=dict(
displayName="Cura Legacy",
displayName="CuraEngine Legacy",
displayVersion=self._plugin_version,

# version check: github repository
type="github_release",
user="OctoPrint",
repo="OctoPrint-CuraLegacy",
repo="OctoPrint-CuraEngineLegacy",
current=self._plugin_version,

# update method: pip
pip="https://github.com/OctoPrint/OctoPrint-CuraLegacy/archive/{target_version}.zip"
pip="https://github.com/OctoPrint/OctoPrint-CuraEngineLegacy/archive/{target_version}.zip"
)
)

Expand Down Expand Up @@ -571,10 +571,10 @@ def _get_usage_from_length(filament_length, filament_diameter):
return usage


__plugin_name__ = "Cura Legacy"
__plugin_name__ = "CuraEngine Legacy"
def __plugin_load__():
global __plugin_implementation__
__plugin_implementation__ = CuraLegacyPlugin()
__plugin_implementation__ = CuraEngineLegacyPlugin()

global __plugin_hooks__
__plugin_hooks__ = {
Expand Down
4 changes: 2 additions & 2 deletions octoprint_curalegacy/static/js/curalegacy.js
@@ -1,5 +1,5 @@
$(function() {
function CuraLegacyViewModel(parameters) {
function CuraEngineLegacyViewModel(parameters) {
var self = this;

self.loginState = parameters[0];
Expand Down Expand Up @@ -321,7 +321,7 @@ $(function() {
}

OCTOPRINT_VIEWMODELS.push({
construct: CuraLegacyViewModel,
construct: CuraEngineLegacyViewModel,
dependencies: ["loginStateViewModel", "settingsViewModel", "slicingViewModel"],
elements: ["#settings_plugin_curalegacy", "#wizard_plugin_curalegacy"]
});
Expand Down
2 changes: 1 addition & 1 deletion octoprint_curalegacy/templates/curalegacy_settings.jinja2
Expand Up @@ -19,7 +19,7 @@
<button class="btn pull-right" data-bind="click: function() { $root.showImportProfileDialog() }">{{ _('Import Profile...') }}</button>

<div style="clear: both">
<small>{% trans %}For more information on configuration and usage please <a href="{{ plugin_cura_homepage }}" target="_blank">see the Plugin's homepage</a>.{% endtrans %}</small>
<small>{% trans %}For more information on configuration and usage please <a href="{{ plugin_curalegacy_homepage }}" target="_blank">see the Plugin's homepage</a>.{% endtrans %}</small>
</div>

{% include "snippets/settings/curalegacy/profileImporter.jinja2" %}
8 changes: 4 additions & 4 deletions octoprint_curalegacy/templates/curalegacy_wizard.jinja2
@@ -1,8 +1,8 @@
<div data-bind="visible: unconfiguredCuraEngine">
<h3>{{ _('Configure CuraEngine Legacy') }}</h3>
<p>{% trans %}
The path to CuraEngine has not yet been set up, in order to be able to use
CuraEngine for slicing it needs to be specified.
The path to CuraEngine Legacy has not yet been set up, in order to be able to use
CuraEngine Legacy for slicing it needs to be specified.
{% endtrans %}</p>

<div style="margin-top: 1em">
Expand All @@ -14,7 +14,7 @@

<div data-bind="visible: unconfiguredSlicingProfile">
<h3>{{ _('Set up a slicing profile') }}</h3>
<p>{% trans %}You haven't imported a slicing profile to use for slicing with CuraEngine
<p>{% trans %}You haven't imported a slicing profile to use for slicing with CuraEngine Legacy
yet. If you plan on slicing from within OctoPrint then you should do this now.
Otherwise just skip this step.{% endtrans %}</p>

Expand All @@ -27,7 +27,7 @@
<div style="clear: both; margin-top: 20px;">
<small>{% trans %}
<strong>Don't know where to get a profile?</strong> In order to export
a slicing profile from the Cura desktop UI up to and including version 15.04.06 (not versions
a slicing profile from the legacy Cura desktop UI up to and including version 15.04.06 (not versions
2.1 and later which are actually newer than 15.04), open it, set up your profile, then click
on "File" and there on "Save Profile". You can import the <code>.ini</code> file this creates
via the "Import Profile" button.
Expand Down
@@ -1,5 +1,5 @@
<div class="control-group" data-bind="css: {error: pathBroken(), success: pathOk()}">
<label class="control-label" for="settings-curalegacy-path">{{ _('Path to CuraEngine') }}</label>
<label class="control-label" for="settings-curalegacy-path">{{ _('Path to CuraEngine Legacy') }}</label>
<div class="controls">
<div class="input-append">
<input type="text" class="input-block-level" data-bind="value: settings.plugins.curalegacy.cura_engine, valueUpdate: 'afterkeydown'" id="settings-curalegacy-path">
Expand Down
@@ -1,7 +1,7 @@
<div id="settings_plugin_curalegacy_import" class="modal hide fade">
<div class="modal-header">
<a href="#" class="close" data-dismiss="modal" aria-hidden="true">&times;</a>
<h3>{{ _('Import Existing Cura Legacy Profile') }}</h3>
<h3>{{ _('Import Existing CuraEngine Legacy Profile') }}</h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
Expand Down Expand Up @@ -53,7 +53,7 @@
<small>{% trans %}
You can import your existing profile <code>.ini</code> files from <strong>Cura 15.04.x or older</strong>
here. Anything but those are <strong>not supported</strong>. That especially means that <code>.json</code>
profiles from Cura 15.06.x and <code>.curaprofile</code> profiles from Cura 2.x will not work, and neither
profiles from Cura 15.06.x and <code>.curaprofile</code> profiles from Cura 2.x, 3.x, 4.x, ... will not work, and neither
will custom Cura profile formats that third party tools like e.g. Repetier create.
{% endtrans %}</small>
</div>
Expand Down
Binary file modified octoprint_curalegacy/translations/de/LC_MESSAGES/messages.mo
Binary file not shown.
73 changes: 50 additions & 23 deletions octoprint_curalegacy/translations/de/LC_MESSAGES/messages.po
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint-CuraLegacy 1.0.0\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2019-02-12 15:50+0100\n"
"POT-Creation-Date: 2019-04-04 10:09+0200\n"
"PO-Revision-Date: 2019-02-12 15:51+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: de\n"
Expand All @@ -17,7 +17,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.6.0\n"
"Generated-By: Babel 2.3.4\n"

#: octoprint_curalegacy/static/js/curalegacy.js:188
msgid "Profile import failed"
Expand All @@ -27,7 +27,9 @@ msgstr "Profilimport fehlgeschlagen"
msgid ""
"Could not import the provided profile, it might be invalid. Check "
"<code>octoprint.log</code> for details"
msgstr "Konnte das Profil nicht importieren, es k枚nnte invalide sein. F眉r weitere Details siehe <code>octoprint.log</code>"
msgstr ""
"Konnte das Profil nicht importieren, es k枚nnte invalide sein. F眉r weitere"
" Details siehe <code>octoprint.log</code>"

#: octoprint_curalegacy/static/js/curalegacy.js:243
msgid "The path doesn't exist"
Expand Down Expand Up @@ -56,9 +58,11 @@ msgid ""
" <strong>versions up to and including 15.04</strong> are supported.\n"
" CuraEngine version 15.06 or newer is <strong>not</strong>\n"
" compatible with this plugin.\n"
msgstr "\n"
msgstr ""
"\n"
" Gib den Pfad zum CuraEngine Legacy Binary an. Beachte, dass nur\n"
" <strong>Versionen bis einschlie脽lich 15.04</strong> unterst眉tzt sind.\n"
" <strong>Versionen bis einschlie脽lich 15.04</strong> unterst眉tzt sind."
"\n"
" CuraEngine Version 15.06 oder neuere sind <strong>nicht</strong>\n"
" kompatibel mit diesem Plugin.\n"

Expand All @@ -72,59 +76,74 @@ msgid "Import Profile..."
msgstr "Profil importieren..."

#: octoprint_curalegacy/templates/curalegacy_settings.jinja2:22
#, python-format
#, fuzzy, python-format
msgid ""
"For more information on configuration and usage please <a "
"href=\"%(plugin_cura_homepage)s\" target=\"_blank\">see the Plugin's "
"homepage</a>."
msgstr "F眉r weitere Informationen zu Konfiguration and Verwendung schaue bitte auf die <a href=\"%(plugin_cura_homepage)s\" target=\"_blank\">Homepage des Plugins</a>."
"href=\"%(plugin_curalegacy_homepage)s\" target=\"_blank\">see the "
"Plugin's homepage</a>."
msgstr ""
"F眉r weitere Informationen zu Konfiguration and Verwendung schaue bitte "
"auf die <a href=\"%(plugin_curalegacy_homepage)s\" target=\"_blank\">Homepage "
"des Plugins</a>."

#: octoprint_curalegacy/templates/curalegacy_wizard.jinja2:2
msgid "Configure CuraEngine Legacy"
msgstr "Konfigurierte CuraEngine Legacy"

#: octoprint_curalegacy/templates/curalegacy_wizard.jinja2:3
#, fuzzy
msgid ""
"\n"
" The path to CuraEngine has not yet been set up, in order to be "
"able to use\n"
" CuraEngine for slicing it needs to be specified.\n"
" The path to CuraEngine Legacy has not yet been set up, in order "
"to be able to use\n"
" CuraEngine Legacy for slicing it needs to be specified.\n"
" "
msgstr "\n"
" Der Pfad zu CuraEngine wurde noch nicht konfiguriert.\n"
msgstr ""
"\n"
" Der Pfad zu CuraEngine Legacy wurde noch nicht konfiguriert.\n"
" "

#: octoprint_curalegacy/templates/curalegacy_wizard.jinja2:16
msgid "Set up a slicing profile"
msgstr "Konfiguriere ein Slicingprofil"

#: octoprint_curalegacy/templates/curalegacy_wizard.jinja2:17
#, fuzzy
msgid ""
"You haven't imported a slicing profile to use for slicing with CuraEngine"
"\n"
" Legacy\n"
" yet. If you plan on slicing from within OctoPrint then you should do "
"this now.\n"
" Otherwise just skip this step."
msgstr "Du hast noch kein Slicingprofile zum Slicen mit CuraEngine importiert. Falls Du vor hast, aus OctoPrint heraus zu slicen, dann solltest Du das jetzt tun. Andernfalls 眉berspringe diesen Schritt einfach."
msgstr ""
"Du hast noch kein Slicingprofile zum Slicen mit CuraEngine Legacy importiert. "
"Falls Du vor hast, aus OctoPrint heraus zu slicen, dann solltest Du das "
"jetzt tun. Andernfalls 眉berspringe diesen Schritt einfach."

#: octoprint_curalegacy/templates/curalegacy_wizard.jinja2:28
#, fuzzy
msgid ""
"\n"
" <strong>Don't know where to get a profile?</strong> In order "
"to export\n"
" a slicing profile from the Cura desktop UI up to and "
" a slicing profile from the legacy Cura desktop UI up to and "
"including version 15.04.06 (not versions\n"
" 2.1 and later which are actually newer than 15.04), open it, "
"set up your profile, then click\n"
" on \"File\" and there on \"Save Profile\". You can import the"
" <code>.ini</code> file this creates\n"
" via the \"Import Profile\" button.\n"
" "
msgstr "\n"
" <strong>Du wei脽t nicht, wo du so ein Profil her bekommst?</strong> Um ein Slicingprofil aus \n"
" dem Cura Desktopinterface bis zu Version 15.04.06 zu exportieren (nicht Versionen 2.1 oder neuer, \n"
" diese sind neuer als 15.04), 枚ffne es, konfiguriere dein Profil, dann klicke auf \"Datei\" und dort auf \n"
" \"Profil speichern\". Du kannst die resultierende <code>.ini</code>Datei dann 眉ber den \"Profile \n"
msgstr ""
"\n"
" <strong>Du wei脽t nicht, wo du so ein Profil her "
"bekommst?</strong> Um ein Slicingprofil aus \n"
" dem legacy Cura Desktopinterface bis zu Version 15.04.06 zu "
"exportieren (nicht Versionen 2.1 oder neuer, \n"
" diese sind neuer als 15.04), 枚ffne es, konfiguriere dein "
"Profil, dann klicke auf \"Datei\" und dort auf \n"
" \"Profil speichern\". Du kannst die resultierende "
"<code>.ini</code>Datei dann 眉ber den \"Profile \n"
" importieren\" Button importieren.\n"
" "

Expand Down Expand Up @@ -188,7 +207,14 @@ msgid ""
" will custom Cura profile formats that third party tools like "
"e.g. Repetier create.\n"
" "
msgstr "Du kannst hier deine vorhandenen <code>.ini</code> Profildateien von <strong>Cura 15.04.x oder 盲lter</strong>Andere Profilformate als diese sind <strong>nicht unterst眉tzt</strong>. Das beinhaltet insbesondere, dass <code>.json</code> Profile von Cura 15.06.x und <code>.curaprofile</code> Profile von Cura 2.x nicht funktionieren werden, ebenso wenig wie Cura-Profildateien, die von Third-Party-Tools wie z.B. Repetier erstellt wurden."
msgstr ""
"Du kannst hier deine vorhandenen <code>.ini</code> Profildateien von "
"<strong>Cura 15.04.x oder 盲lter</strong>Andere Profilformate als diese "
"sind <strong>nicht unterst眉tzt</strong>. Das beinhaltet insbesondere, "
"dass <code>.json</code> Profile von Cura 15.06.x und "
"<code>.curaprofile</code> Profile von Cura 2.x nicht funktionieren "
"werden, ebenso wenig wie Cura-Profildateien, die von Third-Party-Tools "
"wie z.B. Repetier erstellt wurden."

#: octoprint_curalegacy/templates/snippets/settings/curalegacy/profileImporter.jinja2:61
msgid "Abort"
Expand Down Expand Up @@ -217,3 +243,4 @@ msgstr "Als Standard festlegen"
#: octoprint_curalegacy/templates/snippets/settings/curalegacy/profiles.jinja2:18
msgid "Delete Profile"
msgstr "Profil entfernen"

4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -11,7 +11,7 @@

# The plugin's human readable name. Can be overwritten within OctoPrint's internal data via __plugin_name__ in the
# plugin module
plugin_name = "OctoPrint-CuraLegacy"
plugin_name = "OctoPrint-CuraEngineLegacy"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.0.2"
Expand All @@ -27,7 +27,7 @@
plugin_author_email = "gina@octoprint.org"

# The plugin's homepage URL. Can be overwritten within OctoPrint's internal data via __plugin_url__ in the plugin module
plugin_url = "https://github.com/OctoPrint/OctoPrint-CuraLegacy"
plugin_url = "https://github.com/OctoPrint/OctoPrint-CuraEngineLegacy"

# The plugin's license. Can be overwritten within OctoPrint's internal data via __plugin_license__ in the plugin module
plugin_license = "AGPLv3"
Expand Down
Binary file modified translations/de/LC_MESSAGES/messages.mo
Binary file not shown.

0 comments on commit a88caca

Please sign in to comment.