Part Ellipsoid: Difference between revisions
m (→Scripting) |
(Marked this version for translation) |
||
(19 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{UnfinishedDocu{{#translation:}}}} |
|||
<translate> |
<translate> |
||
Line 12: | Line 11: | ||
|IconC=Workbench_Part.svg |
|IconC=Workbench_Part.svg |
||
}} |
}} |
||
<!--T:1--> |
<!--T:1--> |
||
Line 19: | Line 17: | ||
|MenuLocation=Part → [[Part_Primitives|Create primitives]] → Ellipsoid |
|MenuLocation=Part → [[Part_Primitives|Create primitives]] → Ellipsoid |
||
|Workbenches=[[Part_Workbench|Part]], [[OpenSCAD_Workbench|OpenSCAD]] |
|Workbenches=[[Part_Workbench|Part]], [[OpenSCAD_Workbench|OpenSCAD]] |
||
|SeeAlso=[[Part_Primitives|Part |
|SeeAlso=[[Part_Primitives|Part Primitives]] |
||
}} |
}} |
||
Line 25: | Line 23: | ||
<!--T:18--> |
<!--T:18--> |
||
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. |
|||
The [[Image:Part_Ellipsoid.svg|24px]] [[Part_Ellipsoid|Part Ellipsoid]] command creates a parametric Ellipsoid solid. |
|||
<!--T: |
<!--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. |
|||
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]. |
|||
</translate> |
|||
<!--T:13--> |
|||
[[Image:Part_Ellipsoid_Example.png|400px]] |
|||
The default spheroid in FreeCAD 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> |
|||
<!--T: |
== Usage == <!--T:19--> |
||
In mathematics, an [http://en.wikipedia.org/wiki/Ellipsoid Ellipsoid] would have an elliptical cross section in all three planes. |
|||
<!--T:26--> |
|||
See [[Part_Primitives#Usage|Part Primitives]]. |
|||
<!--T: |
== Example == <!--T:27--> |
||
A parametric Ellipsoid solid is available from the Create Primitives dialogue in the Part workbench. |
|||
# Switch to the [[Image:Workbench_Part.svg|24px]] [[Part_Workbench|Part Workbench]] |
|||
# Access the Ellipsoid command several ways: |
|||
#* Through the Create Primitives dialogue, pressing the [[Image:Part_Primitives.svg|32px]] [[Part_Primitives|Primitives]] button located in the Part toolbar |
|||
#* Using the {{MenuCommand|Part → [[Part_Primitives|Create primitives]] → Ellipsoid}} entry in the Part menu |
|||
<!--T:28--> |
|||
[[Image:Part_Ellipsoid_Scripting_Example.png|thumb|Part Ellipsoid from the scripting example]] |
|||
<!--T: |
<!--T:29--> |
||
A Part Ellipsoid object created with the [[#Scripting|scripting example]] below is shown here. |
|||
* Radius1, by default the minor radius parallel to the Z-axis, |
|||
* Radius2, by default the major radius parallel to the XY plane, it is also the maximum radius of the circular cross section |
|||
* Radius3, by default the major radius parallel to the YZ plane, it is also the maximum radius of the angular cross section |
|||
* Angle1, lower truncation of the ellipsoid, parallel to the circular cross section (-90 degrees in a full spheroid) |
|||
* Angle2, upper truncation of the ellipsoid, parallel to the circular cross section (90 degrees in a full spheroid) |
|||
* Angle3, angle of rotation of the elliptical cross section (360 degrees in a full spheroid) |
|||
== Properties == <!--T:3--> |
|||
<!--T: |
<!--T:30--> |
||
[[Image:Part_Ellipsoid_screenshot.jpg]] |
|||
==Notes== |
|||
== Properties == |
|||
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--> |
|||
*{{PropertyData|Support|LinkList}}: |
|||
The object has the same attachment properties as a [[Part_Part2DObject#Data|Part Part2DObject]]. |
|||
*{{PropertyData|Map Mode}}: |
|||
{{TitleProperty|Base}} |
|||
<!--T:35--> |
|||
{{TitleProperty|Ellipsoid}} |
{{TitleProperty|Ellipsoid}} |
||
<!--T:36--> |
|||
*{{PropertyData|Radius1|Length}}: By default the minor radius parallel to the Z-axis, |
|||
*{{PropertyData| |
* {{PropertyData|Radius1|Length}}: The radius of the ellipsoid in its Z direction. The default is {{Value|2mm}}. |
||
*{{PropertyData| |
* {{PropertyData|Radius2|Length}}: The radius of the ellipsoid in its X direction. The default is {{Value|4mm}}. |
||
*{{PropertyData| |
* {{PropertyData|Radius3|Length}}: The radius of the ellipsoid in its Y direction. The default is {{Value|4mm}}. |
||
*{{PropertyData| |
* {{PropertyData|Angle1|Angle}}: The start angle of the elliptical sides of the ellipsoid. Valid range: {{Value|-90° <= value < 90°}}. Must be smaller than {{PropertyData|Angle2}}. The default is {{Value|-90°}}. |
||
* {{PropertyData|Angle2|Angle}}: The end angle of the elliptical sides of the ellipsoid. Valid range: {{Value|-90° < value <= 90°}}. Must be larger than {{PropertyData|Angle1}}. The default is {{Value|90°}}. If the total angle of the elliptical sides is smaller than {{Value|180°}} the ellipsoid will be truncated and have a flat face at the top and/or bottom. |
|||
*{{PropertyData|Angle3|Angle}}: Angle of rotation of the elliptical cross section (360 degrees in a full spheroid) |
|||
* {{PropertyData|Angle3|Angle}}: The total angle of the ellipsoid in its XY plane. 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 an ellipsoid. |
|||
== Scripting == <!--T:37--> |
|||
==Limitations== |
|||
<!--T:38--> |
|||
==Scripting== |
|||
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 is created with the {{Incode|addObject()}} method of the document. |
|||
A Part Ellipsoid can be created with the {{Incode|addObject()}} method of the document: |
|||
</translate> |
|||
{{Code|code= |
|||
ellipsoid = FreeCAD.ActiveDocument.addObject("Part::Ellipsoid", "myEllipsoid") |
|||
<translate> |
|||
<!--T:27--> |
|||
* Where {{Incode|myBox}} is the name for the object. The name must be unique for the entire document. |
|||
* The function returns the newly created object. |
|||
The {{Incode|Label}} is the user editable name for the object. It can be easily changed by |
|||
</translate> |
|||
{{Code|code= |
|||
box.Label = "new myBoxName" |
|||
}} |
|||
<translate> |
|||
<!--T:28--> |
|||
You can access and modify attributes of the {{Incode|box}} object. For example, you may wish to modify the length, width and height parameters. |
|||
</translate> |
|||
{{Code|code= |
|||
box.Length = 4 |
|||
box.Width = 8 |
|||
box.Height = 12 |
|||
}} |
|||
<translate> |
|||
<!--T:31--> |
|||
You can change its placement with: |
|||
</translate> |
|||
{{Code|code= |
|||
box.Placement = FreeCAD.Placement(FreeCAD.Vector(1, 2, 3), FreeCAD.Rotation(75, 60, 30)) |
|||
}} |
|||
<translate> |
|||
A Part Ellipsoid can be created with the following function: |
|||
</translate> |
</translate> |
||
Line 139: | 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--> |
|||
You can access and modify attributes of the {{Incode| ellipsoid}} object. |
|||
Example: |
|||
The name of the object can be easily changed by |
|||
</translate> |
</translate> |
||
{{Code|code= |
{{Code|code= |
||
import FreeCAD as App |
|||
ellipsoid.label = "new ellipsoidName" |
|||
}} |
|||
<translate> |
|||
doc = App.activeDocument() |
|||
For example, you may wish to modify the two radii and the three angles of the ellipsoid. |
|||
ellipsoid = doc.addObject("Part::Ellipsoid", "myEllipsoid") |
|||
</translate> |
|||
{{Code|code= |
|||
ellipsoid.Radius1 = 2 |
ellipsoid.Radius1 = 2 |
||
ellipsoid.Radius2 = |
ellipsoid.Radius2 = 4 |
||
ellipsoid.Radius3 = |
ellipsoid.Radius3 = 6 |
||
ellipsoid.Angle1 = -90 |
ellipsoid.Angle1 = -90 |
||
ellipsoid.Angle2 = 50 |
ellipsoid.Angle2 = 50 |
||
ellipsoid.Angle3 = 300 |
ellipsoid.Angle3 = 300 |
||
ellipsoid.Placement = App.Placement(App.Vector(1, 2, 3), App.Rotation(15, 0, 20)) |
|||
}} |
|||
<translate> |
|||
doc.recompute() |
|||
The result will be a part of an ellipsoid. |
|||
You can change its placement and orientation with: |
|||
</translate> |
|||
{{Code|code= |
|||
ellipsoid.Placement = FreeCAD.Placement(FreeCAD.Vector(2, 4, 6), FreeCAD.Rotation(30, 45, 10)) |
|||
}} |
}} |
||
<translate> |
<translate> |
||
Line 187: | Line 124: | ||
</translate> |
</translate> |
||
{{ |
{{Part_Tools_navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
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
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 is2mm
. - DataRadius2 (
Length
): The radius of the ellipsoid in its X direction. The default is4mm
. - DataRadius3 (
Length
): The radius of the ellipsoid in its Y direction. The default is4mm
. - 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 is90°
. If the total angle of the elliptical sides is smaller than180°
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 is360°
. If it is smaller than360°
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()
- Primitives: Box, Cylinder, Sphere, Cone, Torus, Tube, Create primitives, Shape builder
- Creation and modification: Extrude, Revolve, Mirror, Scale, 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
- 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, Assembly, BIM, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub