GuiCommand: Name: Part Tube MenuLocation: Part , Primitives , Create tube Workbenches: Part_Workbench Version: 0.19 SeeAlso: Part_Primitives
Part Tube
Description
The Part Tube command creates a parametric tube solid. In the coordinate system defined by its Placement property, the bottom face of the tube lies on the XY plane with its center at the origin.
Usage
Create
- There are several ways to invoke the command:
- Press the
Create tube button.
- Select the Part → Primitives →
Create tube option from the menu.
- Press the
- The Tube task panel opens and a preview of the tube is displayed in the 3D view.
- Specify the dimensions.
- The preview is dynamically updated.
- Press the OK button.
- The tube is created.
- Optionally change the Placement of the tube in the Property editor, or with the
Std TransformManip command.
Edit
- Double-click the tube in the Tree view
- The Tube task panel opens.
- Change one or more dimensions.
- The tube is dynamically updated in the 3D view.
- Press the OK button.
Example

A Part Tube object created with the scripting example below is shown here.
Properties
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
{{TitleProperty|Attachment}}
The object has the same attachment properties as a Part Part2DObject.
{{TitleProperty|Tube}}
-
Height|Length: The height of the tube. The default is {{Value|10mm}}.
-
Inner Radius|Length: The inner radius of the tube. Must be smaller than Outer Radius. Can be {{Value|0}}. The default is {{Value|2mm}}.
-
Outer Radius|Length: The outer radius of the tube. Must be larger than Inner Radius. The default is {{Value|5mm}}.
Scripting
See also: Autogenerated API documentation, Part scripting and FreeCAD Scripting Basics.
A Part Tube can be created with the {{Incode|addTube()}} method ((v0.20) ) of the Shapes module:
tube = Shapes.addTube(FreeCAD.ActiveDocument, "myTube")
- Where {{Incode|"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()
{{Part_Tools_navi}}
⏵ documentation index > Part > Part Tube
This page is retrieved from https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/Part_Tube.md