2
$\begingroup$

I apologize first if this is a super basic question to most, I am currently a computer science student in my last semester before an Associate's degree with little knowledge of the command line and Python download environments. I also primarily work with Java but have an internship using Python.

I have written a program that is able to take a G-code file and convert it into an SBP file with a Python script through a click of a button within a GUI. I have now been tasked with taking in an STL file and using a slicer (Cura) to convert that file into G-code.

I am currently trying to get the CuraEngine (without Cura) to work via the command line in order to use the subprocess library within Python to do all of these conversions within my personal GUI. However, the wiki on downloading CuraEngine isn't helping much.

I have been able to achieve installing and building the CuraEngine release, but cannot activate the Conan run environment through the walkthrough of the wiki.

I am getting the error that the pathway (\build\generators\conanrun.sh) is not a recognized internal/external command, operable program, or batch file. When looking up the files within the generators folder, the conanrun file is actually an extension of .bat (conanrun.bat).

So a few questions I have:

  • What do I do to get the CuraEngine running on the command line at this point?
  • Would it be easier to just download/run the entire Cura application through the source? I've noticed a lot of others have done that, but I don't want the GUI that goes along with it. I've also had trouble downloading the Cura application from the command line, with ERROR: pynest2d/5.3.0-alpha+testing_0@ultimaker/testing: Error in generate() method showing up in the install.
  • As an extension of the above question, it seems the build instructions for CuraEngine have had a lot of complaints from others. As a result, is there a better way to get a slicer engine to work through a self-made GUI?

Also, I did post this question on StackOverflow.com and community.ultimaker.com as well, in case you run into it there.

$\endgroup$
2
  • 1
    $\begingroup$ I am unsure if this question is a good fit for this site, It may be a better fit to Stack Overflow or Super User. However, your path of \build\generators\conanrun.sh does not appear to include a . at the start, which is needed for relative paths like this. (The error produced also eludes to this missing dot) $\endgroup$
    – craftxbox
    Commented Oct 20, 2022 at 22:25
  • $\begingroup$ @craftxbox: Insomuch as it's needed to build and run CuraEngine from source, which is a task you might do for 3D printing and to experiment with changes to slicing for 3D printing, I think it's well on-topic. $\endgroup$ Commented Mar 22, 2023 at 18:16

1 Answer 1

0
$\begingroup$

As far as I can tell, conanrun.sh is something you should not have to do. Just run the CuraEngine binary directly. If that doesn't work, update your question with what went wrong and I can expand on this answer.

To get into the nitty details, it appears the point of conanrun.sh is to setup library paths to find the libraries Conan (a really awful, unconventional C++ Language Package Manager the Ultimaker folks have adopted) built itself and linked CuraEngine against, since they're not present in system-wide paths. However at least on Windows, I would expect any needed DLLs to be automatically found in the same directory as the executable, and on Linux, etc., sourcing a script to override library paths like this will break anything else run from the same shell environment (!!) - it's not the right thing to do. Unfortunately, Conan has made it really difficult to build CuraEngine right (see my bug report 12941) but on Windows it's probably not that bad.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .