3mf export broken

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
mfraz74
Posts: 158
Joined: Mon Apr 05, 2021 9:19 am
Contact:

3mf export broken

Post by mfraz74 »

Trying to import 3mf files into PrusaSlicer fails with the error "Loading of a model file failed"

This seems to be due to the line:
<object id="1" type="surface">
in the 3D/3dmodel.model file
change it to:
<object id="1" type="model">
and it loads.


Attached 2 files, Working.zip (3mf) loads into PrusaSlicer, Broken.zip (3mf) doesn't. All I changed was surface to model as above.

Code: Select all

OS: Ubuntu 22.04.1 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.30492 (Git) AppImage
Build type: Release
Branch: master
Hash: b4578fb3eae842eb510a1bc055d07d369a67ce94
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * sheetmetal 0.2.57
  * Manipulator 1.4.9
  * lattice2 1.0.0
  * fcgear 1.0.0
  * Curves 0.5.8
  * Assembly4 0.11.8
  * fasteners
  * A2plus 0.4.59d
  * ThreadProfile 1.84.0
  * Assembly3 0.11.3
  * VendorParts
Attachments
Working.zip
Working.3mf
(104.37 KiB) Downloaded 25 times
Broken.zip
Broken.3mf
(108.85 KiB) Downloaded 18 times
User avatar
mfraz74
Posts: 158
Joined: Mon Apr 05, 2021 9:19 am
Contact:

Re: 3mf export broken

Post by mfraz74 »

For some reason, it only affects certain exports. Haven't figured out why yet.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 3mf export broken

Post by wmayer »

mfraz74 wrote: Wed Oct 05, 2022 5:10 pm For some reason, it only affects certain exports. Haven't figured out why yet.
According to the specs model is used for solids, i.e. watertight meshes with no open edges. And surface is used for non-solid meshes.
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: 3mf export broken

Post by adrianinsaval »

it might help if you post a sample file that exports fine and another that fails
User avatar
mfraz74
Posts: 158
Joined: Mon Apr 05, 2021 9:19 am
Contact:

Re: 3mf export broken

Post by mfraz74 »

Car Phone Holder-Body.3mf exports fine
Lees.3mf doesn't load into PrusaSlicer
Attachments
Lees.zip
Lees.3mf
(30.1 KiB) Downloaded 16 times
Car Phone Holder-Body.zip
Car Phone Holder-Body.3mf
(32.71 KiB) Downloaded 17 times
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 3mf export broken

Post by wmayer »

Look: https://github.com/FreeCAD/FreeCAD/blob ... F.cpp#L145

The question is whether it makes sense to also use model for non-solid meshes just to allow to load it into PrusaSlicer. What does PrusaSlicer do if it detects a mesh that isn't a solid?
CDY_001
Posts: 1
Joined: Fri Oct 06, 2023 1:39 pm

Re: 3mf export broken

Post by CDY_001 »

I had the same problem in both the export to stl or 3mf types. I made sure that the extrusion "SOLID" attribute is TRUE, then found in the draft of the extrusion, change "Make Face" to "false" and this fix the stl option but 3mf is still not working.
Post Reply