View Issue Details

IDProjectCategoryView StatusLast Update
0001591FreeCADFeaturepublic2017-09-30 21:58
ReportermfAssigned Towmayer 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformrev 3681OSkubuntuOS Version14.04
Product Version 
Target Version0.17Fixed in Version0.17 
Summary0001591: STL export in various units
DescriptionAt the moment, stl files can only exported in millimeter. Only iges/step files can be exported in meter/inches/millimeter.

I need stl files scaled to meter. Therefore i design every measure in the part by an scaling factor of 1000.
if its possible to add the scaling option also to stl export?
Tagsexport, IGES, STEP, units

Relationships

has duplicate 0002255 closedyorik File formats STL export in various units 
related to 0002732 new File formats IGES and STEP export compatibility 

Activities

shoogen

2014-06-28 07:17

developer   ~0004769

It would be. But as an STL file does not bear any unit information it might do more harm then good.
I would suggest to create a python script that offers an additional exporter that scales the meshes by a factor of 1000 before export.
The process of scaling meshes is described at http://forum.freecadweb.org/viewtopic.php?f=3&t=4774&p=37464#p37470
To implement this, it is important to know if you mesh existing part objects manually. Or just export the (internal) tessellation.

shoogen

2014-06-28 07:24

developer   ~0004770

If we would add the option. Should it be a global setting that the user can forget. Or should it be asked every time a stl file is saved?

mf

2014-06-30 07:13

reporter   ~0004771

at the moment i use the internal meshing with the the code which the python console outputs.

including the scaling code from the forum would help, I will try this.
as I start to work/program with freecad, I was wondered because the stl export ignores any unit information, the export units for step file (which I assume it is also used for stl) and the global unit system.

what is the main purpose of the exported stl files? What unit assumes some 3d printers or cam systems? if there is a vast majority which uses millimeter, i would only at an global option. and place somewhere a hint. but if there is an great diversity of units, I think, it's better to ask by every export.

ickby

2014-07-01 09:50

developer   ~0004772

I would keep it local and ask everytime. And if there is a pop-up dialog anyway one can think about incorporating another small usability improvement: ask for the mesh deviation if a shape is exported. The current cuppling to the visualisation mesh is not obvious, so this would make things clearer.

wmayer

2016-02-29 09:10

administrator   ~0006863

I agree with shoogen. All mesh formats I know of don't include any unit information and even if they did what would this change? Actually nothing because if an object is measured in mm, meter, inches or whatever doesn't affect the size of this object. You only would get different numbers for different units.

And as STEP & IGES export was mentioned:
create a standard box and export it in various units and check the file. For mm you will get numbers of 10, for meters you will get 0.01 and for inches you will get ~0.3937. And when reloading these files again then they have exactly the same size as the original box.

So, IMO if you need a function to scale a mesh then a function should be implemented in the Mesh workbench and the workflow will be:
1. Load or model your part shape
2. Switch to Mesh workbench and tessellate the shape
3. Apply the scaling function
4. Select and export the mesh object

> ask for the mesh deviation if a shape is exported. The current cuppling to the visualisation mesh is not obvious, so this would make things clearer.
Ian Rees has added a new tab into the preferences where you can set the deviation when exporting a part shape as mesh.

normandc

2016-03-06 21:05

manager   ~0006890

FYI mesh scaling is done seamlessly by the file export utility in all CAD software that I know of. Units are set through an Options button in the Export file dialog. IMO this would be more user-friendly.

tusker888

2016-07-15 22:40

reporter   ~0007192

I don't understand / see any benefit for having the export function scale the output. If I design the part in English or MKS units and then want to run a CFD or FEA tool in those same units, where is the benefit in having to do the conversion. STL was designed to be without units for a reason, to force scaling onto the designer degrades the efficiency of the workflow process. I would like to see it removed or at least a optionable parameter.

wmayer

2017-09-30 21:58

administrator   ~0010225

https://github.com/FreeCAD/FreeCAD/commit/9e91219d0f67f68a8a8b4de6b785f423a096c383 implements a command to scale a selected mesh. This way forces a user to invoke the command manually but then he can inspect it before exporting it.

Issue History

Date Modified Username Field Change
2014-06-25 08:15 mf New Issue
2014-06-28 07:17 shoogen Note Added: 0004769
2014-06-28 07:24 shoogen Note Added: 0004770
2014-06-30 07:13 mf Note Added: 0004771
2014-07-01 09:50 ickby Note Added: 0004772
2015-09-09 22:02 savio araujo Issue cloned: 0002255
2015-09-10 19:13 yorik Relationship added has duplicate 0002255
2016-02-29 09:10 wmayer Note Added: 0006863
2016-03-06 21:05 normandc Note Added: 0006890
2016-07-15 22:40 tusker888 Note Added: 0007192
2017-01-28 12:10 Kunda1 Tag Attached: IGES
2017-01-28 12:10 Kunda1 Tag Attached: STEP
2017-01-28 12:10 Kunda1 Tag Attached: units
2017-05-06 11:15 Kunda1 Relationship added related to 0002732
2017-05-09 12:13 Kunda1 Relationship added related to 0003026
2017-05-09 12:14 Kunda1 Relationship deleted related to 0003026
2017-07-11 11:08 Kunda1 Tag Attached: export
2017-09-25 08:18 wmayer Project File formats => FreeCAD
2017-09-25 08:19 wmayer Assigned To => wmayer
2017-09-25 08:19 wmayer Status new => assigned
2017-09-25 08:19 wmayer Target Version => 0.17
2017-09-30 21:58 wmayer Status assigned => closed
2017-09-30 21:58 wmayer Resolution open => fixed
2017-09-30 21:58 wmayer Fixed in Version => 0.17
2017-09-30 21:58 wmayer Note Added: 0010225