AnyCAD Rapid API 2023
Help you to create a better world!
载入中...
搜索中...
未找到
GElips2d类 参考

Public 成员函数

 GElips2d ()
 
 GElips2d (GAx2d theMajorAxis, double theMajorRadius, double theMinorRadius, boolean theIsSense)
 
 GElips2d (GAx2d theMajorAxis, double theMajorRadius, double theMinorRadius)
 
 GElips2d (GAx22d theA, double theMajorRadius, double theMinorRadius)
 
void SetLocation (GPnt2d theP)
 
void SetMajorRadius (double theMajorRadius)
 
void SetMinorRadius (double theMinorRadius)
 
void SetAxis (GAx22d theA)
 
void SetXAxis (GAx2d theA)
 
void SetYAxis (GAx2d theA)
 
double Area ()
 
void Coefficients (double[] theA, double[] theB, double[] theC, double[] theD, double[] theE, double[] theF)
 
GAx2d Directrix1 ()
 
GAx2d Directrix2 ()
 
double Eccentricity ()
 
double Focal ()
 
GPnt2d Focus1 ()
 
GPnt2d Focus2 ()
 
GPnt2d Location ()
 
double MajorRadius ()
 
double MinorRadius ()
 
double Parameter ()
 
GAx22d Axis ()
 
GAx2d XAxis ()
 
GAx2d YAxis ()
 
void Reverse ()
 
GElips2d Reversed ()
 
boolean IsDirect ()
 
void Mirror (GPnt2d theP)
 
GElips2d Mirrored (GPnt2d theP)
 
void Mirror (GAx2d theA)
 
GElips2d Mirrored (GAx2d theA)
 
void Rotate (GPnt2d theP, double theAng)
 
GElips2d Rotated (GPnt2d theP, double theAng)
 
void Scale (GPnt2d theP, double theS)
 
GElips2d Scaled (GPnt2d theP, double theS)
 
void Transform (GTrsf2d theT)
 
GElips2d Transformed (GTrsf2d theT)
 
void Translate (GVec2d theV)
 
GElips2d Translated (GVec2d theV)
 
void Translate (GPnt2d theP1, GPnt2d theP2)
 
GElips2d Translated (GPnt2d theP1, GPnt2d theP2)
 

详细描述

Describes an ellipse in the plane (2D space). An ellipse is defined by its major and minor radii and positioned in the plane with a coordinate system (a gp_Ax22d object) as follows: - the origin of the coordinate system is the center of the ellipse, - its "X Direction" defines the major axis of the ellipse, and - its "Y Direction" defines the minor axis of the ellipse. This coordinate system is the "local coordinate system" of the ellipse. Its orientation (direct or indirect) gives an implicit orientation to the ellipse. In this coordinate system, the equation of the ellipse is: X*X / (MajorRadius**2) + Y*Y / (MinorRadius**2) = 1.0 See Also gce_MakeElips2d which provides functions for more complex ellipse constructions Geom2d_Ellipse which provides additional functions for constructing ellipses and works, in particular, with the parametric equations of ellipses

构造及析构函数说明

◆ GElips2d() [1/4]

GElips2d.GElips2d ( )

Creates an indefinite ellipse.

◆ GElips2d() [2/4]

GElips2d.GElips2d ( GAx2d  theMajorAxis,
double  theMajorRadius,
double  theMinorRadius,
boolean  theIsSense 
)

Creates an ellipse with the major axis, the major and the minor radius. The location of the theMajorAxis is the center of the ellipse. The sense of parametrization is given by theIsSense. Warnings : It is possible to create an ellipse with theMajorRadius = theMinorRadius. Raises ConstructionError if theMajorRadius < theMinorRadius or theMinorRadius < 0.0

◆ GElips2d() [3/4]

GElips2d.GElips2d ( GAx2d  theMajorAxis,
double  theMajorRadius,
double  theMinorRadius 
)

Creates an ellipse with the major axis, the major and the minor radius. The location of the theMajorAxis is the center of the ellipse. The sense of parametrization is given by theIsSense. Warnings : It is possible to create an ellipse with theMajorRadius = theMinorRadius. Raises ConstructionError if theMajorRadius < theMinorRadius or theMinorRadius < 0.0

◆ GElips2d() [4/4]

GElips2d.GElips2d ( GAx22d  theA,
double  theMajorRadius,
double  theMinorRadius 
)

Creates an ellipse with radii MajorRadius and MinorRadius, positioned in the plane by coordinate system theA where: - the origin of theA is the center of the ellipse, - the "X Direction" of theA defines the major axis of the ellipse, that is, the major radius MajorRadius is measured along this axis, and - the "Y Direction" of theA defines the minor axis of the ellipse, that is, the minor radius theMinorRadius is measured along this axis, and - the orientation (direct or indirect sense) of theA gives the orientation of the ellipse. Warnings : It is possible to create an ellipse with theMajorRadius = theMinorRadius. Raises ConstructionError if theMajorRadius < theMinorRadius or theMinorRadius < 0.0

成员函数说明

◆ Area()

double GElips2d.Area ( )

Computes the area of the ellipse.

◆ Axis()

GAx22d GElips2d.Axis ( )

Returns the major axis of the ellipse.

◆ Coefficients()

void GElips2d.Coefficients ( double[]  theA,
double[]  theB,
double[]  theC,
double[]  theD,
double[]  theE,
double[]  theF 
)

Returns the coefficients of the implicit equation of the ellipse. theA * (X**2) + theB * (Y**2) + 2*theC*(X*Y) + 2*theD*X + 2*theE*Y + theF = 0.

◆ Directrix1()

GAx2d GElips2d.Directrix1 ( )

This directrix is the line normal to the XAxis of the ellipse in the local plane (Z = 0) at a distance d = MajorRadius / e from the center of the ellipse, where e is the eccentricity of the ellipse. This line is parallel to the "YAxis". The intersection point between directrix1 and the "XAxis" is the location point of the directrix1. This point is on the positive side of the "XAxis". Raised if Eccentricity = 0.0. (The ellipse degenerates into a circle)

◆ Directrix2()

GAx2d GElips2d.Directrix2 ( )

This line is obtained by the symmetrical transformation of "Directrix1" with respect to the minor axis of the ellipse. Raised if Eccentricity = 0.0. (The ellipse degenerates into a circle).

◆ Eccentricity()

double GElips2d.Eccentricity ( )

Returns the eccentricity of the ellipse between 0.0 and 1.0 If f is the distance between the center of the ellipse and the Focus1 then the eccentricity e = f / MajorRadius. Returns 0 if MajorRadius = 0.

◆ Focal()

double GElips2d.Focal ( )

Returns the distance between the center of the ellipse and focus1 or focus2.

◆ Focus1()

GPnt2d GElips2d.Focus1 ( )

Returns the first focus of the ellipse. This focus is on the positive side of the major axis of the ellipse.

◆ Focus2()

GPnt2d GElips2d.Focus2 ( )

Returns the second focus of the ellipse. This focus is on the negative side of the major axis of the ellipse.

◆ IsDirect()

boolean GElips2d.IsDirect ( )

Returns true if the local coordinate system is direct and false in the other case.

◆ Location()

GPnt2d GElips2d.Location ( )

Returns the center of the ellipse.

◆ MajorRadius()

double GElips2d.MajorRadius ( )

Returns the major radius of the Ellipse.

◆ MinorRadius()

double GElips2d.MinorRadius ( )

Returns the minor radius of the Ellipse.

◆ Mirrored() [1/2]

GElips2d GElips2d.Mirrored ( GAx2d  theA)

Performs the symmetrical transformation of a ellipse with respect to an axis placement which is the axis of the symmetry.

◆ Mirrored() [2/2]

GElips2d GElips2d.Mirrored ( GPnt2d  theP)

Performs the symmetrical transformation of a ellipse with respect to the point theP which is the center of the symmetry

◆ Parameter()

double GElips2d.Parameter ( )

Returns p = (1 - e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0

◆ Scaled()

GElips2d GElips2d.Scaled ( GPnt2d  theP,
double  theS 
)

Scales a ellipse. theS is the scaling value.

◆ SetAxis()

void GElips2d.SetAxis ( GAx22d  theA)

Modifies this ellipse, by redefining its local coordinate system so that it becomes theA.

◆ SetLocation()

void GElips2d.SetLocation ( GPnt2d  theP)

Modifies this ellipse, by redefining its local coordinate system so that - its origin becomes theP.

◆ SetMajorRadius()

void GElips2d.SetMajorRadius ( double  theMajorRadius)

Changes the value of the major radius. Raises ConstructionError if theMajorRadius < MinorRadius.

◆ SetMinorRadius()

void GElips2d.SetMinorRadius ( double  theMinorRadius)

Changes the value of the minor radius. Raises ConstructionError if MajorRadius < theMinorRadius or MinorRadius < 0.0

◆ SetXAxis()

void GElips2d.SetXAxis ( GAx2d  theA)

Modifies this ellipse, by redefining its local coordinate system so that its origin and its "X Direction" become those of the axis theA. The "Y Direction" is then recomputed. The orientation of the local coordinate system is not modified.

◆ SetYAxis()

void GElips2d.SetYAxis ( GAx2d  theA)

Modifies this ellipse, by redefining its local coordinate system so that its origin and its "Y Direction" become those of the axis theA. The "X Direction" is then recomputed. The orientation of the local coordinate system is not modified.

◆ Transformed()

GElips2d GElips2d.Transformed ( GTrsf2d  theT)

Transforms an ellipse with the transformation theT from class Trsf2d.

◆ Translated() [1/2]

GElips2d GElips2d.Translated ( GPnt2d  theP1,
GPnt2d  theP2 
)

Translates a ellipse from the point theP1 to the point theP2.

◆ Translated() [2/2]

GElips2d GElips2d.Translated ( GVec2d  theV)

Translates a ellipse in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.

◆ XAxis()

GAx2d GElips2d.XAxis ( )

Returns the major axis of the ellipse.

◆ YAxis()

GAx2d GElips2d.YAxis ( )

Returns the minor axis of the ellipse. Reverses the direction of the circle.