realthunder / FreeCAD_assembly3

Experimental attempt for the next generation assembly workbench for FreeCAD
GNU General Public License v3.0
877 stars 76 forks source link

Add Export as 3MF #836

Open ChaosBlades opened 2 years ago

ChaosBlades commented 2 years ago

I am not seeing any option to export as a 3MF format. The industry is moving away from STL and to 3MF. FreeCAD should support this. Especially since FreeCAD does not allow you to adjust the quality of STL.

https://en.wikipedia.org/wiki/3D_Manufacturing_Format

Fusion 360, Cura, and PrusaSlicer all support 3MF

herrgerd commented 2 years ago

You can adjust the quality of .STL output: grafik

You can use .amf too, at least as long as .3mf isn't supported yet.

herrgerd commented 2 years ago

@realthunder just curious: Is the addition of another export-format in your realm or is it something the creators of the main branch would do?

I read up on it and it seems like .3mf is completely free and open source: https://3mf.io/specification/

Cheers, Jan

ChaosBlades commented 2 years ago

This is all I found from the main branch. It seems there has been little movement since Nov 2018. There is nothing in the bug tracker. FAQ wants you to start a thread before posting feature requests to the tracker. https://forum.freecadweb.org/viewtopic.php?f=10&t=32165&start=20

This is the most up to date comparison I could find. AMF seems comparable to 3MF but 3MF has more compatibility. https://xometry.eu/en/3d-printing-file-formats-compared-obj-stl-amf-and-3mf/

herrgerd commented 2 years ago

Prusa has a good article on it, too: https://blog.prusaprinters.org/3mf-file-format-and-why-its-great_30986/ To be fair, I never encountered any of the "problems" mentioned with standard STL or AMF files. Of course the file format in itself is flawed and I absolutely hate it.

Slicers should import STEP files like every other program in the industry does. But as this ain't gonna happen we need to get along with imperfect triangulated files...

kevenwyld commented 2 years ago

You can adjust the quality of .STL output: grafik

@herrgerd Off topic, but did you do something special to get that Mesh Formats tab to appear? I'm in the latest Link Daily appimage and don't see that.

EDIT: Nevermind I figured it out, you have to have the mesh workbench selected for it to appear.

ChaosBlades commented 2 years ago

I can confirm on AppImage you need the mesh design work bench active. That is a little convoluted. Probably why I could not find it originally. I wonder what other settings only appear when you select a specific work bench.

luzpaz commented 2 years ago

@ChaosBlades originally it was about memory ccnsumption, IIRC. Boot in to FC and load all the workbenches would be immensely resource draining. There may have been some technical difficulties also that led to this. The downside is users not being able to find the preferences they're looking for. In upstream there is a solution now coded by 'chennes' that lets the user specify what workbenches they want to default load at startup. I'm not sure it's it's in RT's Link branch.

image

ref: https://forum.freecadweb.org/viewtopic.php?f=8&t=60074&start=30#p523481

ShivamJoker commented 2 years ago

So @realthunder any plans for adding this ? We would love to have it

luzpaz commented 2 years ago

@ShivamJoker that is no small feat, I imagine. Maybe let's let realthunder get toponaming sorted out before we ask for more features?

MisterMakerNL commented 2 years ago

I don't feel like 3mf is real important for Freecad, it is more for 3D printers and with the use of the Slicer export plugin it really is not needed to safe it as 3mf. Prusaslicer should support Freecad formats.

ShivamJoker commented 2 years ago

Is there any difference in quality of amf and 3mf ?

ChaosBlades commented 2 years ago

It is definitely not "real important" but it is a feature that a lot of CAD software has that FreeCAD does not. Fusion 360 for example exports 3MF by default now. I seen that no issue was raised for it on this branch and seeing as the main branch has not made any progress it makes sense to at the very least open an issue to track progress or lack there of. Having this mentality that FreeCAD needs / does not need X feature is not doing it any good. What FreeCAD needs is to become more inline with the features of other CAD software and other CAD software supports 3MF and FreeCAD does not. With that said this should definitely should be tagged as 'nice to have' / 'low priority' but saying FreeCAD does not need it outright is like I said not doing it any favors.

ChaosBlades commented 2 years ago

This is interesting. Seems Cura is looking to enable importing of Step files and explains why they like 3MF. https://community.ultimaker.com/topic/36279-import-step-files-in-cura/

Because you're wrong in that it's harder. It is much easier to do. It's literally just a single line of code, because the libraries that we intend to use handle all of that for us. Tessalated models are always easier, this is why 3MF also uses them. Just have a look at the size of the STEP specification versus that of 3MF.

We would have to re-write a reasonable chunk of the slicing engine to handle solid models. It does have some advantages, but it's mostly on being able to recognise the special shapes and change the strategy there. The extra accuraccy that you might get from it is in the ballpark of the accuracy of the printer. There are other things that we can do that impact the accuracy more with less investment on our side.

MisterMakerNL commented 2 years ago

PRusa has a better explanation https://blog.prusaprinters.org/3mf-file-format-and-why-its-great_30986/ But then again Freecad default format is better, because you won't lose any information and is still open source like 3mf. Should ask slicers if they can support freecad format.

luzpaz commented 2 years ago

Should ask slicers if they can support freecad format.

This!

eduncan911 commented 2 years ago

CURA supports importing FreeCAD. Really wish Slic3r/PrusaSlicer/SuperSlicer would add FreeCAD.

luzpaz commented 2 years ago

@eduncan911 do you know of any efforts to get Slic3r/PrusaSlicer/SuperSlicer to add FC ?

eduncan911 commented 2 years ago

@luzpaz nope, zero.

eduncan911 commented 2 years ago

Created a Feature Request, so we'll see how that goes:

https://github.com/prusa3d/PrusaSlicer/issues/7808

ShivamJoker commented 2 years ago

CURA supports importing FreeCAD. Really wish Slic3r/PrusaSlicer/SuperSlicer would add FreeCAD.

It keeps giving me error of unsupported file format.

Any mor details on this?

luzpaz commented 2 years ago

anyone want to open tickets for Slic3r and SuperSlicer ?

eduncan911 commented 2 years ago

anyone want to open tickets for Slic3r and SuperSlicer ?

I was thinking about that, since I use SuperSlicer explicitly (no more PS for me!). However, SuperSlicer is pretty much a one-man-show - so I didn't want to bog him down with this task. He usually pulls features over from PrusaSlicer, so I figured a ticket in PrusaSlicer works.

PrusaSlice has the most development activity over Slic4r, due to, well, Prusa with many many more developers. So I figured the best chance to get this implemented was with PrusaSlicer.

Now Slic4r, i have no idea of their development cycle/workflow and if they would be open to such a thing.

eduncan911 commented 2 years ago

CURA supports importing FreeCAD. Really wish Slic3r/PrusaSlicer/SuperSlicer would add FreeCAD.

It keeps giving me error of unsupported file format.

Any mor details on this?

You need to have FreeCAD installed locally (no app image), and it's CLI binary available in the PATH env variables that CURA is launched with.

https://community.ultimaker.com/topic/23548-freecad-plug-in/

kevenwyld commented 2 years ago

So, I realize that freecad format in slicers would be great but in my opinion this does not invalidate including 3mf export capability, the original topic of this issue. There's something to be said for conforming to "standards" even if better options are included as well.

That said, I'm not sure that the link branch is the right place for this. And I just poked around and found that maybe 3mf support is already included in upstream master??? not sure as I haven't tried it yet:

https://github.com/FreeCAD/FreeCAD/commit/e3ebe4bc9f

EDIT: The above commit is part of the Mesh Design workbench export feature and though I can create a 3mf file all the slicers I've tried say the file is corrupt and can't be opened.

Ritika-Das commented 2 years ago

CURA supports importing FreeCAD. Really wish Slic3r/PrusaSlicer/SuperSlicer would add FreeCAD.

It keeps giving me error of unsupported file format. Any mor details on this?

You need to have FreeCAD installed locally (no app image), and it's CLI binary available in the PATH env variables that CURA is launched with.

https://community.ultimaker.com/topic/23548-freecad-plug-in/

Where do I find its CLI binary?

luzpaz commented 2 years ago

@kevenwyld relevant forum threads:.

I think we should submit 3mf related commits upstream so they trickle in to RT's Link branch

eduncan911 commented 2 years ago

Looks like it's already added to FreeCAD core!

https://github.com/FreeCAD/FreeCAD/commit/e3ebe4bc9f

So, at this point, we just wait for the up-n-coming 1.20 release and realthunder can merge the upstream changes at some point.

Close this issue?

eduncan911 commented 2 years ago

CURA supports importing FreeCAD. Really wish Slic3r/PrusaSlicer/SuperSlicer would add FreeCAD.

It keeps giving me error of unsupported file format. Any mor details on this?

You need to have FreeCAD installed locally (no app image), and it's CLI binary available in the PATH env variables that CURA is launched with. https://community.ultimaker.com/topic/23548-freecad-plug-in/

Where do I find its CLI binary?

Depends if you are Windows, macOS, or Linux. But, should be in you PATH regardless of OS. The question is, are you launching CURA with the same environment variables, that includes your PATH.

Open a command prompt and try to type: FreeCADcmd If not found, then your PATH needs to include your FreeCAD install location for binaries.

Also, there are docker images, including the official one, that has built binaries without any GUI as another option.

cc @Ritika-Das

Luberry commented 2 years ago

Looks like it's already added to FreeCAD core!

FreeCAD/FreeCAD@e3ebe4bc9f

So, at this point, we just wait for the up-n-coming 1.20 release and realthunder can merge the upstream changes at some point.

Close this issue?

Looks like you have to convert to a mesh first in the mesh wb, ideally you would be able to just be able to export using std export. though, a macro could probable be created to create a temporary mesh, export, remove the mesh. or just add it to std export