CuraEngine icon indicating copy to clipboard operation
CuraEngine copied to clipboard

Cannot use CuraEngine with Cura via connect / external-backend

Open lf94 opened this issue 2 years ago • 4 comments

Application Version 4.10 of Cura, and master of CuraEngine

Platform Debian 11

Qt

PyQt

Display Driver

Steps to Reproduce

  1. Start Cura-4.10.AppImage
  2. Run ./CuraEngine/build/CuraEngine connect localhost:49674 -v

Actual Results CuraEngine disconnects with no reason.

Expected results It should slice the model.

Additional Information I'm trying to do an experiment, but before I can do the experiment, the vanilla build has to work first!

lf94 avatar Oct 15 '21 01:10 lf94

@Ghostkeeper I'm only pinging you because I've seen you active in other issues - sorry if you're the person to ping.

lf94 avatar Oct 15 '21 12:10 lf94

I'm purposefully running a week behind on Github notifications to allow other people to respond before me. I also see the ping one week later. But since nobody did...

The AppImage will start its own CuraEngine process and connect to it. As a result, I'd expect that your own CuraEngine process can't connect there. The front-end does this at start-up, leaving CuraEngine running until it receives a slice from the front-end.

To prevent the front-end from launching its own CuraEngine process, you can start the front-end with the --external-backend command-line option, like this:

  1. Run Cura-4.10.AppImage --external-backend
  2. Load a model, prepare some settings, etc.
  3. Run ./CuraEngine/build/CuraEngine connect localhost:49674 -v

This is how I frequently test CuraEngine with the debugging interface in my IDE.

I would expect though that if you use Cura 4.10's front-end and the CuraEngine master branch, that CuraEngine will complain that it needs several settings that Cura 4.10 didn't have yet, such as the Monotonic options.

Let me know if that doesn't work.

Ghostkeeper avatar Oct 22 '21 11:10 Ghostkeeper

@Ghostkeeper I've done exactly that and it disconnects as soon as I start slicing. I've even tried with Cura 4.11... Please re-open the issue :slightly_smiling_face:

lf94 avatar Oct 22 '21 12:10 lf94

What does Cura's log file say? It will indicate that it's waiting for a connection, normally on port 49674, but incrementing the port number if that port is busy (e.g. by another instance of Cura).

Ghostkeeper avatar Oct 29 '21 09:10 Ghostkeeper