Arch 3Views/it: Difference between revisions

From FreeCAD Documentation
(Created page with "== Tutorial ==")
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
{{Template:UnfinishedDocu}}
{{Template:UnfinishedDocu}}
<div class="mw-translate-fuzzy">
{{GuiCommand/it|Name=Arch 3Views|Name/it=3 Viste da mesh|Workbenches=[[Arch Module/it|Arch]]|MenuLocation=Arch → Utilità → 3 Viste da mesh|Shortcut=|SeeAlso=}}
{{GuiCommand/it|Name=Arch 3Views|Name/it=3 Viste da mesh|Workbenches=[[Arch Module/it|Arch]]|MenuLocation=Arch → Utilità → 3 Viste da mesh|Shortcut=|SeeAlso=}}
</div>


==Descrizione==
==Descrizione==
Line 7: Line 9:
Crea le classiche tre viste in proiezioni ortogonali di un oggetto mesh selezionato.
Crea le classiche tre viste in proiezioni ortogonali di un oggetto mesh selezionato.


<div class="mw-translate-fuzzy">
'''Questo comando non è attualmente in uso'''. Esso servirà a generare delle viste piatte, di un oggetto [[Mesh Module/it|Mesh]], da usare con lo strumento [[Arch Equipment/it|Arredo]].
'''Questo comando non è attualmente in uso'''. Esso servirà a generare delle viste piatte, di un oggetto [[Mesh Module/it|Mesh]], da usare con lo strumento [[Arch Equipment/it|Arredo]].
</div>


== Utilizzo ==
== Utilizzo ==
Line 16: Line 20:
Notare che le viste prodotte sono degli oggetti indipendenti, non hanno legami tra di loro e neppure con l'oggetto mesh da cui derivano.
Notare che le viste prodotte sono degli oggetti indipendenti, non hanno legami tra di loro e neppure con l'oggetto mesh da cui derivano.


<div class="mw-translate-fuzzy">
# Selezionare un oggetto Mesh
# Selezionare un oggetto Mesh
# Selezionare il menu Arch → Utilità → {{KEY|[[Image:Arch 3Views.png|16px]] [[Arch 3Views/it|3 viste]]}}
# Selezionare il menu Arch → Utilità → {{KEY|[[Image:Arch 3Views.png|16px]] [[Arch 3Views/it|3 viste]]}}
</div>


== Opzioni ==
== Scripting ==
{{Emphasis|See also:}} [[Arch API]] and [[FreeCAD Scripting Basics]].


This tool can be used in [[macros]] and from the [[Python]] console by using the following function:
== Proprietà ==
{{Code|code=
shape = createMeshView(obj, direction=FreeCAD.Vector(0, 0, -1), outeronly=False, largestonly=False)
}}


* Creates a flat {{incode|shape}} that is the projection of the given mesh object ({{incode|obj}}) in the given {{incode|direction}}.
== Script ==
* If {{incode|outeronly}} is {{incode|True}} only the outer contour is taken into consideration, discarding the inner holes.
* If {{incode|largestonly}} is {{incode|True}} only the largest segment of the given mesh will be used.


Use {{incode|Part.show()}} to display the resulting flat shape.
==Limitazioni==


Example:
== Tutorial ==
{{Code|code=
import FreeCAD, Draft, Arch, Mesh, MeshPart

Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0), FreeCAD.Vector(2000, 2000, 0)])
Wall = Arch.makeWall(Line, width=150, height=3000)
FreeCAD.ActiveDocument.recompute()

Shape = Wall.Shape.copy(False)
Shape.Placement = Wall.getGlobalPlacement()

mesh_obj = FreeCAD.ActiveDocument.addObject("Mesh::Feature", "Mesh")
mesh_obj.Mesh = MeshPart.meshFromShape(Shape=Shape, MaxLength=520)
mesh_obj.ViewObject.DisplayMode = "Flat Lines"
FreeCAD.ActiveDocument.recompute()

XAxis = FreeCAD.Vector(1, 0, 0)
YAxis = FreeCAD.Vector(0, 1, 0)
ZAxis = FreeCAD.Vector(0, 0, -1)

s1 = Arch.createMeshView(mesh_obj, ZAxis)
s2 = Arch.createMeshView(mesh_obj, XAxis)
s3 = Arch.createMeshView(mesh_obj, YAxis)

Part.show(s1)
Part.show(s2)
Part.show(s3)

Wall.ViewObject.Visibility = False
mesh_obj.ViewObject.Visibility = False
}}


[[Category:Arch/it]]
[[Category:Arch/it]]

{{Arch Tools navi}}
{{Userdocnavi}}

Revision as of 23:08, 22 December 2018

This documentation is not finished. Please help and contribute documentation.

GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.

See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.

3 Viste da mesh

Posizione nel menu
Arch → Utilità → 3 Viste da mesh
Ambiente
Arch
Avvio veloce
Nessuno
Introdotto nella versione
-
Vedere anche
Nessuno

Descrizione

Crea le classiche tre viste in proiezioni ortogonali di un oggetto mesh selezionato.

Questo comando non è attualmente in uso. Esso servirà a generare delle viste piatte, di un oggetto Mesh, da usare con lo strumento Arredo.

Utilizzo

  • Selezionare un oggetto mesh
  • Attivare il comando

Notare che le viste prodotte sono degli oggetti indipendenti, non hanno legami tra di loro e neppure con l'oggetto mesh da cui derivano.

  1. Selezionare un oggetto Mesh
  2. Selezionare il menu Arch → Utilità → 3 viste

Scripting

See also: Arch API and FreeCAD Scripting Basics.

This tool can be used in macros and from the Python console by using the following function:

shape = createMeshView(obj, direction=FreeCAD.Vector(0, 0, -1), outeronly=False, largestonly=False)
  • Creates a flat shape that is the projection of the given mesh object (obj) in the given direction.
  • If outeronly is True only the outer contour is taken into consideration, discarding the inner holes.
  • If largestonly is True only the largest segment of the given mesh will be used.

Use Part.show() to display the resulting flat shape.

Example:

import FreeCAD, Draft, Arch, Mesh, MeshPart

Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0), FreeCAD.Vector(2000, 2000, 0)])
Wall = Arch.makeWall(Line, width=150, height=3000)
FreeCAD.ActiveDocument.recompute()

Shape = Wall.Shape.copy(False)
Shape.Placement = Wall.getGlobalPlacement()

mesh_obj = FreeCAD.ActiveDocument.addObject("Mesh::Feature", "Mesh")
mesh_obj.Mesh = MeshPart.meshFromShape(Shape=Shape, MaxLength=520)
mesh_obj.ViewObject.DisplayMode = "Flat Lines"
FreeCAD.ActiveDocument.recompute()

XAxis = FreeCAD.Vector(1, 0, 0)
YAxis = FreeCAD.Vector(0, 1, 0)
ZAxis = FreeCAD.Vector(0, 0, -1)

s1 = Arch.createMeshView(mesh_obj, ZAxis)
s2 = Arch.createMeshView(mesh_obj, XAxis)
s3 = Arch.createMeshView(mesh_obj, YAxis)

Part.show(s1)
Part.show(s2)
Part.show(s3)

Wall.ViewObject.Visibility = False
mesh_obj.ViewObject.Visibility = False