View Issue Details

IDProjectCategoryView StatusLast Update
0000608File formatsFeaturepublic2017-03-07 12:40
ReporterpeepsalotAssigned Toian.rees 
Status closedResolutionfixed 
Summary0000608: Support for importing/exporting AMF file format
DescriptionI would love to see FreeCAD support the AMF file format

It is the successor to STL file format which is currently the most widely used way to share 3d models for RepRap and other hobby 3d printers.

The big improvement for us would be curved triangles, which should allow much more accurate inner and outer diameters without having to tesselate so finely. Also the ability to specify multiple materials/colors for users with dual print heads.


has duplicate 0002249 closedyorik Support for importing/exporting AMF file format 
related to 0002940 assignedian.rees Add material information to exported AMFs 


2012-02-19 17:23peepsalotNew Issue


2012-02-28 00:50

administrator   ~0001676

Hm supporting a new file format is always a lot of work, specially to maintain the code, since things usually evolve fast... Let's keep this open, see if more people manifest themselves, but I'm afraid it will stay with quite a low priority...
2012-05-05 18:29yorikProject@4@ => File formats


2013-11-23 18:45

reporter   ~0003900

Last edited: 2013-11-23 18:45

View 2 revisions

I'll second the request, although at the moment it would be a low priority, as STL files are still being used extensively. However, AMF will almost certainly become the industry standard format for rapid prototyping.

2013-11-23 18:45modeler123Note Edited: 0003900View Revisions


2013-11-25 10:19

administrator   ~0003906

> The big improvement for us would be curved triangles, which should allow much more accurate inner and outer diameters without having to tesselate so finely.

However, in FreeCAD we don't support curved triangles. In the Mesh module the triangles are only planar.

And for the CAD-related part the geometry is organized in the BREP structure and OCC doesn't offer a way to create curved triangles but only flat ones.

So, you won't benefit from a possible curvature information in the file format because you cannot use it.


2013-11-26 18:16

developer   ~0003908

I think from an export only standpoint the curved triangle could be done pretty easily. It appears that the curvature interpolation is understood to be done on the manufacturing end. The vertices would be the same as stl and we would just have to add vertex normals, like we do for the visualization meshes.

The other xml tags don't look hard. Might be a pain to build an interface to assign data, unless they can be derived from other properties.

It appears the AMF standard is in the process of being replaced?


2014-06-08 10:53

reporter   ~0004743


ASTM F2915-11 AMF standard is superseded with ISO/ASTM 52915 AMF standard.
It is now ISO/ASTM standard.

As a part of my thesis study, I would like to have FreeCAD with full AMF conversion capability in my framework.

If you or any developer will be interested in adding embedded AMF capability, I am ready to deal it as a bounty project with a proposal from developer.

Keeping AMF capabilities as the crucial part, other parts of my framework is open to bounty project proposals also.

Please let me know is you are interested and hear more ASAP.


2014-06-08 11:05

developer   ~0004744

AMF is quite complex. The question is which features are you interested in. For some features in AMF there is currently not an exact counterpart inside of FreeCAD.
My second question would be i you would like to realize this using python or c++?
The "<constellation>" element looks the most promising to my, when it comes to exporting for 3d printing.


2014-06-08 11:22

reporter   ~0004745

I am only working with Java. To my knowledge both python or C++ are ok, since I have to learn either :)

I am trying to finalize the system description document for my framework. I will freeze the requirements for CAD (including AMF import/export capabilities) in a few days.
I would share the requirement document, if you are interested. There you'll see the details.

Could you please share your contact to send the reqs document.

Thanks for your concern,
2014-06-11 03:41veritasNote View State: 0004745: private
2014-06-11 03:41veritasNote View State: 0004745: public


2015-05-03 12:59

reporter   ~0006114

I'm interested to seeing this happening too... if we want FreeCAD to be ready for the 3D printing industry, we'll really have to incorporate this. Dual head printers are coming faster than we can say it. Currently, you need to rely on the external software (Cura, Slic3r, ...) to rely on putting back together what FreeCAD drew together but then exported seperately...

I understand that full support is not possible because of the curved vertices. From where I'm looking, this means you can't IMPORT all AMF files... but you could perfectly use it to EXPORT to AMF
2015-09-09 22:02savio araujoIssue cloned: 0002249
2015-09-10 19:14yorikRelationship addedhas duplicate 0002249


2015-12-13 10:09

developer   ~0006598

Last edited: 2015-12-13 10:15

View 2 revisions

There's still a lot to do, but would appreciate feedback on this:

I'll be travelling soon, so may not be able to respond materially in a ~month

Edit: I based this on the easily-findable ASTM draft 0.47 - would be good if someone wanted to fork over the $50USD to get a proper copy so we could see whether there are any differences :). -Ian-

2015-12-13 10:15ian.reesNote Edited: 0006598View Revisions


2015-12-19 02:03

developer   ~0006617

Just wanted to add that I bought a copy of the standard, and started a thread in the forum .
2016-01-21 07:28ian.reesAssigned To => ian.rees
2016-01-21 07:28ian.reesStatusnew => assigned


2016-03-01 02:00

reporter   ~0006864

I have created a bounty on this:

AFAIC to claim the bounty only needs 3 things:
Export to AMF
With color
In a stable branch, 0.17? I understand 0.16 is already in a feature freeze.

Though if anyone else also contributes to the bounty, they may want support for import and curved triangles, etc.. That too is fine with me.

Thanks to ian.rees and anyone else that works on this.


2017-02-01 22:50

developer   ~0008147

Sorry this has been stale for so long - I've been too busy with other stuff.

But, am intending to get back to work on it this weekend, and have some ideas for a minor restructure to work better with the new PartDesign changes that have been pulled in over the last ~year.


2017-02-19 08:37

developer   ~0008361

I spent some time this evening looking at exporting vertex normals, to enable the curved triangles. Unfortunately it doesn't look easy to do. The MeshFacetIterator used for generating the vertex information exposes normals only for the facets (triangles) that make the mesh, rather than normals normals for each vertex of the facets.

At this phase (especially with little support for reading AMFs), I think it'll be more practical to just reduce the mesh tolerance if better print resolution is required - AMFs are optionally compressed (which is supported) so that helps somewhat.


2017-02-19 10:19

administrator   ~0008363

> Unfortunately it doesn't look easy to do. The MeshFacetIterator used for generating the vertex information exposes normals only for the facets (triangles) that make the mesh, rather than normals normals for each vertex of the facets.
Creating normals per vertex isn't too complicated. All what you need is creating an array with the size of number of points and then iterate over the facets. For each point index of a facet set the normal of the triangle in the above array. This way you get for each vertex a normal that is the average of the adjacent triangle normals.

So, for objects with a rather smooth surface this would be the way to go. But for objects with hard edges like a cube this would be counterproductive. Does the AMF format also allow to set normal per triangle?


2017-02-20 07:33

developer   ~0008381

To answer the last question first: AMF explicitly says that flat triangles should not specify normals. It might not be clear from the earlier discussion, that these normals are used to interpolate smaller triangles and make a smoother resulting mesh.

Yes, it's possible to calculate some per-vertex normals, but I think it would be tricky to get good results by going backwards from the mesh vertices. As you suggested, we would need to make some "magic number" to decide whether the intent is to create a sharp edge vs a smooth one. AMF does allow for encoding this sort of information, but I think the mesher will need to be built with curved triangles in mind.

I was thinking about this more, and there's another problem with the curved triangles and the current mesher: if we want the resulting object to be accurate within some linear tolerance of the FreeCAD internal model, then there is an implied maximum triangle size for any particular curvature.

One way to imagine the problem is to think of a cube, with one edge filleted. If the meshing tolerance is small, then there is a similarly small angle between the normal of a filleted cube face, and normal of some facets in the fillet. Curved triangles in this case will cause the filleted cube faces to bulge outwards, by an amount that depends on the size of the triangles that make them. (I hope that makes sense!)

All that said, I still don't know of any program that reads in AMF files and does the "curved triangle" interpolation. Most programs will probably just read in the basic geometry in more-or-less the same way as a regular STL or similar format.


2017-02-22 00:40

reporter   ~0008401

If curved triangles are a problem, please note that just color would be great.

Thanks for working on it.



2017-02-22 00:48

developer   ~0008402

No worries Terry, and I'm mostly done with colour (which isn't going to be as fancy as AMF supports, but rather a solid colour per volume). Current issue on that front is figuring out how to attach a material to an object in the first place - just need to make some time to look in to that.


2017-02-26 07:29

developer   ~0008439

I've gone ahead and made a pull request ( ) for the basic AMF export. Will add in the material information once FreeCAD's material support is a bit further along - Eivind has done some good work in that area recently, so hopefully it's not too far off.


2017-03-01 20:42

reporter   ~0008484

Curved triangles would indeed be very nice, only if slicers supported them... But they don't and they do not plan to support, at least slic3r and Cura according to my bug reports.


2017-03-03 21:18

developer   ~0008530

Commits leading up to da0f8102829f343d066ad3940bb603e106ca95a2 add AMF export as described below. Will make a new ticket for adding material information to exported AMFs.
2017-03-03 21:18ian.reesStatusassigned => closed
2017-03-03 21:18ian.reesResolutionopen => fixed
2017-03-07 12:40Kunda1Relationship addedrelated to 0002940
2017-03-07 12:40Kunda1Tag Attached: AMF

Issue History

Date Modified Username Field Change
2012-02-19 17:23 peepsalot New Issue
2012-02-28 00:50 yorik Note Added: 0001676
2012-05-05 18:29 yorik Project @4@ => File formats
2013-11-23 18:45 modeler123 Note Added: 0003900
2013-11-23 18:45 modeler123 Note Edited: 0003900 View Revisions
2013-11-25 10:19 wmayer Note Added: 0003906
2013-11-26 18:16 tanderson69 Note Added: 0003908
2014-06-08 10:53 veritas Note Added: 0004743
2014-06-08 11:05 shoogen Note Added: 0004744
2014-06-08 11:22 veritas Note Added: 0004745
2014-06-11 03:41 veritas Note View State: 0004745: private
2014-06-11 03:41 veritas Note View State: 0004745: public
2015-05-03 12:59 JurgenG Note Added: 0006114
2015-09-09 22:02 savio araujo Issue cloned: 0002249
2015-09-10 19:14 yorik Relationship added has duplicate 0002249
2015-12-13 10:09 ian.rees Note Added: 0006598
2015-12-13 10:15 ian.rees Note Edited: 0006598 View Revisions
2015-12-19 02:03 ian.rees Note Added: 0006617
2016-01-21 07:28 ian.rees Assigned To => ian.rees
2016-01-21 07:28 ian.rees Status new => assigned
2016-03-01 02:00 terrym Note Added: 0006864
2017-02-01 22:50 ian.rees Note Added: 0008147
2017-02-19 08:37 ian.rees Note Added: 0008361
2017-02-19 10:19 wmayer Note Added: 0008363
2017-02-20 07:33 ian.rees Note Added: 0008381
2017-02-22 00:40 terrym Note Added: 0008401
2017-02-22 00:48 ian.rees Note Added: 0008402
2017-02-26 07:29 ian.rees Note Added: 0008439
2017-03-01 20:42 Patola Note Added: 0008484
2017-03-03 21:18 ian.rees Status assigned => closed
2017-03-03 21:18 ian.rees Resolution open => fixed
2017-03-03 21:18 ian.rees Note Added: 0008530
2017-03-07 12:40 Kunda1 Relationship added related to 0002940
2017-03-07 12:40 Kunda1 Tag Attached: AMF