Part RegularPolygon/es: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
 
(26 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand/es|Name=Polígono art RegularPolygon|Name/es=Part RegularPolygon|MenuLocation=Part → [[Part_CreatePrimitives/es|Create Primitives]] → Regular Polygon|Workbenches=[[Part Module/es|Part]], [[OpenSCAD_Module/es|OpenSCAD]]|SeeAlso=..}}


{{Docnav
|[[Part_Line|Line]]
|[[Part_Builder|Builder]]
|[[Part_Workbench|Part]]
|IconL=Part_Line.svg
|IconR=Part_Builder.svg
|IconC=Workbench_Part.svg
}}

<div class="mw-translate-fuzzy">
{{GuiCommand|Name=Part RegularPolygon|MenuLocation=Part → [[Part_CreatePrimitives|Create Primitives]] → Regular Polygon|Workbenches=[[Part_Workbench|Part]], [[OpenSCAD_Workbench|OpenSCAD]]|SeeAlso=}}
</div>

==Description==

<div class="mw-translate-fuzzy">
== Descripción ==
== Descripción ==
La primitiva Polígono Regular es accesible desde el menú Crear Primitivas en el banco de trabajo de Partes.
La primitiva Polígono Regular es accesible desde el menú Crear Primitivas en el banco de trabajo de Piezas.
</div>


[[Image:Part_RegularPolygon_Example.png|400px]]
Al menú Crear Primitivas se accede vía el icono [[Image:Part_CreatePrimitives.png|32px]][[Part_CreatePrimitives|Crear Primitivas]] localizada en la barra del menú de herramientas Partes, del banco de trabajo de Partes.


<span id="Usage"></span>
<div class="mw-translate-fuzzy">
Al menú Crear Primitivas se accede vía el icono [[Image:Part_CreatePrimitives.png|32px]][[Part_CreatePrimitives|Crear Primitivas]] localizada en la barra del menú de herramientas Partes, del banco de trabajo de Piezas.
</div>


See [[Part_Primitives#Usage|Part Primitives]].
== Parámetros ==
*Poligons - define el número de lados del polígono que describe la sección de la Parte Prisma
*cirumradius - el circumradius es la distancia desde el centro del polígono a un vértice.


== Example ==
{{Version|0.14}}


[[Image:Part_RegularPolygon_Scripting_Example.png|thumb|Part RegularPolygon from the scripting example]]
{{clear}}

<languages/>
A Part RegularPolygon object created with the [[#Scripting|scripting example]] below is shown here.

== Properties ==

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()
}}


{{Docnav
|[[Part_Line|Line]]
|[[Part_Builder|Builder]]
|[[Part_Workbench|Part]]
|IconL=Part_Line.svg
|IconR=Part_Builder.svg
|IconC=Workbench_Part.svg
}}

{{Part_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 12:17, 26 June 2023

Part RegularPolygon

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

Description

Descripción

La primitiva Polígono Regular es accesible desde el menú Crear Primitivas en el banco de trabajo de Piezas.

Al menú Crear Primitivas se accede vía el icono Crear Primitivas localizada en la barra del menú de herramientas Partes, del banco de trabajo de Piezas.

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

  • DatosPolygon (IntegerConstraint): The number of sides of the polygon. The default is 6.
  • DatosCircumradius (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()