Mesh Export/en: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:


{{Docnav
{{Docnav
|[[Mesh_Import|Mesh Import]]
|[[Mesh_Import|Import]]
|[[Mesh_FromPartShape|Mesh FromPartShape]]
|[[Mesh_FromPartShape|FromPartShape]]
|[[Mesh_Workbench|Mesh]]
|[[Mesh_Workbench|Mesh]]
|IconL=Mesh_Import.svg
|IconL=Mesh_Import.svg
Line 25: Line 25:
# Select a single mesh object.
# Select a single mesh object.
# There are several ways to invoke the command:
# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Mesh_Export.svg|16px]] [[Mesh_Export|Mesh Export]]}} button.
#* Press the {{Button|[[Image:Mesh_Export.svg|16px]] [[Mesh_Export|Export mesh...]]}} button.
#* Select the {{MenuCommand|Meshes → [[Image:Mesh_Export.svg|16px]] Export mesh...}} option from the menu.
#* Select the {{MenuCommand|Meshes → [[Image:Mesh_Export.svg|16px]] Export mesh...}} option from the menu.
#* Select the {{MenuCommand|[[Image:Mesh_Export.svg|16px]] Export mesh...}} option from the [[Tree_view|Tree view]] context menu or [[3D_view|3D view]] context menu.
#* Select the {{MenuCommand|[[Image:Mesh_Export.svg|16px]] Export mesh...}} option from the [[Tree_view|Tree view]] context menu or [[3D_view|3D view]] context menu.
# Select the correct file format in the dialog box.
# Select the correct file format in the dialog box.
# Enter a filename. If you have selected the {{incode|All files (*.*)}} option in the previous step, and do not specify a file extension here, the {{FileName|.stl}} extension will be used.
# Enter a filename. If you have selected the {{Value|All files (*.*)}} option in the previous step, and do not specify a file extension here, the {{FileName|.stl}} extension will be used.
# Press the {{Button|Save}} button.
# Press the {{Button|Save}} button.

==Options==

* Press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the command.


==Notes==
==Notes==


* There are some export preferences related to [[Import_Export_Preferences#Mesh_Formats|Mesh Formats]] but these do not apply to this command. They are used by the [[Std_Export|Std Export]] command.
* There are some [[Import_Export_Preferences#Mesh_Formats|export preferences related to Mesh Formats]] but these do not apply to this command. They are used by the [[Std_Export|Std Export]] command.


==Preferences==
==Preferences==
Line 46: Line 42:
==Scripting==
==Scripting==


{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
See also: [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


To export objects (including mesh objects) to a mesh file format use the {{incode|export}} method of the Mesh module.
To export objects (including mesh objects) to a mesh file format use the {{incode|export}} method of the Mesh module.
Line 58: Line 54:
Mesh.export([doc.Cone, doc.Cylinder], 'D:/testfiles/mymodel.stl')
Mesh.export([doc.Cone, doc.Cylinder], 'D:/testfiles/mymodel.stl')
}}
}}



{{Docnav
{{Docnav
|[[Mesh_Import|Mesh Import]]
|[[Mesh_Import|Import]]
|[[Mesh_FromPartShape|Mesh FromPartShape]]
|[[Mesh_FromPartShape|FromPartShape]]
|[[Mesh_Workbench|Mesh]]
|[[Mesh_Workbench|Mesh]]
|IconL=Mesh_Import.svg
|IconL=Mesh_Import.svg

Latest revision as of 13:14, 26 November 2023

Mesh Export

Menu location
Meshes → Export mesh...
Workbenches
Mesh
Default shortcut
None
Introduced in version
-
See also
Std Export, Import Export

Description

The Mesh Export command exports a mesh object to a mesh file format. Several file formats are supported.

Usage

  1. Select a single mesh object.
  2. There are several ways to invoke the command:
    • Press the Export mesh... button.
    • Select the Meshes → Export mesh... option from the menu.
    • Select the Export mesh... option from the Tree view context menu or 3D view context menu.
  3. Select the correct file format in the dialog box.
  4. Enter a filename. If you have selected the All files (*.*) option in the previous step, and do not specify a file extension here, the .stl extension will be used.
  5. Press the Save button.

Notes

Preferences

  • The last used file location is stored: Tools → Edit parameters... → BaseApp → Preferences → General → FileOpenSavePath.

Scripting

See also: FreeCAD Scripting Basics.

To export objects (including mesh objects) to a mesh file format use the export method of the Mesh module.

import FreeCAD
import Mesh

doc = FreeCAD.ActiveDocument

Mesh.export([doc.Cone, doc.Cylinder], 'D:/testfiles/mymodel.stl')