Part Torus/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
Line 28: Line 28:
</div>
</div>


A Part Torus can be turned into a segment of a torus by changing its {{PropertyData|Angle3}} property. By changing its {{PropertyData|Angle1}} and/or {{PropertyData|Angle2}} properties the swept profile can become a segment of a circle.
[[File:SimpleTorus.jpg|400px]]

[[Image:Part_Torus_Example.png|400px]]


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 39: Line 41:
</div>
</div>


== Example ==


[[Image:Part_Torus_Scripting_Example.png|thumb|Part Torus from the scripting example]]
'''Result:''' The torus will be positioned at origin (point 0,0,0) on creation.<br />
The angle parameters (angle1, angle2, angle3), as well as the radius parameters (radius1, radius2) permit to parametrize the torus, see next section.


A Part Torus object created with the [[#Scripting|scripting example]] below is shown here.
== Opțiuni ==


== Notes ==
[[File:TorusExampleOverviewParameters.jpg]]


* A Part Torus 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.
'''Parameter'''


<div class="mw-translate-fuzzy">
A torus can be assimilated to a small disc that makes a circular orbit around an imaginary axe. Thus the parametric torus is defined by the following parameters:
[[File:TorusExampleRadius1.jpg]]
The parameter Radius1 has a value of 20 mm.
</div>


See also: [[Property_editor|Property editor]].
* {{Parameter|Radius1:}} Raza cercului în jurul căruia circulă discul
* {{Parameter|Radius2:}} Raza discului care definește forma torului
* {{Parameter|Angle1:}} un unghi pentru a tăia / defini discul torului
* {{Parameter|Angle2:}} al doilea unghi pentru a tăia / defini discul torului
* {{Parameter|Angle3:}} al treilea unghi pentru a defini circumferința torului.


A Part Torus object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:
precum și setul standard de parametri de plasare. Imaginile de mai jos oferă o imagine de ansamblu vizuală a parametrilor menționați antecedent:


=== Data ===
[[File:TorusExampleRadius1.jpg]]
The parameter Radius1 has a value of 20 mm.


{{TitleProperty|Attachment}}
[[File:TorusExampleRadius2.jpg]]
The parameter Radius2 has a value of 2 mm.


The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].
[[File:TorusExampleAngle1.jpg]]
The parameter Angle1 has a value of -90°. Notice that, the "angle measure" tool cannot display negative angle. Considered the displayed value in picture as "-90°".


{{TitleProperty|Torus}}
[[File:TorusExampleAngle2.jpg]]
The parameter Angle2 has a value of 90°.


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
* {{Parameter|Radius1:}} Raza cercului în jurul căruia circulă discul
[[File:TorusExampleAngle3.jpg]]
* {{Parameter|Radius2:}} Raza discului care definește forma torului
The parameter Angle3 has a value of 90°.
* {{Parameter|Angle1:}} un unghi pentru a tăia / defini discul torului
* {{Parameter|Angle2:}} al doilea unghi pentru a tăia / defini discul torului
* {{Parameter|Angle3:}} al treilea unghi pentru a defini circumferința torului.
</div>
</div>


== Scripting ==
== Scripting ==


See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
A Part Torus can be created using the following function:

A Part Torus can be created with the {{Incode|addObject()}} method of the document:


{{Code|code=
{{Code|code=
Line 86: Line 88:
* Where {{Incode|"myTorus"}} is the name for the object.
* Where {{Incode|"myTorus"}} is the name for the object.
* The function returns the newly created object.
* The function returns the newly created object.

Example:

{{Code|code=
import FreeCAD as App

doc = App.activeDocument()

torus = doc.addObject("Part::Torus", "myTorus")
torus.Radius1 = 20
torus.Radius2 = 10
torus.Angle1 = -90
torus.Angle2 = 45
torus.Angle3 = 270
torus.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(30, 45, 10))

doc.recompute()
}}




Line 97: Line 117:
}}
}}


{{Part Tools navi{{#translation:}}}}
{{Part_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 09:58, 3 March 2022

Part Torus

poziția meniului
Part → Torus
Ateliere
Part, Complete
scurtătură
nici unul
Prezentat în versiune
-
A se vedea, de asemenea,
Part CreatePrimitives

Description

Descriere

Creează un tor simplu parametric, cu parametrii de poziție, unghi1, unghi2, unghi 3, raza1 și raza2.

A Part Torus can be turned into a segment of a torus by changing its DateAngle3 property. By changing its DateAngle1 and/or DateAngle2 properties the swept profile can become a segment of a circle.

Cum se folosește

În bara de lucru Part faceți clic pe pictograma torus . Torusul va fi poziționat la origine (punctul 0,0,0) la crearea. Parametrii unghiului (unghiul1, unghiul2, unghiul3), precum și parametrii razei (raza1, raza2) permit parametrizarea torusului, a se vedea paragraful următor.

Example

Part Torus from the scripting example

A Part Torus object created with the scripting example below is shown here.

Notes

  • A Part Torus can also be created with the Part Primitives command. With that command you can specify the dimensions and placement at creation time.

The parameter Radius1 has a value of 20 mm.

See also: Property editor.

A Part Torus object is derived from a Part Feature object and inherits all its properties. It also has the following additional properties:

Data

Attachment

The object has the same attachment properties as a Part Part2DObject.

Torus

  • Radius1: Raza cercului în jurul căruia circulă discul
  • Radius2: Raza discului care definește forma torului
  • Angle1: un unghi pentru a tăia / defini discul torului
  • Angle2: al doilea unghi pentru a tăia / defini discul torului
  • Angle3: al treilea unghi pentru a defini circumferința torului.

Scripting

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

A Part Torus can be created with the addObject() method of the document:

torus = FreeCAD.ActiveDocument.addObject("Part::Torus", "myTorus")
  • Where "myTorus" is the name for the object.
  • The function returns the newly created object.

Example:

import FreeCAD as App

doc = App.activeDocument()

torus = doc.addObject("Part::Torus", "myTorus")
torus.Radius1 = 20
torus.Radius2 = 10
torus.Angle1 = -90
torus.Angle2 = 45
torus.Angle3 = 270
torus.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(30, 45, 10))

doc.recompute()