Mesh SectionByPlane/it: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
Line 20: Line 20:
}}
}}


<span id="Description"></span>
==Descrizione==
==Descrizione==


Il comando '''Sezione da mesh e piano''' crea una sezione trasversale attraverso un oggetto mesh. La sezione trasversale è una [[Part_Feature/it|Part Feature]].
Il comando '''Sezione da mesh e piano''' crea una sezione trasversale attraverso un oggetto mesh. La sezione trasversale è una [[Part_Feature/it|Part Feature]].


<span id="Usage"></span>
==Utilizzo==
==Utilizzo==


Line 31: Line 33:
</div>
</div>


<span id="Properties"></span>
== Proprietà ==
== Proprietà ==


Vedere: [[Part_Feature/it|Funzioni Part]].
Vedere: [[Part_Feature/it|Funzioni Part]].

==Scripting==

See also: [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

To section a mesh use its {{incode|section}} method. The method requires a second mesh object that need not be planar.

{{Code|code=
import FreeCAD as App
import Mesh
import Part

# Create a non-parametric box-shaped mesh:
msh = App.ActiveDocument.addObject("Mesh::Feature", "Mesh")
msh.Mesh = Mesh.createBox(30, 40, 50)
msh.ViewObject.DisplayMode = "Flat Lines"

# Create a planar mesh from 3 points:
p1 = App.Vector(-20, -60, 0)
p2 = App.Vector(65, 25, 0)
p3 = App.Vector(-20, 25, 0)
msh_plane = Mesh.Mesh([p1, p2, p3])

# Find the section loops (each loop is a list of points):
loops = msh.Mesh.section(msh_plane)

# Show the loop polygon:
Part.show(Part.makePolygon(loops[0]))
}}




Line 49: Line 81:
{{Mesh Tools navi{{#translation:}}}}
{{Mesh Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 14:15, 5 January 2023

Other languages:

Sezione da mesh e piano

Posizione nel menu
Mesh → Taglio → Sezione da mesh e piano
Ambiente
Mesh
Avvio veloce
Nessuno
Introdotto nella versione
-
Vedere anche
Sezioni

Descrizione

Il comando Sezione da mesh e piano crea una sezione trasversale attraverso un oggetto mesh. La sezione trasversale è una Part Feature.

Utilizzo

  1. Selezionare un singolo oggetto mesh e un singolo piano di Part. Il piano (esteso) deve intersecare l'oggetto mesh.
  2. Selezionare l'opzione Mesh → Taglio → Sezione da mesh e piano dal menu.

Proprietà

Vedere: Funzioni Part.

Scripting

See also: FreeCAD Scripting Basics.

To section a mesh use its section method. The method requires a second mesh object that need not be planar.

import FreeCAD as App
import Mesh
import Part

# Create a non-parametric box-shaped mesh:
msh = App.ActiveDocument.addObject("Mesh::Feature", "Mesh")
msh.Mesh = Mesh.createBox(30, 40, 50)
msh.ViewObject.DisplayMode = "Flat Lines"

# Create a planar mesh from 3 points:
p1 = App.Vector(-20, -60, 0)
p2 = App.Vector(65, 25, 0)
p3 = App.Vector(-20, 25, 0)
msh_plane = Mesh.Mesh([p1, p2, p3])

# Find the section loops (each loop is a list of points):
loops = msh.Mesh.section(msh_plane)

# Show the loop polygon:
Part.show(Part.makePolygon(loops[0]))