Where is the Cura Add-on?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
Vagulus
Posts: 850
Joined: Tue Jul 14, 2020 7:55 am
Location: Perth, Western Australia

Where is the Cura Add-on?

Post by Vagulus »

I was just at [wiki]https://wiki.freecadweb.org/Manual:Prep ... D_printing[/wiki] and, following the link to the Cura Workbench (https://github.com/FreeCAD/FreeCAD-addons), I find no reference to the workbench. Trying from FC (Tools --> Add-on Manager I was notified that the cura_engine add-on is obsolete
210927 Cura Add-on Obsolete.png
210927 Cura Add-on Obsolete.png (93.14 KiB) Viewed 3661 times
I'm told there is a more advanced add-on to do the job but I don't see it.

Is this functionality still available and, if so, where?
Thanks
"It is much harder to simplify than to complicate."
Joseph Kimble
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Where is the Cura Add-on?

Post by chennes »

The original plugin is (I think) this one: https://github.com/cblt2l/FreeCAD-CuraEngine-Plugin

There is an active Cura plugin to make Cura itself able to import FreeCAD files: https://thopiekar.eu/cura/cad/freecad/
(Note that you'll have to install FreeCAD in a non-sandboxed way for it to work)

Beyond that, I don't know of any current direct integration of Cura Engine into FreeCAD, I typically just export an STL.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
TheMarkster
Veteran
Posts: 5508
Joined: Thu Apr 05, 2018 1:53 am

Re: Where is the Cura Add-on?

Post by TheMarkster »

I really don't think there is a need for a Cura plugin either in FreeCAD or in Cura. Create your mesh in Mesh Design so you can have more control over the parameters and so you can test it for defects before exporting to STL.
chrisb
Veteran
Posts: 54144
Joined: Tue Mar 17, 2015 9:14 am

Re: Where is the Cura Add-on?

Post by chrisb »

Cura's number of settings seems to be constantly growing, and the GUI keeps track of materials, WLAN connections to printers, ... and it checks the loaded files for updates. So a simple workflow is:

Start
- export model to STL or OBJ
- start Cura, load the model, tune the settings

Now you can print or you need changes right away, so the following steps will be done in a loop:
- change model in FreeCAD
- export to the same file - this is what FreeCAD offers as default
- switch to Cura and confirm when you are asked to reload.
- optional: print again

An addon for this may indeed be overkill.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Syres
Veteran
Posts: 2898
Joined: Thu Aug 09, 2018 11:14 am

Re: Where is the Cura Add-on?

Post by Syres »

To save a minuscule of time I use this macro:

Code: Select all

# -*- coding: utf-8 -*-
# Opens current visible objects in Slic3r. One can use different slicing software

__Title__ = "Open in Slic3r"
__Author__ = "Damian Lozinski"
__Version__ = "0.1"
__Date__ = "2019-03-06"
__Comment__ = "Exports current visible objects to amf files and opens them in Slic3r"
__Web__ = ""
__Wiki__ = "http://www.freecadweb.org/wiki/index.php?title=Open in Slic3r"
__Icon__ = "/usr/lib/freecad/Mod/plugins/icons/Slic3r.png"
__Help__ = "Run this macro to open visible objects in slicer software. You may need to change slicer path"
__Status__ = ""
__Requires__ = "freecad 0.17"
__Communication__ = "https://github.com/dlozinski"
__Files__ = "Slic3r.png"

import Mesh
import MeshPart
import os
import subprocess

# Slicing program executable. One can use different slicing software here and provide proper slicer executable location and custom flags
SLICER_CMD = ["G:/MyProgs/Ultimaker Cura 4.10.0/Cura.exe"]

def main():
    doc = App.ActiveDocument
    if not doc:
        return "No active document"

    # Get all visible objests with shapes
    visible_shapes = (o for o in doc.Objects if o.ViewObject.isVisible() and hasattr(o, 'Shape'))

    if not visible_shapes:
        return "No visible shapes"

    # Ensure to not include both parent and child objects
    objects_to_export = set()
    for o in visible_shapes:
        if not set(o.InListRecursive).intersection(objects_to_export):
            objects_to_export.add(o)

    out_dir = os.path.dirname(doc.FileName)
    mesh_path = out_dir + "/meshes.obj" if out_dir else "meshes.obj"
    # Create temporary doc to store meshes
    tmp_doc = App.newDocument("meshes")
    try:
        meshes = []
        for o in objects_to_export:
            mesh = tmp_doc.addObject("Mesh::Feature", "Mesh")
            mesh.Mesh = MeshPart.meshFromShape(o.Shape, LinearDeflection=0.1, AngularDeflection=0.0872665, Relative=False)
            meshes.append(mesh)
        Mesh.export(meshes, mesh_path)
    finally:
        App.closeDocument("meshes")

    # Launch Slicer with meshes
    subprocess.Popen(SLICER_CMD + [mesh_path])


error = main()
if error:
    App.Console.PrintError("Error while opening in Cura: " + error + "\n")
else:
    App.Console.PrintMessage("Objects opened in Cura\n")

You just need to edit line 24 to point to your Cura installation.
TheMarkster
Veteran
Posts: 5508
Joined: Thu Apr 05, 2018 1:53 am

Re: Where is the Cura Add-on?

Post by TheMarkster »

Syres wrote: Mon Sep 27, 2021 9:49 am To save a minuscule of time I use this macro:
Nice. I suggest to also check the mesh for errors and issue warnings in the console if any are found. Here are a few tests that could be quickly run:
Snip macro screenshot-c53d48.png
Snip macro screenshot-c53d48.png (9.62 KiB) Viewed 3339 times
If potential issues are found leave the temp document open for a more thorough examination in Mesh Design using the Gui tool. I have found sometimes the problem on an edge can be fixed by adding a small chamfer or fillet to the edge that has defects. I have also found sometimes one of the other meshers can make meshes without defects where the standard mesher has failed.
User avatar
Vagulus
Posts: 850
Joined: Tue Jul 14, 2020 7:55 am
Location: Perth, Western Australia

Re: Where is the Cura Add-on?

Post by Vagulus »

Firstly, my profound apologies for being so slow to respond. I just haven't been anywhere near FC for weeks - other things called. :oops:

Secondly, thanks for all those suggestions. I have been unhappy with the performance of ideaMaker (the slicer provided for my printer (Raise3D Pro2) and have been thinking of using Cura (which has been widely recommended). Now I find that Cura does not list the Raise3D Pro2 in its settings so that cans that idea.

Sorry to put you to all that trouble.
"It is much harder to simplify than to complicate."
Joseph Kimble
mea08kw
Posts: 82
Joined: Sun Oct 09, 2022 6:22 am

Re: Where is the Cura Add-on?

Post by mea08kw »

TheMarkster wrote: Mon Sep 27, 2021 5:41 pm
Syres wrote: Mon Sep 27, 2021 9:49 am To save a minuscule of time I use this macro:
Nice. I suggest to also check the mesh for errors and issue warnings in the console if any are found. Here are a few tests that could be quickly run:

Snip macro screenshot-c53d48.png

If potential issues are found leave the temp document open for a more thorough examination in Mesh Design using the Gui tool. I have found sometimes the problem on an edge can be fixed by adding a small chamfer or fillet to the edge that has defects. I have also found sometimes one of the other meshers can make meshes without defects where the standard mesher has failed.
Hi

I'm wondering where you find those functions to check correspoding errors in the attached image. I only can find two of them.

Many thanks.

Best Regards,

Mea08kw
TheMarkster
Veteran
Posts: 5508
Joined: Thu Apr 05, 2018 1:53 am

Re: Where is the Cura Add-on?

Post by TheMarkster »

It's part of the python API for mesh objects. That screenshot is from the python console after typing in the mesh object, if memory serves.
mea08kw
Posts: 82
Joined: Sun Oct 09, 2022 6:22 am

Re: Where is the Cura Add-on?

Post by mea08kw »

TheMarkster wrote: Thu Oct 27, 2022 4:29 pm It's part of the python API for mesh objects. That screenshot is from the python console after typing in the mesh object, if memory serves.
Thanks for pointing out. I see them in Python console.
Post Reply