Part Primitives

From FreeCAD Documentation
Jump to navigation Jump to search

Part Primitives.svg Part Primitives

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

Description

The Part Primitives.svg Part Primitives command opens a dialog to create one or more parametric primitives. 16 primitive types are available.

Part Primitives example.png

The primitives that can be created with the command

Usage

Create

  1. There are several ways to invoke the command:
    • Press the Part Primitives.svg Part Primitives button.
    • Select the Part → Part Primitives.svg Create Primitives... option from the menu.
  2. The Geometric 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. Note that the task panel stays open.
  8. Optionally create additional primitives.
  9. Press the Close button to close the task panel and finish the command.

Edit

  1. Double-click the primitive object in the Tree view.
  2. The Geometric 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.

The properties of a Part Primitive can also be changed in the Property editor, and its DataPlacement can also be changed with the Std TransformManip.svg Std TransformManip command.

Geometric Primitives

The following primitives can be created:

  • Part Plane.svg Plane: Creates a plane.
  • Tree Part Box Parametric.svg Box: Creates a box. This object can also be created with the Part Box.svg Box tool.
  • Tree Part Cylinder Parametric.svg Cylinder: Creates a cylinder. This object can also be created with the Part Cylinder.svg Cylinder tool.
  • Tree Part Cone Parametric.svg Cone: Creates a cone. This object can also be created with the Part Cone.svg Cone tool.
  • Tree Part Sphere Parametric.svg Sphere: Creates a sphere. This object can also be created with the Part Sphere.svg Sphere tool.
  • Part Ellipsoid.svg Ellipsoid: Creates a ellipsoid.
  • Tree Part Torus Parametric.svg Torus: Creates a torus. This object can also be created with the Part Torus.svg Torus tool.
  • Part Prism.svg Prism: Creates a prism.
  • Part Wedge.svg Wedge: Creates a wedge.
  • Part Helix.svg Helix: Creates a helix.
  • Part Spiral.svg Spiral: Creates a spiral.
  • Part Circle.svg Circle: Creates a circular arc.
  • Part Ellipse.svg Ellipse: Creates an elliptical arc.
  • Part Point.svg Point: Creates a point.
  • Part Line.svg Line: Creates a line.
  • Part RegularPolygon.svg Regular polygon: Creates a regular polygon.

Notes

  • The Part Primitives command cannot create a Part Tube.svg 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