Mesh Import: Difference between revisions

From FreeCAD Documentation
No edit summary
(Button text.)
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Page in progress}}

<translate>
<translate>


Line 8: Line 5:
{{Docnav
{{Docnav
|
|
|[[Mesh_Export|Mesh Export]]
|[[Mesh_Export|Export]]
|[[Mesh_Workbench|Mesh]]
|[[Mesh_Workbench|Mesh]]
|IconL=
|IconL=
Line 26: Line 23:


<!--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]], to hold the mesh data.
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]].


==Usage== <!--T:5-->
==Usage== <!--T:5-->
Line 32: Line 29:
<!--T:6-->
<!--T:6-->
# There are several ways to invoke the command:
# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Mesh_Import.svg|16px]] [[Mesh_Import|Mesh Import]]}} button.
#* Press the {{Button|[[Image:Mesh_Import.svg|16px]] [[Mesh_Import|Import mesh...]]}} button.
#* Select the {{MenuCommand|Meshes → [[Image:Mesh_Import.svg|16px]] Import mesh...}} option from the 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 {{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.
Line 39: Line 36:
# Press the {{Button|Open}} button.
# Press the {{Button|Open}} button.


==Supported file formats== <!--T:22-->
==Options==


<!--T:23-->
* Press {{KEY|Esc}} or the {{Button|Cancel}} button to abort the command.
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-->
==Properties==


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


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


<!--T:18-->
{{Emphasis|See also:}} [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
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.
To import a mesh file use the {{incode|insert}} method of the Mesh module.


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



<!--T:10-->
<!--T:10-->
{{Docnav
{{Docnav
|
|
|[[Mesh_Export|Mesh Export]]
|[[Mesh_Export|Export]]
|[[Mesh_Workbench|Mesh]]
|[[Mesh_Workbench|Mesh]]
|IconL=
|IconL=

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')