Part Primitives/tr: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{Docnav |
{{Docnav |
||
|[[Part_Tube|Tube]] |
|[[Part_Tube|Tube]] |
||
|[[ |
|[[Part_Plane|Plane]] |
||
|[[ |
|[[Part_Workbench|Part]] |
||
|IconL=Part_Tube.svg |
|IconL=Part_Tube.svg |
||
|IconR= |
|IconR=Part_Plane.svg |
||
|IconC=Workbench_Part.svg |
|IconC=Workbench_Part.svg |
||
}} |
}} |
||
{{GuiCommand |
|||
<div class="mw-translate-fuzzy"> |
|||
⚫ | |||
{{GuiCommand/tr|Name=Part CreatePrimitives|Name/tr=Part CreatePrimitives|MenuLocation=Part -> CreatePrimitives...||Workbenches=[[Part_Module/tr|Part]]|SeeAlso=[[Part_Shapebuilder/tr|Part Shapebuilder]]}} |
|||
|MenuLocation=Part → Create primitives... |
|||
</div> |
|||
|Workbenches=[[Part_Workbench|Part]], [[OpenSCAD_Workbench|OpenSCAD]] |
|||
|SeeAlso=[[Part_Builder|Part Builder]] |
|||
}} |
|||
==Description== |
== Description == |
||
[[Part_Primitives|Part Primitives |
The [[Image:Part_Primitives.svg|24px]] '''Part Primitives''' command opens a dialog to create one or more parametric primitives. 16 primitive types are available. |
||
[[File:Part_Primitives_example.png| |
[[File:Part_Primitives_example.png|600px]] |
||
{{Caption| |
{{Caption|The primitives that can be created with the command}} |
||
==Usage== |
== Usage == |
||
=== Create === |
|||
To create a primitive, either |
|||
⚫ | |||
⚫ | |||
# In the appearing dialog select primitive type, set its parameters and location, finally press {{Button|Create}} |
|||
The dialog keeps open so that you can subsequently create further primitives. |
|||
# There are several ways to invoke the command: |
|||
To edit a primitives there are 2 ways: |
|||
⚫ | |||
⚫ | |||
# The {{MenuCommand|Geometric Primitives}} task panel opens. |
|||
⚫ | |||
# Specify the properties. |
|||
# Press the {{Button|Create}} button. |
|||
# The primitive object is created. |
|||
# Note that the task panel stays open. |
|||
# Optionally create additional primitives. |
|||
# Press the {{Button|Close}} button to close the task panel and finish the command. |
|||
=== Edit === |
|||
Using the dialog: {{Version|0.19}} |
|||
# Select the primitive in the tree and double-click on it. |
|||
# The same dialog will open that was also used to create the primitive. Change there the parameters and you get a live preview of the changed primitive. |
|||
⚫ | |||
# Double-click the primitive object in the [[Tree_view|Tree view]]. |
|||
Using the [[Property_editor|property editor]]: |
|||
# The {{MenuCommand|Geometric Primitives}} task panel opens. |
|||
⚫ | |||
# Change one or more properties. |
|||
# Edits its properties in the Properties table. |
|||
# The object is dynamically updated in the [[3D_view|3D view]]. |
|||
⚫ | |||
The properties of a Part Primitive can also be changed in the [[Property_editor|Property editor]], and its {{PropertyData|Placement}} can also be changed with the [[Image:Std_TransformManip.svg|16px]] [[Std_TransformManip|Std TransformManip]] command. |
|||
⚫ | |||
== Geometric Primitives == |
|||
Some of the available (parametric) geometric primitives that are possible: |
|||
⚫ | |||
:[[Image:Tree_Part_Box_Parametric.svg|32px]] [[Part_Box|Box/Cube]]: inserts a parametric, [http://en.wikipedia.org/wiki/Cuboid#Rectangular_cuboid rectangular cuboid], geometric primitive into the active document. |
|||
⚫ | |||
⚫ | |||
:[[Image:Tree_Part_Sphere_Parametric.svg|32px]] [[Part_Sphere|Sphere]]: Inserts a parametric sphere, with position, angle1, angle2, angle3 and radius parameters. |
|||
⚫ | |||
:[[Image:Tree_Part_Torus_Parametric.svg|32px]] [[Part_Torus|Torus]]: Inserts a simple parametric torus, with position, angle1, angle2, angle3, radius1 and radius2 as parameters in to the active document. |
|||
:[[Image:Part_Prism.svg|32px]] [[Part_Prism|Prism]]: Inserts a solid defined by a regular polygon cross section and a height in to the active document. {{Version|0.14}} |
|||
⚫ | |||
:[[Image:Part_Helix.svg|32px]] [[Part_Helix|Helix]]: Inserts a Helix geometric primitive in to the active document. Common usage for Helix is creating [[Thread_for_Screw_Tutorial|threads]]. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
The following primitives can be created: |
|||
== Inheritance == |
|||
⚫ | |||
*[[Image:Tree_Part_Box_Parametric.svg|32px]] [[Part_Box|Box]]: Creates a box. This object can also be created with the [[Image:Part_Box.svg|32px]] [[Part_Box|Box]] tool. |
|||
⚫ | |||
⚫ | |||
*[[Image:Tree_Part_Sphere_Parametric.svg|32px]] [[Part_Sphere|Sphere]]: Creates a sphere. This object can also be created with the [[Image:Part_Sphere.svg|32px]] [[Part_Sphere|Sphere]] tool. |
|||
⚫ | |||
*[[Image:Tree_Part_Torus_Parametric.svg|32px]] [[Part_Torus|Torus]]: Creates a torus. This object can also be created with the [[Image:Part_Torus.svg|32px]] [[Part_Torus|Torus]] tool. |
|||
*[[Image:Part_Prism.svg|32px]] [[Part_Prism|Prism]]: Creates a prism. |
|||
⚫ | |||
*[[Image:Part_Helix.svg|32px]] [[Part_Helix|Helix]]: Creates a helix. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
== Notes == |
|||
All part primitives are objects which derive from the {{incode|Part::Primitive}} class. This class in turn derives from the basic [[Part_Feature|Part Feature]] object ({{incode|Part::Feature}} class). |
|||
* The Part Primitives command cannot create a [[Image:Part_Tube.svg|16px]] [[Part_Tube|Part Tube]]. |
|||
[[File:FreeCAD_core_objects.svg|800px]] |
|||
{{Caption|Simplified diagram of the relationships between the core objects in the program. The {{incode|Part::Primitive}} class is derived from the {{incode|Part::Feature}} object. It includes an extension that allows it to be attached to faces and planes.}} |
|||
== Scripting == |
== Scripting == |
||
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
|||
There is a Python script to test the creation of the primitives. It can be run from the [[Python_console|Python console]]: |
|||
This can be run from the [[Python_console|Python console]]. |
|||
{{Code|code= |
{{Code|code= |
||
import parttests.part_test_objects as pto |
import parttests.part_test_objects as pto |
||
Line 79: | Line 85: | ||
}} |
}} |
||
This script is located in the installation directory of the program, and can be examined to see how the basic primitives are built |
This script is located in the installation directory of the program, and can be examined to see how the basic primitives are built: |
||
{{Code|code= |
{{Code|code= |
||
$INSTALL_DIR/Mod/Part/parttests/part_test_objects.py |
$INSTALL_DIR/Mod/Part/parttests/part_test_objects.py |
||
}} |
}} |
||
It can be used as input |
It can be used as input for the program as well: |
||
{{Code|code= |
{{Code|code= |
||
freecad $INSTALL_DIR/Mod/Part/parttests/part_test_objects.py |
freecad $INSTALL_DIR/Mod/Part/parttests/part_test_objects.py |
||
Line 92: | Line 100: | ||
{{Docnav |
{{Docnav |
||
|[[Part_Tube|Tube]] |
|[[Part_Tube|Tube]] |
||
|[[ |
|[[Part_Plane|Plane]] |
||
|[[ |
|[[Part_Workbench|Part]] |
||
|IconL=Part_Tube.svg |
|IconL=Part_Tube.svg |
||
|IconR= |
|IconR=Part_Plane.svg |
||
|IconC=Workbench_Part.svg |
|IconC=Workbench_Part.svg |
||
}} |
}} |
||
{{ |
{{Part_Tools_navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
Latest revision as of 11:47, 21 January 2023
Part Primitives |
Menu location |
---|
Part → Create primitives... |
Workbenches |
Part, OpenSCAD |
Default shortcut |
None |
Introduced in version |
- |
See also |
Part Builder |
Description
The Part Primitives command opens a dialog to create one or more parametric primitives. 16 primitive types are available.
The primitives that can be created with the command
Usage
Create
- There are several ways to invoke the command:
- Press the Part Primitives button.
- Select the Part → Create Primitives... option from the menu.
- The Geometric Primitives task panel opens.
- Select a primitive type from the dropdown list.
- Specify the properties.
- Press the Create button.
- The primitive object is created.
- Note that the task panel stays open.
- Optionally create additional primitives.
- Press the Close button to close the task panel and finish the command.
Edit
- Double-click the primitive object in the Tree view.
- The Geometric Primitives task panel opens.
- Change one or more properties.
- The object is dynamically updated in the 3D view.
- Press the OK button.
The properties of a Part Primitive can also be changed in the Property editor, and its VeriPlacement can also be changed with the Std TransformManip command.
Geometric Primitives
The following primitives can be created:
- Plane: Creates a plane.
- Box: Creates a box. This object can also be created with the Box tool.
- Cylinder: Creates a cylinder. This object can also be created with the Cylinder tool.
- Cone: Creates a cone. This object can also be created with the Cone tool.
- Sphere: Creates a sphere. This object can also be created with the Sphere tool.
- Ellipsoid: Creates a ellipsoid.
- Torus: Creates a torus. This object can also be created with the Torus tool.
- Prism: Creates a prism.
- Wedge: Creates a wedge.
- Helix: Creates a helix.
- Spiral: Creates a spiral.
- Circle: Creates a circular arc.
- Ellipse: Creates an elliptical arc.
- Point: Creates a point.
- Line: Creates a line.
- Regular polygon: Creates a regular polygon.
Notes
- The Part Primitives command cannot create a Part Tube.
Scripting
See also: Autogenerated API documentation, Part scripting and FreeCAD Scripting Basics.
There is a Python script to test the creation of the primitives. It can be run from the Python console:
import parttests.part_test_objects as pto
pto.create_test_file("example_file")
This script is located in the installation directory of the program, and can be examined to see how the basic primitives are built:
$INSTALL_DIR/Mod/Part/parttests/part_test_objects.py
It can be used as input for the program as well:
freecad $INSTALL_DIR/Mod/Part/parttests/part_test_objects.py
- 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