|
|
| Menu location |
|---|
| Part → Primitives → Create tube |
| Workbenches |
| Part |
| Default shortcut |
| None |
| Introduced in version |
| 0.19 |
| See also |
| Part Primitives |
The Part Tube command creates a parametric tube solid. In the coordinate system defined by its DadosPlacement property, the bottom face of the tube lies on the XY plane with its center at the origin.
A Part Tube object created with the scripting example below is shown here.
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:
Attachment
The object has the same attachment properties as a Part Part2DObject.
Tube
Length): The height of the tube. The default is 10mm.Length): The inner radius of the tube. Must be smaller than DadosOuter Radius. Can be 0. The default is 2mm.Length): The outer radius of the tube. Must be larger than DadosInner Radius. The default is 5mm.See also: Autogenerated API documentation, Part scripting and FreeCAD Scripting Basics.
A Part Tube can be created with the addTube() method (introduced in 0.20) of the Shapes module:
tube = Shapes.addTube(FreeCAD.ActiveDocument, "myTube")
"myTube" is the name for the 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()