Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cura for OctoPrint Cura integration #18

Closed
guysoft opened this issue Jan 28, 2014 · 17 comments
Closed

Add Cura for OctoPrint Cura integration #18

guysoft opened this issue Jan 28, 2014 · 17 comments

Comments

@guysoft
Copy link
Owner

guysoft commented Jan 28, 2014

OctoPrint has now inbuilt Cura integration. We need to get it shipped with OctoPi and make users happy

@NeighborGeek
Copy link

Cura can be added to a freshly built octopi image using the following:

cd
sudo apt-get install python-wxgtk2.8
git clone https://github.com/daid/Cura.git
cd Cura
git clone https://github.com/Ultimaker/CuraEngine.git
cd CuraEngine
make
cd ..
{ echo '#!/bin/sh'; echo 'PYTHONPATH=. python2 -m Cura.cura $@'; } >> cura.sh

In octoprint, set the path to cura as /home/pi/Cura/cura.sh

Also create a CuraConfig.ini file from Cura for windows, copy it to /home/pi/Cura/config/CuraConfig.ini on the pi, and set that as the path to the Cura config file in the octoprint settings.

guysoft added a commit that referenced this issue Mar 24, 2014
@guysoft
Copy link
Owner Author

guysoft commented Mar 24, 2014

Ok, can build and ship Cura now. I can also point OctoPrint to /home/pi/Cura/cura.sh .
However I am unsure what CuraConfig.ini I should ship. Any suggestions @foosel ?

@foosel
Copy link
Collaborator

foosel commented Mar 24, 2014

We can't really ship a bundled CuraConfig, since it's way too specific to the user's own setup (printer, filament etc).

@guysoft
Copy link
Owner Author

guysoft commented Mar 24, 2014

@foosel In theory we could ship several for common setups and have some
selection option + custom file.
(Yet again need plugins, or we could add docs).
On 24 Mar 2014 20:28, "Gina Häußge" notifications@github.com wrote:

We can't really ship a bundled CuraConfig, since it's way too specific to
the user's own setup (printer, filament etc).

Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-38482408
.

@NeighborGeek
Copy link

Ideally, long term, I would think octoprint should have an option to select
from several different config files anyway. Then the user could create
config files for different filaments, different layer heights, infill
levels, etc, and just choose which one to use each time they upload
something to be sliced.

Of course, that's easy for me to say. :)

On Mon, Mar 24, 2014 at 1:33 PM, Guy Sheffer notifications@github.comwrote:

@foosel In theory we could ship several for common setups and have some
selection option + custom file.
(Yet again need plugins, or we could add docs).
On 24 Mar 2014 20:28, "Gina Häußge" notifications@github.com wrote:

We can't really ship a bundled CuraConfig, since it's way too specific
to
the user's own setup (printer, filament etc).

Reply to this email directly or view it on GitHub<
https://github.com/guysoft/OctoPi/issues/18#issuecomment-38482408>
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-38482965
.

@foosel
Copy link
Collaborator

foosel commented Mar 24, 2014

Let me say it that way, the slicer config is so specific that I use a
separate one for every spool of Filament I have in house, plus I adjust
even further depending on the part being printed.

It's just not something that can/should be shipped IMHO.

Just include the Cura installation and ship with Cura support disabled by
default in the config but with the correct paths. That would hopefully make
it easy for users to setup the stuff for themselves but without the need to
fiddle around with settings up Cura.

In the long run a UI needs to be placed in OctoPrint in any case to allow
for configuring the slicer.

@CraigRK
Copy link

CraigRK commented Mar 24, 2014

As a user, I'd agree with what foosel is saying. Even further, I love what Octoprint does for me and how easy Octopi made the initial setup, but I don't actually use Cura at all (and am unlikely to on the PI), so surely this potentially bloats the install for many users?

Would it not be better to have a script in the OctoPi deployment which updates to install Cura (or other slicers)? Then again, this might be what you meant.

@guysoft
Copy link
Owner Author

guysoft commented Mar 24, 2014

Its not that bloated. People are asking for it. We can ship it. I think
OctoPi should be easy to use, but also come with extra stuff that is not
trivial to install. In a way its what made OctoPi successful, it made
OctoPrint much more accessible. Having Cura and even Slic3r as extras if
users want to play with them is good. Same happened when we added webcam
support, it saved hundreds of people compiling stuff across the world.

On Mon, Mar 24, 2014 at 9:09 PM, CraigRK notifications@github.com wrote:

As a user, I'd agree with what foosel is saying. Even further, I love what
Octoprint does for me and how easy Octopi made the initial setup, but I
don't actually use Cura at all (and am unlikely to on the PI), so surely
this potentially bloats the install for many users?

Would it not be better to have a script in the OctoPi deployment which
updates to install Cura (or other slicers)? Then again, this might be what
you meant.

Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-38487321
.

@CraigRK
Copy link

CraigRK commented Mar 24, 2014

Apologies as I seemed to have upset you. I didn't mean it that way.

As I said, I appreciated what you did and how it made things easy for me. I'm not a Linux guy so what you did was invaluable to me.

What I meant was that in the way that in windows you can choose to install certain options, etc, this would be desirable to some people in order to not install things they will never use. But of course the desires of the many are more important in this context.

@guysoft
Copy link
Owner Author

guysoft commented Mar 24, 2014

You didn't upset me at all :)
I am just stating that its not a big burden to ship more here. The only
thing affected is the download size of the image, the flashing time is
unaffected anyway. And Cura zipped is pretty small.

On Mon, Mar 24, 2014 at 9:28 PM, CraigRK notifications@github.com wrote:

Apologies as I seemed to have upset you. I didn't mean it that way.

As I said, I appreciated what you did and how it made things easy for me.
I'm not a Linux guy so what you did was invaluable to me.

What I meant was that in the way that in windows you can choose to install
certain options, etc, this would be desirable to some people in order to
not install things they will never use. But of course the desires of the
many are more important in this context.

Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-38489507
.

@guysoft
Copy link
Owner Author

guysoft commented Jul 13, 2014

Bumping, should we include this?
9f494ca

@Jerware
Copy link

Jerware commented Aug 14, 2014

Just a heads up, I tried to install Cura using the above instructions today and I get the following error when running the make command:

cc1plus: error: unrecognized command line option â-std=c++11â
make: *** [build/bridge.o] Error 1

Is it possible the latest version of Cura requires a newer version of GCC? If so, perhaps you could post the steps to perform that update?

@dotBits
Copy link

dotBits commented Sep 15, 2014

+1 for Cura onboard.
@Jerware CuraEngine requires gcc 4.8

@guysoft
Copy link
Owner Author

guysoft commented Sep 16, 2014

jessie (the Debian distro) has gcc 4.8, it means Cura support would mean upgrading to jesse.

You should be able to do this on OctoPi with this:

sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
reboot

@brad
Copy link
Contributor

brad commented Oct 20, 2014

Just to close the loop on the gcc 4.8 issue, I had to also run the following after upgrading to jesse:

sudo apt-get install gcc-4.8 g++-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50

Only after doing this was I able to make CuraEngine without the error mentioned above.

However, there was one more step I had to add after make:

sudo ln -s `pwd`/build/CuraEngine /usr/bin/CuraEngine

I also did a chmod a+x cura.sh but I don't know if that was actually necessary.

Also, at the time of this writing, there is a bug in Cura that breaks all slicing. I made a PR with a fix: https://github.com/daid/Cura/pull/989

After all this, I am now slicing using Cura in octopi. Thanks for the info!

@foosel
Copy link
Collaborator

foosel commented Oct 20, 2014

FYI, I'm successfully building CuraEngine from within the OctoPi build with this addition to the chroot script:

#CuraEngine
sudo apt-get -y install gcc-4.7 g++-4.7
sudo -u pi git clone https://github.com/Ultimaker/CuraEngine.git
pushd CuraEngine
  sudo -u pi wget https://gist.githubusercontent.com/foosel/f86d6a729c0187ff8a82/raw/3d4f152b924080f502d887d11269f27a2389d64d/CuraEngine.patch
  sudo -u pi patch < CuraEngine.patch
  sudo -u pi make CXX=g++-4.7
popd

The patch being applied there is basically the same as the one described in this post.

Mind you, that only takes care of CuraEngine though, not the full Cura package, as it's targeted towards the new slicing integration in the current OctoPrint devel version, which has "dropped the middleman" so to speak and directly invokes CuraEngine. This is also the reason why I haven't yet posted a PR for this, it's devel only for now.

@foosel
Copy link
Collaborator

foosel commented Jul 5, 2015

Included in 0.12

@foosel foosel closed this as completed Jul 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants