Part Tube/it: Difference between revisions

From FreeCAD Documentation
(Created page with "Un oggetto Part Tubo deriva da un oggetto Funzione Part e ne eredita tutte le proprietà. Ha inoltre le seguenti proprietà aggiuntive:")
(Created page with "* {{PropertyData|Height|Length}}: l'altezza del tubo. Il valore predefinito è {{Value|10mm}}. * {{PropertyData|Inner Radius|Length}}: il raggio interno del tubo. Deve essere inferiore a {{PropertyData|Outer Radius}}. Può essere {{Value|0}}. Il valore predefinito è {{Value|2mm}}. * {{PropertyData|Outer Radius|Length}}: il raggio esterno del tubo. Deve essere maggiore di {{PropertyData|Inner Radius}}. Il valore predefinito è {{Value|5mm}}.")
Line 74: Line 74:
{{TitleProperty|Tube}}
{{TitleProperty|Tube}}


* {{PropertyData|Height|Length}}: The height of the tube. The default is {{Value|10mm}}.
* {{PropertyData|Height|Length}}: l'altezza del tubo. Il valore predefinito è {{Value|10mm}}.
* {{PropertyData|Inner Radius|Length}}: The inner radius of the tube. Must be smaller than {{PropertyData|Outer Radius}}. Can be {{Value|0}}. The default is {{Value|2mm}}.
* {{PropertyData|Inner Radius|Length}}: il raggio interno del tubo. Deve essere inferiore a {{PropertyData|Outer Radius}}. Può essere {{Value|0}}. Il valore predefinito è {{Value|2mm}}.
* {{PropertyData|Outer Radius|Length}}: The outer radius of the tube. Must be larger than {{PropertyData|Inner Radius}}. The default is {{Value|5mm}}.
* {{PropertyData|Outer Radius|Length}}: il raggio esterno del tubo. Deve essere maggiore di {{PropertyData|Inner Radius}}. Il valore predefinito è {{Value|5mm}}.


== Scripting ==
== Scripting ==

Revision as of 21:44, 26 December 2023

Part Tubo

Posizione nel menu
Parte → Primitive → Crea tubo
Ambiente
Part
Avvio veloce
Nessuno
Introdotto nella versione
0.19
Vedere anche
Part Primitive

Descrizione

Il comando Part Tubo crea un tubo parametrico solido. Nel sistema di coordinate definito dalla sua proprietà DatiPlacement, la faccia inferiore del tubo si trova sul piano XY con il centro nell'origine.

Utilizzo

Crea

  1. Esistono diversi modi per richiamare il comando:
    • Premere il pulsante Crea tubo.
    • Selezionare l'opzione Parte → Primitive → Crea tubo dal menu.
  2. Si apre il pannello delle attività Tubo e un'anteprima del tubo viene visualizzata nella Vista 3D.
  3. Specificare le dimensioni.
  4. L'anteprima viene aggiornata dinamicamente.
  5. Premere il pulsante OK.
  6. Il tubo viene creato.
  7. Facoltativamente, modificare il DatiPlacement del tubo nel Editor delle proprietà o con il comando Trasforma.

Modifica

  1. Fare doppio clic sul tubo nella Vista ad albero
  2. Si apre il pannello delle azioni Tubo.
  3. Modificare una o più dimensioni.
  4. Il tubo viene aggiornato dinamicamente nella vista 3D.
  5. Premere il pulsante OK.

Esempio

Part Tubo dall'esempio di scripting

Qui viene mostrato un oggetto Part Tubo creato con l'esempio di scripting riportato di seguito.

Proprietà

Vedere anche: Editor delle proprietà.

Un oggetto Part Tubo deriva da un oggetto Funzione Part e ne eredita tutte le proprietà. Ha inoltre le seguenti proprietà aggiuntive:

Dati

Attachment

L'oggetto ha le stesse proprietà di collegamento di un Part Part2DObject.

Tube

  • DatiHeight (Length): l'altezza del tubo. Il valore predefinito è 10mm.
  • DatiInner Radius (Length): il raggio interno del tubo. Deve essere inferiore a DatiOuter Radius. Può essere 0. Il valore predefinito è 2mm.
  • DatiOuter Radius (Length): il raggio esterno del tubo. Deve essere maggiore di DatiInner Radius. Il valore predefinito è 5mm.

Scripting

See also: Autogenerated API documentation, Part scripting and FreeCAD Scripting Basics.

A Part Tube can be created with the addTube() method (introduced in version 0.20) of the Shapes module:

tube = Shapes.addTube(FreeCAD.ActiveDocument, "myTube")
  • Where "myTube" is the name for the object.
  • The function returns the newly created object.

Example:

import FreeCAD as App
from BasicShapes import Shapes

doc = App.activeDocument()

tube = Shapes.addTube(FreeCAD.ActiveDocument, "myTube")
tube.Height = 20
tube.InnerRadius = 2
tube.OuterRadius = 3
tube.Placement = App.Placement(App.Vector(2, 4, 5), App.Rotation(60, 60, 30))

doc.recompute()