Part Ellipsoid: Difference between revisions

From FreeCAD Documentation
mNo edit summary
(Revising...)
Line 12: Line 12:
|IconC=Workbench_Part.svg
|IconC=Workbench_Part.svg
}}
}}



<!--T:1-->
<!--T:1-->
Line 25: Line 24:


<!--T:18-->
<!--T:18-->
The [[Image:Part_Ellipsoid.svg|24px]] [[Part_Ellipsoid|Part Ellipsoid]] command creates a parametric ellipsoid solid.
A [[Image:Part_Ellipsoid.svg|24px]] [[Part_Ellipsoid|Part Ellipsoid]] is a parametric solid that can be created with the [[Image:Part_Primitives.svg|24px]] [[Part_Primitives|Part Primitives]] command. In the coordinate system defined by its {{PropertyData|Placement}} property, the axes of the ellipsoid are aligned with the X, Y and Z axes, and therefore its center is positioned at the origin.


A Part Ellipsoid can be truncated at the top and/or bottom by changing its {{PropertyData|Angle1}} and/or {{PropertyData|Angle2}} properties. It can be turned into a segment of an ellipsoid by changing its {{PropertyData|Angle3}} property.
FreeCAD creates an ellipsoid, which will have a circle for any cross section parallel to the XY plane. The cross section parallel to the other two planes will be an ellipse.


</translate>
By default, the ellipsoid is positioned with its mass center at the origin (0,0,0).
[[Image:Part_Ellipsoid_Example.png|400px]]

<translate>
[[File:Part Ellipsoid Example.png|Screenshot of a Part Ellipsoid with default values]]


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


See [[Part_Primitives#Usage|Part Primitives]].
<!--T:20-->
# There are several ways to invoke the command:
#* Press the {{Button|[[Image:Part_Primitives.svg|16px]] [[Part Primitives|Create Primitives...]]}} button.
#* Select the {{MenuCommand|Part → Create Primitives → [[Image:Part_Primitives.svg|16px]] Create Primitives...}} option from the menu.
#* Select the {{MenuCommand|[[Image:Part_Ellipsoid.svg|16px]] Ellipsoid}} option from the menu.
# Set options and press {{Button|Create}}.
# To close the dialog press {{Button|Close}}.


== Example ==
== Example ==


[[File:Part Ellipsoid Scripting Example.png|thumb|Part Ellipsoid scripting example.]]
[[Image:Part_Ellipsoid_Scripting_Example.png|thumb|Part Ellipsoid from the scripting example]]


A Part Ellipsoid object with the values of the bottom scripting example are shown here.
A Part Ellipsoid object created with the [[#Scripting|scripting example]] below is shown here.

== Notes ==
<!--T:12-->
The shape produced is limited in FreeCAD to being a solid (optionally truncated) spheroid, the shape you would create by rotating an ellipse around one of its axis. By default it is a [http://en.wikipedia.org/wiki/Oblate_spheroid Oblate Spheroid], the shape you would create by rotating an ellipse around its minor axis. The parameters can be changed to form a [http://en.wikipedia.org/wiki/Prolate_spheroid Prolate Spheroid].

<!--T:14-->
In mathematics, an [http://en.wikipedia.org/wiki/Ellipsoid Ellipsoid] would have an elliptical cross section in all three planes.


== Properties == <!--T:3-->
== Properties == <!--T:3-->
Line 63: Line 49:


=== Data ===
=== Data ===

{{TitleProperty|Attachment}}

The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].


{{TitleProperty|Ellipsoid}}
{{TitleProperty|Ellipsoid}}

Revision as of 08:38, 2 March 2022

This documentation is not finished. Please help and contribute documentation.

GuiCommand model explains how commands should be documented. Browse Category:UnfinishedDocu to see more incomplete pages like this one. See Category:Command Reference for all commands.

See WikiPages to learn about editing the wiki pages, and go to Help FreeCAD to learn about other ways in which you can contribute.

Part Ellipsoid

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

Description

A Part Ellipsoid is a parametric solid that can be created with the Part Primitives command. In the coordinate system defined by its DataPlacement property, the axes of the ellipsoid are aligned with the X, Y and Z axes, and therefore its center is positioned at the origin.

A Part Ellipsoid 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 an ellipsoid by changing its DataAngle3 property.

Usage

See Part Primitives.

Example

Part Ellipsoid from the scripting example

A Part Ellipsoid object created with the scripting example below is shown here.

Properties

See also: Property editor.

A Part Ellipsoid 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.

Ellipsoid

  • DataRadius1 (Length): By default the minor radius parallel to the Z-axis,
  • DataRadius2 (Length): By default the major radius parallel to the XY plane, it is also the maximum radius of the circular cross section
  • DataRadius3 (Length): By default the major radius parallel to the YZ plane, it is also the maximum radius of the angular cross section
  • DataAngle1 (Angle): Lower truncation of the ellipsoid, parallel to the circular cross section (-90 degrees in a full spheroid)
  • DataAngle2 (Angle): Upper truncation of the ellipsoid, parallel to the circular cross section (90 degrees in a full spheroid)
  • DataAngle3 (Angle): Angle of rotation of the elliptical cross section (360 degrees in a full spheroid)

Scripting

A Part Ellipsoid is created with the addObject() method of the document.

ellipsoid = FreeCAD.ActiveDocument.addObject("Part::Ellipsoid", "myEllipsoid")
  • Where myEllipsoid is the name for the object. The name must be unique for the entire document.
  • The function returns the newly created object.

The Label is the user editable name for the object. It can be easily changed by

ellipsoid.Label = "new myEllipsoidName"

You can access and modify attributes of the ellipsoid object. For example, you may wish to modify the three radii and the three angles of the ellipsoid.

ellipsoid.Radius1 = 2
ellipsoid.Radius2 = 4
ellipsoid.Radius3 = 6
ellipsoid.Angle1 = -90
ellipsoid.Angle2 = 50
ellipsoid.Angle3 = 300

The result will be a part of an ellipsoid.

You can change its placement and orientation with:

ellipsoid.Placement = FreeCAD.Placement(FreeCAD.Vector(1, 2, 3), FreeCAD.Rotation(15, 0, 20))