Mesh Import: Difference between revisions

From FreeCAD Documentation
m (Use correct naming convention found in the source code)
(Button text.)
 
(26 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:9-->
<!--T:9-->
{{Docnav
{{Docnav
|
|
|[[Mesh Export|Export Mesh]]
|[[Mesh_Export|Export]]
|[[Mesh_Workbench|Mesh]]
|[[Mesh_Workbench|Mesh]]
|IconL=
|IconC=Workbench_Mesh.svg
|IconR=Mesh_Export.svg
|IconR=Mesh_Export.svg
|IconC=Workbench_Mesh.svg
}}
}}


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


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


<!--T:4-->
<!--T:4-->
The '''Mesh Import''' command imports geometry from a mesh file format into the active document. Several file formats are supported. The command creates a non-parametric mesh object, a [[Mesh_Feature|Mesh Feature]].
This tool allows you to add a 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] to the current document.


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


<!--T:6-->
<!--T:6-->
# Invoke the ImportMesh command several ways:
# There are several ways to invoke the command:
#* Press on the [[Image:Mesh_Import.svg|32px]] button in the Mesh toolbar
#* Press the {{Button|[[Image:Mesh_Import.svg|16px]] [[Mesh_Import|Import mesh...]]}} button.
#* Use the {{MenuCommand|Meshes [[Image:Mesh Import.png|24px]] Import Mesh...}} entry from the Meshes menu.
#* Select the {{MenuCommand|Meshes → [[Image:Mesh_Import.svg|16px]] Import mesh...}} option from the menu.
#* Select the {{MenuCommand|[[Image:Mesh_Import.svg|16px]] Import mesh...}} option from the [[Tree_view|Tree view]] context menu or [[3D_view|3D view]] context menu. This option is only available if an existing mesh object has been selected. Note that the selected object is actually not used or modified by the command.
# Select the file to be imported
# Optionally select the correct file format in the dialog box.
# Select a file.
# Press the {{Button|Open}} button.


==Links== <!--T:7-->
==Supported file formats== <!--T:22-->

<!--T:23-->
The command supports: stl, ast, bms, obj, off, iv, ply, nas and bdf files. For the NASTRAN (nas/bdf) file format, only GRID, CTRIA3 and CQUAD4 cards are supported.

==Preferences== <!--T:15-->

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

==Properties== <!--T:17-->

<!--T:18-->
See: [[Mesh_Feature|Mesh Feature]].

==Scripting== <!--T:19-->

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

<!--T:21-->
To import a mesh file use the {{incode|insert}} method of the Mesh module.

</translate>
{{Code|code=
import Mesh
Mesh.insert('D:/testfiles/cylinder.stl')
}}
<translate>




Line 37: Line 70:
{{Docnav
{{Docnav
|
|
|[[Mesh Export|Export Mesh]]
|[[Mesh_Export|Export]]
|[[Mesh_Workbench|Mesh]]
|[[Mesh_Workbench|Mesh]]
|IconL=
|IconC=Workbench_Mesh.svg
|IconR=Mesh_Export.svg
|IconR=Mesh_Export.svg
|IconC=Workbench_Mesh.svg
}}
}}

<!--T:11-->
{{Mesh Tools navi}}

<!--T:12-->
{{Userdocnavi}}


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

Latest revision as of 16:25, 25 November 2023

Mesh Import

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

Description

The Mesh Import command imports geometry from a mesh file format into the active document. Several file formats are supported. The command creates a non-parametric mesh object, a Mesh Feature.

Usage

  1. There are several ways to invoke the command:
    • Press the Import mesh... button.
    • Select the Meshes → Import mesh... option from the menu.
    • Select the Import mesh... option from the Tree view context menu or 3D view context menu. This option is only available if an existing mesh object has been selected. Note that the selected object is actually not used or modified by the command.
  2. Optionally select the correct file format in the dialog box.
  3. Select a file.
  4. Press the Open button.

Supported file formats

The command supports: stl, ast, bms, obj, off, iv, ply, nas and bdf files. For the NASTRAN (nas/bdf) file format, only GRID, CTRIA3 and CQUAD4 cards are supported.

Preferences

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

Properties

See: Mesh Feature.

Scripting

See also: FreeCAD Scripting Basics.

To import a mesh file use the insert method of the Mesh module.

import Mesh
Mesh.insert('D:/testfiles/cylinder.stl')