Part Primitives: Difference between revisions

From FreeCAD Documentation
(Undo revision 1098089 by C4e (talk)Does not make sense here.)
Tag: Undo
(Usage)
Line 32: Line 32:


== Usage == <!--T:22-->
== Usage == <!--T:22-->

=== Create ===


<!--T:23-->
<!--T:23-->
# There are several ways to invoke the command:
To create a primitive, either
#* press the {{Button|[[Image:Part_Primitives.svg|24px]] '''Create primitives'''}} button in the toolbar.
#* Press the {{Button|[[Image:Part_Primitives.svg|16px]] [[Part_Primitives|Part Primitives]]}} button.
#* select the {{MenuCommand|Part → Create primitives...}} from the menu bar.
#* Select the {{MenuCommand|Part → Create Primitives → [[Image:Part_Primitives.svg|16px]] Create Primitives...}} option from the menu.
# The {{MenuCommand|Geometic Primitives}} task panel opens.
# In the appearing dialog select primitive type, set its parameters and location, finally press {{Button|Create}}
# Select a primitive type from the dropdown list.
The dialog keeps open so that you can subsequently create further primitives.
# Specify the properties.
# Press the {{Button|Create}} button.
# The primitive object is created.
# Optionally create additional primitives.
# Press the {{Button|Close}} button to finish the command.


=== Edit ===
<!--T:24-->
To edit a primitives there are 2 ways:


<!--T:25-->
<!--T:25-->
# Double-click the primitive object in the [[Tree_view|Tree view]].
Using the dialog: {{Version|0.19}}
# The {{MenuCommand|Geometic Primitives}} task panel opens.
# Select the primitive in the tree and double-click on it.
# Change one or more properties.
# 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.
# The object is dynamically updated in the [[3D_view|3D view]].
# To finish the editing press {{Button|OK}}.
# Press the {{Button|OK}} button.

<!--T:26-->
Using the [[Property_editor|property editor]]:
# Select the primitive in the tree.
# Edits its properties in the Properties table.


== Geometric Primitives == <!--T:3-->
== Geometric Primitives == <!--T:3-->

Revision as of 20:55, 1 March 2022

Part Primitives

Menu location
Part → Create primitives...
Workbenches
Part
Default shortcut
None
Introduced in version
-
See also
Part Shapebuilder

Description

Part Primitives opens a dialog to create any of the parametric geometric primitives defined in the Part Workbench.

Primitive shapes that can be created with the Part Workbench.

Usage

Create

  1. There are several ways to invoke the command:
    • Press the Part Primitives button.
    • Select the Part → Create Primitives → Create Primitives... option from the menu.
  2. The Geometic Primitives task panel opens.
  3. Select a primitive type from the dropdown list.
  4. Specify the properties.
  5. Press the Create button.
  6. The primitive object is created.
  7. Optionally create additional primitives.
  8. Press the Close button to finish the command.

Edit

  1. Double-click the primitive object in the Tree view.
  2. The Geometic Primitives task panel opens.
  3. Change one or more properties.
  4. The object is dynamically updated in the 3D view.
  5. Press the OK button.

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 edge.
  • Ellipse: Creates an elliptical edge.
  • Point: Creates a point (vertex).
  • Line: Creates a line (edge).
  • Regular Polygon: Creates a regular polygon.

Scripting

See also: Part scripting

Test the creation of the primitives with a script. introduced in version 0.19

This 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 to the program as well.

freecad $INSTALL_DIR/Mod/Part/parttests/part_test_objects.py