Part Tube/es: Difference between revisions

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


[[Image:Part_Tube-screenshot.png|Screenshot of a Tube]]
[[Image:Part_Tube_Example.png|400px]]


==Uso==
==Uso==

=== Create ===


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


=== Edit ===
<div class="mw-translate-fuzzy">

Para editar el tubo:
# Double-click the tube in the [[Tree_view|Tree view]]
* con cualquiera de las siguientes maneras:
# The {{MenuCommand|Tube}} task panel opens.
** seleccionándolo en el árbol y pinchando encima con doble clic
# Change one or more dimensions.
** editando los parámetros en la caja de diálogo que aparece
# The tube is dynamically updated in the [[3D_view|3D view]].
* o usando el [[property_editor/es|Editor de propiedades]] modificando sus propiedades para editar sus parámetros
# Press the {{Button|OK}} button.
</div>

== Example ==

[[Image:Part_Tube_Scripting_Example.png|thumb|Part Tube from the scripting example]]

A Part Tube object created with the [[#Scripting|scripting example]] below is shown here.


==Propiedades==
==Propiedades==

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

A Part Tube 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|Tube}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 60: Line 80:
== 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 Tube can be created using the following function:

A Part Tube can be created with the {{Incode|addTube()}} method ({{Version|0.20}}) of the Shapes module:


{{Code|code=
{{Code|code=
tube = FreeCAD.ActiveDocument.addObject("Part::Tube", "myTube")
tube = Shapes.addTube(FreeCAD.ActiveDocument, "myTube")
}}
}}


* Where {{Incode|"myTube"}} is the name for the object.
* Where {{Incode|"myTube"}} 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
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()
}}




Line 81: Line 120:
</div>
</div>


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

Revision as of 10:00, 3 March 2022

Part Tubo

Ubicación en el Menú
Pieza → Primitivas → Crear un tubo
Entornos de trabajo
Part
Atajo de teclado por defecto
Ninguno
Introducido en versión
0.19
Ver también
Ninguno

Descripción

El comando Tubo inserta un tubo en el documento activo. El tubo es geométricamente tratado como un corte de un cilindro más pequeño dentro de otro mayor. Por defecto, el comando insertará un tubo de 10 mm de altura con un radio exterior de 5 mm y un radio interior de 2 mm. Estos parámetros pueden ser modificados tras ser introducido el objeto.

Uso

Create

Se puede crear un tubo:

  • presionando el botón Crea un Tubo en la barra de herramientas; o bien:
  • usando el menú Pieza → Primitivas → Crear un tubo

Edit

  1. Double-click the tube in the Tree view
  2. The Tube task panel opens.
  3. Change one or more dimensions.
  4. The tube is dynamically updated in the 3D view.
  5. Press the OK button.

Example

Part Tube from the scripting example

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

Propiedades

See also: Property editor.

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

Tube

  • Por medio del Editor de propiedades:
    • Height o Altura: Selecciona la altura (por defecto es 10 mm).
    • Inner radius o Radio interior: Selecciona el radio interior (por defecto es 2 mm).
    • Outer radius o Radio exterior: Selecciona el radio exterior (por defecto es 5 mm).
    • Placement o Localización: Especifica la orientación y la posición de la caja en el espacio 3D. Ver Placement. El punto de referencia es la esquina inferior izquierda frontal de la caja.
    • Label o Etiqueta: Es el nombre dado a la operación. Este nombre puede ser cambiado si es conveniente.

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