Part RegularPolygon/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
{{UnfinishedDocu{{#translation:}}}} <!-- Note: Screenshot + Formatted Parameters + Scripting section. -->


{{Docnav
{{Docnav
Line 20: Line 19:
== Descriere ==
== Descriere ==
Un element primitiv geometric este Poligonul Regulat care este disponibil din dialogul Create Primitives în Atelierul de lucru Part.
Un element primitiv geometric este Poligonul Regulat care este disponibil din dialogul Create Primitives în Atelierul de lucru Part.
</div>
</div>

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


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 26: Line 27:
</div>
</div>


See [[Part_Primitives#Usage|Part Primitives]].
The RegularPolygon is available from the Create Primitives dialogue in the Part workbench.
# Switch to the [[Image:Workbench_Part.svg|24px]] [[Part_Workbench|Part Workbench]]
# The RegularPolygon command can be accessed several ways:
#* The Create Primitives dialogue via the [[Image:Part_Primitives.svg|24px]] [[Part_Primitives|Primitives]] icon located in the Part toolbar
#* Using the {{MenuCommand|Part → [[Part_Primitives|Create primitives]] → Regular Polygon}}


== Parameters ==
== Example ==


[[Image:Part_RegularPolygon_Scripting_Example.png|thumb|Part RegularPolygon from the scripting example]]
<div class="mw-translate-fuzzy">

== Parametrii ==
A Part RegularPolygon object created with the [[#Scripting|scripting example]] below is shown here.
* Polygon - numărul de laturi ale poligonului care descrie secțiunea transversală a părții componente Part Prism

* Cirumradius - circumradius este distanța de la centrul poligonului la un vârf.
== Properties ==
</div>

See also: [[Property_editor|Property editor]].

A Part RegularPolygon object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:

=== Data ===

{{TitleProperty|Attachment}}

The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].

{{TitleProperty|Regular Polygon}}

* {{PropertyData|Polygon|IntegerConstraint}}: The number of sides of the polygon. The default is {{Value|6}}.
* {{PropertyData|Circumradius|Length}}: The radius of the circle that circumscribes the polygon, the distance from the center of the polygon to one of its vertices. The default is {{Value|2mm}}.

== Scripting ==

See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].

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

{{Code|code=
poly = FreeCAD.ActiveDocument.addObject("Part::RegularPolygon", "myPolygon")
}}

* Where {{Incode|"myPolygon"}} is the name for the object.
* The function returns the newly created object.

Example:

{{Code|code=
import FreeCAD as App

doc = App.activeDocument()

poly = doc.addObject("Part::RegularPolygon", "myPolygon")
poly.Polygon = 5
poly.Circumradius = 8
poly.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(60, 30, 15))

doc.recompute()
}}




Line 50: Line 90:
}}
}}


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

Revision as of 10:31, 3 March 2022

Part RegularPolygon

Menu location
Part → Create Primitives → Regular Polygon
Workbenches
Part, OpenSCAD
Default shortcut
None
Introduced in version
0.14
See also
None

Description

Descriere

Un element primitiv geometric este Poligonul Regulat care este disponibil din dialogul Create Primitives în Atelierul de lucru Part.

Dialogul Create Primitives pote fi accesat via iconiței CreatePrimitives localizată în meniul Part sau Part toolbar, în Atelierul Part(Workbench).

See Part Primitives.

Example

Part RegularPolygon from the scripting example

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

Properties

See also: Property editor.

A Part RegularPolygon 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.

Regular Polygon

  • DatePolygon (IntegerConstraint): The number of sides of the polygon. The default is 6.
  • DateCircumradius (Length): The radius of the circle that circumscribes the polygon, the distance from the center of the polygon to one of its vertices. The default is 2mm.

Scripting

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

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

poly = FreeCAD.ActiveDocument.addObject("Part::RegularPolygon", "myPolygon")
  • Where "myPolygon" is the name for the object.
  • The function returns the newly created object.

Example:

import FreeCAD as App

doc = App.activeDocument()

poly = doc.addObject("Part::RegularPolygon", "myPolygon")
poly.Polygon = 5
poly.Circumradius = 8
poly.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(60, 30, 15))

doc.recompute()