Part Sphere

From FreeCAD Documentation
Revision as of 03:52, 4 January 2022 by Johnwang (talk | contribs) (Added Scripting section)

Part Sphere

Menu location
Part → Primitives → Sphere
Workbenches
Part
Default shortcut
None
Introduced in version
-
See also
Part Primitives

Description

Creates a simple parametric sphere, with position, angle1, angle2, angle3 and radius parameters.

Usage

  1. Switch to the Part Workbench
  2. There are several ways to invoke the command:
    • Press the Sphere button in the toolbar.
    • Select the Part → Primitives → Sphere from the menu bar.

Result: The sphere will be positioned at origin (point 0,0,0) on creation. The angle parameters permit to make a portion of sphere instead of a full sphere (they are set to 360° by default).

The properties of the object can be edited, either in the Property editor or by double-clicking the object in the Tree view.

Properties

Data

Sphere

  • DataRadius: Radius of the sphere
  • DataAngle 1: 1nd angle to cut / define the sphere
  • DataAngle 2: 2nd angle to cut / define the sphere
  • DataAngle 3: 3rd angle to cut / define the sphere

Because it is quite difficult to explain the meaning of the parameters angle 1, angle 2, angle 3, the picture below gives an explanation about these parameters with following values: angle 1 = -45°, angle 2 = 45° and angle 3= 90°.


Scripting

The Sphere command can by used in macros and from the python console using the following function:

FreeCAD.ActiveDocument.addObject("Part::Sphere", "mySphere")
  • Where "mySphere" is the label for the Cylinder object.
  • Returns newly created object of type Cylinder.