Part Sphere: Difference between revisions
(Removed the Notes paragraph.) |
(Properties) |
||
Line 44: | Line 44: | ||
A Part Sphere object with the values of the bottom scripting example are shown here. |
A Part Sphere object with the values of the bottom scripting example are shown here. |
||
== Properties== <!--T:4--> |
== Properties == <!--T:4--> |
||
See also: [[Property_editor|Property editor]]. |
See also: [[Property_editor|Property editor]]. |
||
Line 51: | Line 51: | ||
=== Data === <!--T:36--> |
=== Data === <!--T:36--> |
||
{{TitleProperty|Attachment}} |
|||
The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]]. |
|||
<!--T:37--> |
<!--T:37--> |
||
Line 56: | Line 60: | ||
<!--T:33--> |
<!--T:33--> |
||
* {{PropertyData|Radius|Length}}: |
* {{PropertyData|Radius|Length}}: The radius of the sphere. The default is {{Value|5mm}}. |
||
* {{PropertyData|Angle1|Angle}}: |
* {{PropertyData|Angle1|Angle}}: The start angle of the circular arc profile of the sphere. Valid range: {{Value|-90° <= value <= 90°}}. May not be equal to {{PropertyData|Angle2}}. The default is {{Value|-90°}}. |
||
* {{PropertyData|Angle2|Angle}}: The end angle of the circular arc profile of the sphere. Valid range: {{Value|-90° <= value <= 90°}}. May not be equal to {{PropertyData|Angle1}}. The default is {{Value|90°}}. If the total angle of the arc profile is smaller than {{Value|180°}} the sphere will be truncated and have a flat face at the top and/or bottom. |
|||
* {{PropertyData|Angle2|Angle}}: 2nd angle to cut / define the sphere (angle between YZ axis) |
|||
* {{PropertyData|Angle3|Angle}}: |
* {{PropertyData|Angle3|Angle}}: The total angle of revolution. Valid range: {{Value|0° < value <= 360°}}. The default is {{Value|360°}}. If it is smaller than {{Value|360°}} the resulting solid will be a segment of a sphere. |
||
<!--T:23--> |
|||
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°. |
|||
</translate> |
|||
[[File:SphereCutThreeAngles.jpg|400px]] |
|||
<translate> |
|||
== Limitations == |
|||
If the Angle 1 and Angle 2 values are 'critical' (e.g. both have a value of 45°), the sphere cutoffs are overlapping and the result is invisible. |
|||
== Scripting == <!--T:38--> |
== Scripting == <!--T:38--> |
Revision as of 09:52, 1 March 2022
Part Sphere |
Menu location |
---|
Part → Primitives → Sphere |
Workbenches |
Part |
Default shortcut |
None |
Introduced in version |
- |
See also |
Part Primitives |
Description
The Part Sphere command creates a parametric sphere solid. It is the result of revolving a circular arc profile around an axis. In the coordinate system defined by its DataPlacement property, the center of the sphere is positioned at the origin, and its axis of revolution is the Z axis.
A Part Sphere can be truncated at the top and/or bottom by changing its DataAngle1 and/or DataAngle2 properties. It can be turned into a segment of a sphere by changing its DataAngle3 property.
Usage
- There are several ways to invoke the command:
- Press the Sphere button.
- Select the Part → Primitives → Sphere option from the menu.
Example
A Part Sphere object with the values of the bottom scripting example are shown here.
Properties
See also: Property editor.
A Part Sphere 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.
Sphere
- DataRadius (
Length
): The radius of the sphere. The default is5mm
. - DataAngle1 (
Angle
): The start angle of the circular arc profile of the sphere. Valid range:-90° <= value <= 90°
. May not be equal to DataAngle2. The default is-90°
. - DataAngle2 (
Angle
): The end angle of the circular arc profile of the sphere. Valid range:-90° <= value <= 90°
. May not be equal to DataAngle1. The default is90°
. If the total angle of the arc profile is smaller than180°
the sphere will be truncated and have a flat face at the top and/or bottom. - DataAngle3 (
Angle
): The total angle of revolution. Valid range:0° < value <= 360°
. The default is360°
. If it is smaller than360°
the resulting solid will be a segment of a sphere.
Scripting
A Part Sphere can be created using the following function:
sphere = FreeCAD.ActiveDocument.addObject("Part::Sphere", "mySphere")
- Where
mySphere
is the user editable name for the object. - The function returns the newly created object.
The label text of the object can be easily changed by
sphere.Label = "new mySphereName"
You can access and modify attributes of the sphere
object.
For example, you may wish to modify the radius or the three angles of the sphere.
sphere.Radius = 20
sphere.Angle1 = -30
sphere.Angle2 = 45
sphere.Angle3 = 90
The result will be a part of a sphere, that looks like a piece of cake.
You can change its placement and orientation with:
sphere.Placement = FreeCAD.Placement(FreeCAD.Vector(1, 2, 3), FreeCAD.Rotation(75, 60, 30))
- 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, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub