Arch: 3 Viste da mesh

From FreeCAD Documentation
This page is a translated version of the page Arch 3Views and the translation is 100% complete.

3 Viste da mesh

Posizione nel menu
Arch → Utilità → 3 Viste da mesh
Ambiente
Arch
Avvio veloce
Nessuno
Introdotto nella versione
-
Vedere anche
Dividi Mesh, Da Mesh a Forma

Descrizione

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

Utilizzo

  1. Selezionare un oggetto Mesh
  2. Selezionare il pulsante , o ArchUtilità 3 viste dal menu principale.

Script

Vedere anche: API di Arch e Nozioni di base sugli script di FreeCAD.

Questo strumento può essere utilizzato nelle macro e dalla console Python tramite la seguente funzione:

shape = createMeshView(obj, direction=FreeCAD.Vector(0, 0, -1), outeronly=False, largestonly=False)
  • Crea una shape piatta che è la proiezione nella data direction dell'oggetto mesh (obj) specificato.
  • Se outeronly è True viene preso in considerazione solo il contorno esterno, scartando i fori interni.
  • Se largestonly è True viene utilizzato solo il segmento più grande della mesh specificata.

Usare Part.show() per visualizzare la forma piatta risultante.

Esempio:

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