Part Tube: Difference between revisions
No edit summary |
(Undo revision 1222498 by David69 (talk)The Part_Tube command works differently. You can specify the dimensions in the initial task panel.) Tag: Undo |
||
(43 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
<translate> |
<translate> |
||
<!--T:1--> |
|||
{{Docnav |
{{Docnav |
||
|[[Part_Torus|Torus]] |
|[[Part_Torus|Torus]] |
||
|[[Part_Primitives|Primitives]] |
|[[Part_Primitives|Primitives]] |
||
|[[ |
|[[Part_Workbench|Part]] |
||
|IconL=Part_Torus.svg |
|IconL=Part_Torus.svg |
||
|IconR=Part_Primitives.svg |
|IconR=Part_Primitives.svg |
||
Line 10: | Line 12: | ||
}} |
}} |
||
<!--T:2--> |
|||
{{GuiCommand |
{{GuiCommand |
||
|Name=Part Tube |
|Name=Part Tube |
||
|MenuLocation=Part → Primitives → Create tube |
|MenuLocation=Part → Primitives → Create tube |
||
|Workbenches=[[ |
|Workbenches=[[Part_Workbench|Part]] |
||
|SeeAlso=[[Part_CreatePrimitives|Part CreatePrimitives]] |
|||
|Version=0.19 |
|Version=0.19 |
||
|SeeAlso=[[Part_Primitives|Part Primitives]] |
|||
}} |
}} |
||
==Description== |
==Description== <!--T:3--> |
||
<!--T:4--> |
|||
The Tube command inserts a tube into the active document. The tube is 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 diameter of 5 mm and an inner diameter of 2 mm. These parameters can be modified after the object has been added. |
|||
The [[Image:Part_Tube.svg|24px]] '''Part Tube''' command creates a parametric tube solid. In the coordinate system defined by its {{PropertyData|Placement}} property, the bottom face of the tube lies on the XY plane with its center at the origin. |
|||
</translate> |
|||
[[Image:Part_Tube-screenshot.png|Screenshot of a Tube]] |
|||
[[Image:Part_Tube_Example.png|400px]] |
|||
<translate> |
|||
==Usage== |
==Usage== <!--T:6--> |
||
=== Create === <!--T:15--> |
|||
To create a tube either: |
|||
* press the {{Button|[[Image:Part_Tube.svg|24px]] '''Tube'''}} button in the toolbar |
|||
* use the menu {{MenuCommand|Part → Primitives → Create tube}} |
|||
<!--T:7--> |
|||
To edit the tube |
|||
# There are several ways to invoke the command: |
|||
* either |
|||
#* Press the {{Button|[[Image:Part_Tube.svg|16px]] [[Part_Tube|Part Tube]]}} button. |
|||
** select it in the tree and double-click on it |
|||
#* Select the {{MenuCommand|Part → Primitives → [[Image:Part_Tube.svg|16px]] Create tube}} option from the menu. |
|||
** edit the parameters in the appearing dialog |
|||
# The {{MenuCommand|Tube}} task panel opens and a preview of the tube is displayed in the [[3D_view|3D view]]. |
|||
* or use the the [[Property_editor | property editor]] to edit the parameters |
|||
# Specify the dimensions. |
|||
# The preview is dynamically updated. |
|||
# Press the {{Button|OK}} button. |
|||
# The tube is created. |
|||
# Optionally change the {{PropertyData|Placement}} of the tube in the [[Property_editor|Property editor]], or with the [[Image:Std_TransformManip.svg|16px]] [[Std_TransformManip|Std TransformManip]] command. |
|||
=== Edit === <!--T:16--> |
|||
==Properties== |
|||
<!--T:17--> |
|||
* Via the [[Property_editor | Property Editor]]: |
|||
# Double-click the tube in the [[Tree_view|Tree view]] |
|||
** '''Height:''' Sets the height (default is 10 mm). |
|||
# The {{MenuCommand|Tube}} task panel opens. |
|||
** '''Inner Radius:''' Set the inner radius (default is 2 mm). |
|||
# Change one or more dimensions. |
|||
** '''Outer Radius:''' Set the outer radius (default is 5 mm). |
|||
# The tube is dynamically updated in the [[3D_view|3D view]]. |
|||
** '''Placement:''' Specifies the orientation and position of the Box in the 3D space. See [[Placement | Placement]]. The reference point is the left front lower corner of the box. |
|||
# Press the {{Button|OK}} button. |
|||
** '''Label:''' The Label is the name given to the operation. This name can be changed at your convenience. |
|||
== Example == <!--T:18--> |
|||
<!--T:19--> |
|||
[[Image:Part_Tube_Scripting_Example.png|thumb|Part Tube from the scripting example]] |
|||
<!--T:20--> |
|||
A Part Tube object created with the [[#Scripting|scripting example]] below is shown here. |
|||
==Properties== <!--T:9--> |
|||
<!--T:21--> |
|||
See also: [[Property_editor|Property editor]]. |
|||
<!--T:22--> |
|||
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 === <!--T:23--> |
|||
<!--T:24--> |
|||
{{TitleProperty|Attachment}} |
|||
<!--T:25--> |
|||
The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]]. |
|||
<!--T:26--> |
|||
{{TitleProperty|Tube}} |
|||
<!--T:10--> |
|||
* {{PropertyData|Height|Length}}: The height of the tube. The default is {{Value|10mm}}. |
|||
* {{PropertyData|Inner Radius|Length}}: The inner radius of the tube. Must be smaller than {{PropertyData|Outer Radius}}. Can be {{Value|0}}. The default is {{Value|2mm}}. |
|||
* {{PropertyData|Outer Radius|Length}}: The outer radius of the tube. Must be larger than {{PropertyData|Inner Radius}}. The default is {{Value|5mm}}. |
|||
== Scripting == <!--T:12--> |
|||
<!--T:27--> |
|||
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
|||
<!--T:13--> |
|||
A Part Tube can be created with the {{Incode|addTube()}} method ({{Version|0.20}}) of the Shapes module: |
|||
</translate> |
|||
{{Code|code= |
|||
tube = Shapes.addTube(FreeCAD.ActiveDocument, "myTube") |
|||
}} |
|||
<translate> |
|||
<!--T:14--> |
|||
* Where {{Incode|"myTube"}} is the name for the object. |
|||
* The function returns the newly created object. |
|||
<!--T:28--> |
|||
Example: |
|||
</translate> |
|||
{{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() |
|||
}} |
|||
<translate> |
|||
<!--T:11--> |
|||
{{Docnav |
{{Docnav |
||
|[[Part_Torus|Torus]] |
|[[Part_Torus|Torus]] |
||
|[[Part_Primitives|Primitives]] |
|[[Part_Primitives|Primitives]] |
||
|[[ |
|[[Part_Workbench|Part]] |
||
|IconL=Part_Torus.svg |
|IconL=Part_Torus.svg |
||
|IconR=Part_Primitives.svg |
|IconR=Part_Primitives.svg |
||
Line 56: | Line 136: | ||
</translate> |
</translate> |
||
{{ |
{{Part_Tools_navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
Latest revision as of 11:40, 21 January 2023
Part Tube |
Menu location |
---|
Part → Primitives → Create tube |
Workbenches |
Part |
Default shortcut |
None |
Introduced in version |
0.19 |
See also |
Part Primitives |
Description
The Part Tube command creates a parametric tube solid. In the coordinate system defined by its DataPlacement 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 Part Tube button.
- Select the Part → Primitives → Create tube option from the menu.
- 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 DataPlacement 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
Attachment
The object has the same attachment properties as a Part Part2DObject.
Tube
- DataHeight (
Length
): The height of the tube. The default is10mm
. - DataInner Radius (
Length
): The inner radius of the tube. Must be smaller than DataOuter Radius. Can be0
. The default is2mm
. - DataOuter Radius (
Length
): The outer radius of the tube. Must be larger than DataInner Radius. The default is5mm
.
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()
Part
- 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
User documentation
- 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