Part Tube: Difference between revisions
No edit summary |
No edit summary |
||
Line 25: | Line 25: | ||
<!--T:4--> |
<!--T:4--> |
||
The [[Image:Part_Tube.svg|24px]] [[Part_Tube|Part Tube]] command creates a parametric tube solid. |
|||
The Tube command inserts a tube into the active document. The tube is geometrically treated as a cut of a smaller cylinder into a larger one. By default, the command will insert a 10 mm high tube with an outer radius of 5 mm and an inner radius of 2 mm. These parameters can be modified after the object has been added. |
|||
FreeCAD creates a tube, with a inner radius of 2 millimetre, an outer radius of 5 millimetre and a height of 10 millimetre. |
|||
By default, the tube is positioned with the center of the bottom circles at the origin (0,0,0). The bottom of the tube is on the xy-plane. Its extension in z-direction follows the positive axis value. |
|||
<!--T:5--> |
<!--T:5--> |
Revision as of 06:47, 20 February 2022
This documentation is not finished. Please help and contribute documentation.
GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.
See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.
Part Tube |
Menu location |
---|
Part → Primitives → Create tube |
Workbenches |
Part |
Default shortcut |
None |
Introduced in version |
0.19 |
See also |
Part CreatePrimitives |
Description
The Part Tube command creates a parametric tube solid.
FreeCAD creates a tube, with a inner radius of 2 millimetre, an outer radius of 5 millimetre and a height of 10 millimetre.
By default, the tube is positioned with the center of the bottom circles at the origin (0,0,0). The bottom of the tube is on the xy-plane. Its extension in z-direction follows the positive axis value.
Usage
- There are several ways to invoke the command:
- Press the Tube button.
- Select the Part → Primitives → Tube option from the menu.
Example
A Part Tube object with the values of the bottom scripting example are shown here.
Properties
- Via the Property Editor:
- DataPlacement: Specifies the orientation and position of the Box in the 3D space. See Placement. The reference point is the left front lower corner of the box.
- DataLabel: The Label is the name given to the operation. This name can be changed at your convenience.
Tube
- DataHeight (
Length
): Sets the height (default is 10 mm). - DataInner Radius (
Length
): Set the inner radius (default is 2 mm). - DataOuter Radius (
Length
): Set the outer radius (default is 5 mm).
Scripting
A Part Tube can be created with the following code from the CommandShapes.py
file:
from BasicShapes import Shapes
from BasicShapes import ViewProviderShapes
tube = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "myTube")
Shapes.TubeFeature(tube)
ViewProviderShapes.ViewProviderTube(tube.ViewObject)
- Where
myTube
is the name for the object. The name must be unique for the entire document. - The function returns the newly created object.
You have to recompute the current document with
App.activeDocument().recompute(None,True,True)
to see the tube.
The Label
is the user editable name for the object. It can be easily changed by
tube.Label = "new myTubeName"
You can access and modify attributes of the box
object. For example, you may wish to modify the length, width and height parameters.
tube.Height = 20
tube.InnerRadius = 2
tube.OuterRadius = 3
You can change its placement with:
tube.Placement = FreeCAD.Placement(FreeCAD.Vector(1, 2, 3), FreeCAD.Rotation(60, 60, 30))
- Primitives: Box, Cylinder, Sphere, Cone, Torus, Tube, Create primitives, Shape builder
- Creation and modification: Extrude, Revolve, Mirror, Fillet, Chamfer, Make face from wires, Ruled Surface, Loft, Sweep, Section, Cross sections, 3D Offset, 2D Offset, Thickness, Projection on surface, Attachment
- Boolean: Make compound, Explode Compound, Compound Filter, Boolean, Cut, Fuse, Common, Connect, Embed, Cutout, Boolean fragments, Slice apart, Slice, XOR
- Measure: Measure Linear, Measure Angular, Measure Refresh, Clear All, Toggle All, Toggle 3D, Toggle Delta
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub