Part Ellipsoid: Difference between revisions

From FreeCAD Documentation
(Removed the UnfinishedDocu template.)
(Marked this version for translation)
 
Line 25: Line 25:
A [[Image:Part_Ellipsoid.svg|24px]] '''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 [[Image:Part_Ellipsoid.svg|24px]] '''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.


<!--T:25-->
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.
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.


Line 33: Line 34:
== Usage == <!--T:19-->
== Usage == <!--T:19-->


<!--T:26-->
See [[Part_Primitives#Usage|Part Primitives]].
See [[Part_Primitives#Usage|Part Primitives]].


== Example ==
== Example == <!--T:27-->


<!--T:28-->
[[Image:Part_Ellipsoid_Scripting_Example.png|thumb|Part Ellipsoid from the scripting example]]
[[Image:Part_Ellipsoid_Scripting_Example.png|thumb|Part Ellipsoid from the scripting example]]


<!--T:29-->
A Part Ellipsoid object created with the [[#Scripting|scripting example]] below is shown here.
A Part Ellipsoid object created with the [[#Scripting|scripting example]] below is shown here.


== Properties == <!--T:3-->
== Properties == <!--T:3-->


<!--T:30-->
See also: [[Property_editor|Property editor]].
See also: [[Property_editor|Property editor]].


<!--T:31-->
A Part Ellipsoid object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:
A Part Ellipsoid object is derived from a [[Part_Feature|Part Feature]] object and inherits all its properties. It also has the following additional properties:


=== Data ===
=== Data === <!--T:32-->


<!--T:33-->
{{TitleProperty|Attachment}}
{{TitleProperty|Attachment}}


<!--T:34-->
The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].
The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]].


<!--T:35-->
{{TitleProperty|Ellipsoid}}
{{TitleProperty|Ellipsoid}}


<!--T:36-->
* {{PropertyData|Radius1|Length}}: The radius of the ellipsoid in its Z direction. The default is {{Value|2mm}}.
* {{PropertyData|Radius1|Length}}: The radius of the ellipsoid in its Z direction. The default is {{Value|2mm}}.
* {{PropertyData|Radius2|Length}}: The radius of the ellipsoid in its X direction. The default is {{Value|4mm}}.
* {{PropertyData|Radius2|Length}}: The radius of the ellipsoid in its X direction. The default is {{Value|4mm}}.
Line 62: Line 72:
* {{PropertyData|Angle3|Angle}}: The total angle of the ellipsoid in its XY plane. Valid range: {{Value|0° &lt; value &lt;&#61; 360°}}. The default is {{Value|360°}}. If it is smaller than {{Value|360°}} the resulting solid will be a segment of an ellipsoid.
* {{PropertyData|Angle3|Angle}}: The total angle of the ellipsoid in its XY plane. Valid range: {{Value|0° &lt; value &lt;&#61; 360°}}. The default is {{Value|360°}}. If it is smaller than {{Value|360°}} the resulting solid will be a segment of an ellipsoid.


== Scripting ==
== Scripting == <!--T:37-->


<!--T:38-->
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation], [[Part_scripting|Part scripting]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<!--T:39-->
A Part Ellipsoid can be created with the {{Incode|addObject()}} method of the document:
A Part Ellipsoid can be created with the {{Incode|addObject()}} method of the document:


Line 74: Line 86:
<translate>
<translate>


<!--T:40-->
* Where {{Incode|"myEllipsoid"}} is the name for the object.
* Where {{Incode|"myEllipsoid"}} is the name for the object.
* The function returns the newly created object.
* The function returns the newly created object.


<!--T:41-->
Example:
Example:



Latest revision as of 10:07, 3 March 2022

Part Ellipsoid

Menu location
Part → Create primitives → Ellipsoid
Workbenches
Part, OpenSCAD
Default shortcut
None
Introduced in version
-
See also
Part 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): The radius of the ellipsoid in its Z direction. The default is 2mm.
  • DataRadius2 (Length): The radius of the ellipsoid in its X direction. The default is 4mm.
  • DataRadius3 (Length): The radius of the ellipsoid in its Y direction. The default is 4mm.
  • DataAngle1 (Angle): The start angle of the elliptical sides of the ellipsoid. Valid range: -90° <= value < 90°. Must be smaller than DataAngle2. The default is -90°.
  • DataAngle2 (Angle): The end angle of the elliptical sides of the ellipsoid. Valid range: -90° < value <= 90°. Must be larger than DataAngle1. The default is 90°. If the total angle of the elliptical sides is smaller than 180° the ellipsoid will be truncated and have a flat face at the top and/or bottom.
  • DataAngle3 (Angle): The total angle of the ellipsoid in its XY plane. Valid range: 0° < value <= 360°. The default is 360°. If it is smaller than 360° the resulting solid will be a segment of an ellipsoid.

Scripting

See also: Autogenerated API documentation, Part scripting and FreeCAD Scripting Basics.

A Part Ellipsoid can be created with the addObject() method of the document:

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

Example:

import FreeCAD as App

doc = App.activeDocument()

ellipsoid = doc.addObject("Part::Ellipsoid", "myEllipsoid")
ellipsoid.Radius1 = 2
ellipsoid.Radius2 = 4
ellipsoid.Radius3 = 6
ellipsoid.Angle1 = -90
ellipsoid.Angle2 = 50
ellipsoid.Angle3 = 300
ellipsoid.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(15, 0, 20))

doc.recompute()