Getting Started - lulzbot3d/CuraLE GitHub Wiki
The instructions on this page will get you started developing CuraLE.
UltiMaker advises using PyCharm, as they have created preset run configurations that will make getting started easier. There is a free community version available. However, development can also be done in your preferred IDE (I personally use VSCode).
- First install the build requirements listed here.
- You only have to install these build requirements. All dependencies will be handled by Conan.
- Then configure Conan
- This step only needs to be done once, unless you clear your conan cache. You can skip this step for UraniumLE/CuraEngineLE.
- Then clone CuraLE.
- If you plan to work with UraniumLE and CuraEngineLE, clone them all in the same root folder.
- Now run conan install
- This will install all dependencies required for Cura including CuraEngineLE and UraniumLE. This will take over 30 minutes on the first run.
- UltiMaker advises using the -g PyCharmRunEnv argument here to get the PyCharm run configurations. If you are using PyCharm you are ready to go, otherwise you must activate the virtual environment each time you would like to start development and run CuraLE from the command line.
You can now make changes to your CuraLE project and test them by running CuraLE. If you would like to change the slicing process, follow these steps to develop CuraEngineLE.
Here are some tips if you run into issues with conan.
-
Make sure you have the correct conan version installed. You can check this with conan --version.
- Try to force installing the correct version using
pip install --force-reinstall -v "conan==X.XX.X"
with X.XX.X being the version specified in the requirements.
- Try to force installing the correct version using
-
Try deleting your local conan cache. You can do this with
conan remove "*" -f
- You must redo the configure conan and conan install steps afterwards.
-
Do not run conan install using
sudo
. This will mess up the permissions in your cache.- If you have installed using sudo, delete your cache.
-
Make sure you are not using our internal conan repository.
- Run this
conan remote remove cura-le-conan2-private
- Run this
Note: Most links in this section are currently dead.
-
First install the build requirements listed here.
- If you have done this for CuraLE you should have all of the requirements already.
-
Then clone UraniumLE.
Before you can run CuraLE using your development version of UraniumLE, you must put UraniumLE into editable mode. Conan stores local copies of all dependencies in
~/.conan
. Editable mode links the UraniumLE dependency in~/.conan/data/uraniumle/...
to the development copy you've just cloned. -
Inside your UraniumLE folder, add conan as editable.
- What you fill in here does not matter for local development.
- Example:
conan editable add . uraniumle/5.4.0@jeff/testing
- Example:
- What you fill in here does not matter for local development.
-
Inside your CuraLE folder run conan install again with this flag
--require-override=uraniumle/<version>@<username>/<channel>
- Example:
conan install . --build=missing --update -o cura:devtools=True -g VirtualPythonEnv -g PyCharmRunEnv --require-override=uraniumle/5.4.0@jeff/testing
- Store this command somewhere, you will need to use this everytime you run conan install on CuraLE.
- Example:
-
To test if this worked, delete
UraniumLE/UM/Application.py
. CuraLE should fail to start because this file is missing.
UltiMaker advises using PyCharm to develop CuraLE and UraniumLE in parallel. It offers excellent support for multi repository projects.
-
With the CuraLE Project open, navigate to File > Open.
-
Click Attach on the popup Dialog
-
Now you should have both CuraLE and UraniumLE open in the same window.
-
Using the built-in git plugin, you can create branches for both projects simultaniously
This section covers developing CuraEngineLE and CuraLE simultaneously.
Note many links in this section are currently dead.
-
First install the build requirements listed here.
-
Then clone CuraEngineLE.
-
- Most of the time you want to use Debug mode for the debugger.
-
Run curale with the argument --external-backend or use the external backend run configuration in PyCharm.
-
Start a slice in CuraLE
-
Run
curaengine connect 127.0.0.1:49674
- If you are getting this error
[ERROR] Could not connect to the given address
the port may have changed due to a failed slice.- Try incrementing the port number
curaengine connect 127.0.0.1:49675
. - You can find the port in the CuraLE logs
[MainThread] UM.Backend.Backend._onSocketStateChanged [185]: Backend connected on port 49674
- Try incrementing the port number
- If you are getting this error
[ERROR] Trying to retrieve setting with no value given: 'setting_name_here'
you are using a branch of CuraLE that is out of sync with CuraEngineLE.- Make sure you are on the main branch for both projects or merge main into your working branches on both projects. The instructions on this page will get you started developing Cura.