Mesh Export: Difference between revisions

From FreeCAD Documentation
m (correct name)
(Button text.)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{UnfinishedDocu{{#translation:}}}}
<translate>
<translate>

<!--T:9-->
<!--T:15-->
{{Docnav
{{Docnav
|[[Mesh Import|Import Mesh]]
|[[Mesh_Import|Import]]
|[[Mesh_FromPartShape|FromPartShape]]
|[[Mesh FromPartShape|Create Mesh from shape]]
|[[Mesh_Workbench|Mesh_Workbench]]
|[[Mesh_Workbench|Mesh]]
|IconL=Mesh_Import.svg
|IconL=Mesh_Import.svg
|IconC=Workbench_Mesh.svg
|IconR=Mesh_FromPartShape.svg
|IconR=Mesh_FromPartShape.svg
|IconC=Workbench_Mesh.svg
}}
}}


<!--T:2-->
<!--T:16-->
{{GuiCommand
{{GuiCommand
|Name=Mesh Export
|Name=Mesh Export
|MenuLocation=Meshes → Export Mesh
|MenuLocation=Meshes → Export mesh...
|Workbenches=[[Mesh Workbench|Mesh]]
|Workbenches=[[Mesh_Workbench|Mesh]]
|SeeAlso=[[Std Export|Std Export]]
|SeeAlso=[[Std_Export|Std Export]], [[Import_Export|Import Export]]
}}
}}


==Description== <!--T:3-->
==Description== <!--T:17-->


<!--T:4-->
<!--T:18-->
The '''Mesh Export''' command exports a mesh object to a mesh file format. Several file formats are supported.
This tool allows you to export a mesh object as file [https://en.wikipedia.org/wiki/STL_(file_format) *.STL], [https://en.wikipedia.org/wiki/STL_(file_format)#ASCII_STL *.AST], *.BMS, [https://en.wikipedia.org/wiki/Wavefront_.obj_file *.OBJ], [http://en.wikipedia.org/wiki/OFF *.OFF], [http://web.mit.edu/ivlib/www/iv/files.html *.iv], [https://en.wikipedia.org/wiki/PLY_(file_format) *.PLY] from the current document.


==Usage== <!--T:5-->
==Usage== <!--T:19-->


<!--T:6-->
<!--T:20-->
# Select mesh object to be exported
# Select a single mesh object.
# There are several ways to invoke the command:
# Invoke Export Mesh command using several ways:
#* Press on the [[Image:Mesh_Export.svg|32px]] button in the Mesh Toolbar
#* Press the {{Button|[[Image:Mesh_Export.svg|16px]] [[Mesh_Export|Export mesh...]]}} button.
#* Use the {{MenuCommand|Meshes [[Image:Mesh_Export.svg|32px]] Export Mesh...}} entry from the Mesh 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 correct file format in the dialog box.
# 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.


==Notes== <!--T:13-->
==Notes== <!--T:23-->


==Scripting== <!--T:14-->
<!--T:24-->
* 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.


==Related== <!--T:7-->
==Preferences== <!--T:25-->


<!--T:26-->
* The last used file location is stored: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → General → FileOpenSavePath}}.


<!--T:10-->
==Scripting== <!--T:27-->

<!--T:28-->
See also: [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

<!--T:29-->
To export objects (including mesh objects) to a mesh file format use the {{incode|export}} method of the Mesh module.

</translate>
{{Code|code=
import FreeCAD
import Mesh

doc = FreeCAD.ActiveDocument

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


<!--T:30-->
{{Docnav
{{Docnav
|[[Mesh Import|Import Mesh]]
|[[Mesh_Import|Import]]
|[[Mesh_FromPartShape|FromPartShape]]
|[[Mesh FromPartShape|Create Mesh from shape]]
|[[Mesh_Workbench|Mesh_Workbench]]
|[[Mesh_Workbench|Mesh]]
|IconL=Mesh_Import.svg
|IconL=Mesh_Import.svg
|IconC=Workbench_Mesh.svg
|IconR=Mesh_FromPartShape.svg
|IconR=Mesh_FromPartShape.svg
|IconC=Workbench_Mesh.svg
}}
}}



</translate>
</translate>
{{Mesh Tools navi{{#translation:}}}}
{{Mesh Tools navi{{#translation:}}}}

{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 16:26, 25 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')