Geom.ellipse()¶
Description¶
A 2D ellipse or sector of the ellipse is constructed in the XOY plane, with angles specified in degrees, and the center of the figure at (0,0,0).
Syntax¶
JS
Geom.ellipse(majorRadius: Number, minorRadius: Number) -> Shape
Geom.ellipse(majorRadius: Number, minorRadius: Number, angle1: Number, angle2: Number) -> Shape
Parameters¶
| Parameter | Type | Description | 
|---|---|---|
| majorRadius | Number | The first radius of the ellipse. | 
| minorRadius | Number | The second radius of the ellipse. | 
| angle1 | Number | The starting angle of the sector of the ellipse in degrees within (0°, 360°). | 
| angle2 | Number | The ending angle of the sector of the ellipse in degrees within (0°, 360°). | 
Note
When setting parameters for constructing an ellipse, the value of majorRadius (length of the major semi-axis) must be greater than or equal to the value of minorRadius (length of the minor semi-axis).
Return value¶
| Type | Description | 
|---|---|
| Shape | An object of type Shape, an ellipse or sector of the ellipse. | 
Example¶
| JS | |
|---|---|