Part Tube/cs

Part Tube

Menu location
Part → Primitives → Tube
Workbenches
Part
Default shortcut
None
Introduced in version
0.19
See also
Part Primitives

Popis

The Part Tube command creates a parametric tube solid. In the coordinate system defined by its ÚdajePlacement property, the bottom face of the tube lies on the XY-plane with its center at the origin.

Použití

Create

  1. There are several ways to invoke the command:
    • Press the Tube button.
    • Select the Part → Primitives → Tube option from the menu.
  2. The Tube object is created
  3. The Tube task panel opens.
  4. Specify the dimensions.
  5. The tube is dynamically updated in the 3D View.
  6. Press the OK button to close the task panel.
  7. Optionally change the ÚdajePlacement property of the tube in the Property View, or with the Std TransformManip command.

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 to close the task panel.

Example

Part Tube from the scripting example

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

Properties

See also: Property View.

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

  • ÚdajeHeight (Length): The height of the tube. The default is 10mm.
  • ÚdajeInner Radius (Length): The inner radius of the tube. Must be smaller than ÚdajeOuter Radius. Can be 0. The default is 2mm.
  • ÚdajeOuter Radius (Length): The outer radius of the tube. Must be larger than ÚdajeInner Radius. The default is 5mm.

Scripting

A Part Tube can be created with the addTube() method 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()