Part Sphere/it: Difference between revisions

From FreeCAD Documentation
(Created page with "Qui viene mostrato un oggetto Part Sfera creato con l'esempio di scripting riportato di seguito.")
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 12: Line 12:
{{GuiCommand/it
{{GuiCommand/it
|Name=Part Sphere
|Name=Part Sphere
|Name/it=Sfera
|Name/it=Part Sfera
|MenuLocation=Part → Primitive → Sfera
|MenuLocation=Parte → Primitive → Sfera
|Workbenches=[[Part_Workbench/it|Part]]
|Workbenches=[[Part_Workbench/it|Part]]
|SeeAlso=[[Part_CreatePrimitives/it|Part Primitive]]
|SeeAlso=[[Part_CreatePrimitives/it|Part Primitive]]
Line 48: Line 48:
[[Image:Part_Sphere_Scripting_Example.png|thumb|Part Sfera dall'esempio di scripting]]
[[Image:Part_Sphere_Scripting_Example.png|thumb|Part Sfera dall'esempio di scripting]]


Qui viene mostrato un oggetto Part Sfera creato con l'[[#Scripting|esempio di scripting]] riportato di seguito.
Qui viene mostrato un oggetto Part Sfera creato con l'[[#Script|esempio di scripting]] riportato di seguito.


<span id="Notes"></span>
<span id="Notes"></span>
== Note ==
== Note ==


* A Part Sphere can also be created with the [[Image:Part_Primitives.svg|16px]] [[Part_Primitives|Part Primitives]] command. With that command you can specify the dimensions and placement at creation time.
* Una Part Sfera può essere creata anche con il comando [[Image:Part_Primitives.svg|16px]] [[Part_Primitives/it|Part Primitive]]. Con questo comando si può specificare le dimensioni e il posizionamento al momento della creazione.


<span id="Properties"></span>
<span id="Properties"></span>
== Proprietà ==
<div class="mw-translate-fuzzy">
== Opzioni ==
</div>


See also: [[Property_editor|Property editor]].
Vedere anche: [[Property_editor/it|Editor delle proprietà]].


A Part Sphere object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:
Un oggetto Part Sfera deriva da un oggetto [[Part_Feature/it|Funzione Part]] e ne eredita tutte le proprietà. Ha inoltre le seguenti proprietà aggiuntive:


<span id="Data"></span>
=== Data ===
=== Dati ===


{{TitleProperty|Attachment}}
{{TitleProperty|Attachment}}


The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].
L'oggetto ha le stesse proprietà di collegamento di un [[Part_Part2DObject/it#Dati|Part Part2DObject]].


{{TitleProperty|Sphere}}
{{TitleProperty|Sphere}}


* {{PropertyData|Radius|Length}}: The radius of the sphere. The default is {{Value|5mm}}.
* {{PropertyData|Radius|Length}}: il raggio della sfera. Il valore predefinito è {{Value|5mm}}.
* {{PropertyData|Angle1|Angle}}: The start angle of the circular arc profile of the sphere. Valid range: {{Value|-90° &lt;&#61; value &lt;&#61; 90°}}. May not be equal to {{PropertyData|Angle2}}. The default is {{Value|-90°}}.
* {{PropertyData|Angle1|Angle}}: l'angolo iniziale del profilo dell'arco circolare della sfera. Intervallo valido: {{Value|-90° &lt;&#61; valore &lt;&#61; 90°}}. Potrebbe non essere uguale a {{PropertyData|Angle2}}. Il valore predefinito è {{Value|-90°}}.
* {{PropertyData|Angle2|Angle}}: The end angle of the circular arc profile of the sphere. Valid range: {{Value|-90° &lt;&#61; value &lt;&#61; 90°}}. May not be equal to {{PropertyData|Angle1}}. The default is {{Value|90°}}. If the total angle of the arc profile is smaller than {{Value|180°}} the sphere will be truncated and have a flat face at the top and/or bottom.
* {{PropertyData|Angle2|Angle}}: l'angolo finale del profilo dell'arco circolare della sfera. Intervallo valido: {{Value|-90° &lt;&#61; valore &lt;&#61; 90°}}. Potrebbe non essere uguale a {{PropertyData|Angle1}}. Il valore predefinito è {{Value|90°}}. Se l'angolo totale del profilo dell'arco è inferiore a {{Value|180°}} la sfera verrà troncata e avrà una faccia piatta nella parte superiore e/o inferiore.
* {{PropertyData|Angle3|Angle}}: The total angle of revolution of the sphere. Valid range: {{Value|0° &lt; value &lt;&#61; 360°}}. The default is {{Value|360°}}. If it is smaller than {{Value|360°}} the resulting solid will be a segment of a sphere.
* {{PropertyData|Angle3|Angle}}: l'angolo di rivoluzione totale della sfera. Intervallo valido: {{Value|0° &lt; valore &lt;&#61; 360°}}. Il valore predefinito è {{Value|360°}}. Se è inferiore a {{Value|360°}} il solido risultante sarà un segmento di una sfera.


== Scripting ==
<span id="Scripting"></span>
== Script ==


See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
Vedere anche: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting/it|Script di Part]] e [[FreeCAD_Scripting_Basics/it|Script di base per FreeCAD]].


A Part Sphere can be created with the {{Incode|addObject()}} method of the document:
È possibile creare una Part Sfera con il metodo {{Incode|addObject()}} del documento:


{{Code|code=
{{Code|code=
Line 87: Line 87:
}}
}}


* Where {{Incode|"mySphere"}} is the name for the object.
* Dove {{Incode|"mySphere"}} è il nome dell'oggetto.
* La funzione restituisce l'oggetto appena creato.
* The function returns the newly created object.


Esempio:
Example:


{{Code|code=
{{Code|code=

Latest revision as of 22:12, 2 January 2024

Part Sfera

Posizione nel menu
Parte → Primitive → Sfera
Ambiente
Part
Avvio veloce
Nessuno
Introdotto nella versione
-
Vedere anche
Part Primitive

Descrizione

Il comando Part Sfera crea una sfera solida parametrica. È il risultato della rotazione di un profilo di arco circolare attorno a un asse. Nel sistema di coordinate definito dalla sua proprietà DatiPlacement, il centro della sfera è posizionato nell'origine e il suo asse di rivoluzione è l'asse Z.

Una Part Sfera può essere troncata nella parte superiore e/o inferiore modificando le sue proprietà DatiAngle1 e/o DatiAngle2. Può essere trasformata in un segmento di sfera modificando la sua proprietà DatiAngle3.

Utilizzo

  1. Esistono diversi modi per richiamare il comando:
    • Premere il pulsante Sfera.
    • Selezionare l'opzione Part → Primitive → Sfera dal menu.
  2. La sfera viene creata.
  3. Facoltativamente, modificare le dimensioni e il DatiPlacement della sfera effettuando una delle seguenti operazioni:
    • Fare doppio clic sull'oggetto nella Vista ad albero:
      1. Si apre il pannello delle attività Primitive geometriche.
      2. Modificare una o più proprietà.
      3. L'oggetto viene aggiornato dinamicamente nella vista 3D.
      4. Premere il pulsante OK.
    • Modificare le proprietà nell'Editor delle proprietà.
    • Modificare il DatiPlacement con il comando Trasformna.

Esempio

Part Sfera dall'esempio di scripting

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

Note

  • Una Part Sfera può essere creata anche con il comando Part Primitive. Con questo comando si può specificare le dimensioni e il posizionamento al momento della creazione.

Proprietà

Vedere anche: Editor delle proprietà.

Un oggetto Part Sfera 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.

Sphere

  • DatiRadius (Length): il raggio della sfera. Il valore predefinito è 5mm.
  • DatiAngle1 (Angle): l'angolo iniziale del profilo dell'arco circolare della sfera. Intervallo valido: -90° <= valore <= 90°. Potrebbe non essere uguale a DatiAngle2. Il valore predefinito è -90°.
  • DatiAngle2 (Angle): l'angolo finale del profilo dell'arco circolare della sfera. Intervallo valido: -90° <= valore <= 90°. Potrebbe non essere uguale a DatiAngle1. Il valore predefinito è 90°. Se l'angolo totale del profilo dell'arco è inferiore a 180° la sfera verrà troncata e avrà una faccia piatta nella parte superiore e/o inferiore.
  • DatiAngle3 (Angle): l'angolo di rivoluzione totale della sfera. Intervallo valido: 0° < valore <= 360°. Il valore predefinito è 360°. Se è inferiore a 360° il solido risultante sarà un segmento di una sfera.

Script

Vedere anche: Autogenerated API documentation, Script di Part e Script di base per FreeCAD.

È possibile creare una Part Sfera con il metodo addObject() del documento:

sphere = FreeCAD.ActiveDocument.addObject("Part::Sphere", "mySphere")
  • Dove "mySphere" è il nome dell'oggetto.
  • La funzione restituisce l'oggetto appena creato.

Esempio:

import FreeCAD as App

doc = App.activeDocument()

sphere = doc.addObject("Part::Sphere", "mySphere")
sphere.Radius = 20
sphere.Angle1 = -30
sphere.Angle2 = 45
sphere.Angle3 = 90
sphere.Placement = App.Placement(App.Vector(3, 9, 11), App.Rotation(75, 60, 30))

doc.recompute()