AnyCAD Rapid API 2026
Help you to create a better world!
载入中...
搜索中...
未找到
AnyCAD.Foundation.GElips2d类 参考
类 AnyCAD.Foundation.GElips2d 继承关系图:

Public 成员函数

 GElips2d (global::System.IntPtr cPtr, bool cMemoryOwn)
 仅供内部使用
 
void Dispose ()
 
 GElips2d ()
 Creates an indefinite ellipse.
 
 GElips2d (GAx2d theMajorAxis, double theMajorRadius, double theMinorRadius, bool 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 (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 (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
 
void SetLocation (GPnt2d theP)
 Modifies this ellipse, by redefining its local coordinate system so that - its origin becomes theP.
 
void SetMajorRadius (double theMajorRadius)
 Changes the value of the major radius. Raises ConstructionError if theMajorRadius < MinorRadius.
 
void SetMinorRadius (double theMinorRadius)
 Changes the value of the minor radius. Raises ConstructionError if MajorRadius < theMinorRadius or MinorRadius < 0.0
 
void SetAxis (GAx22d theA)
 Modifies this ellipse, by redefining its local coordinate system so that it becomes theA.
 
void 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.
 
void 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.
 
double Area ()
 Computes the area of the ellipse.
 
void Coefficients (ref double theA, ref double theB, ref double theC, ref double theD, ref double theE, ref 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.
 
GAx2d 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)
 
GAx2d 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).
 
double 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.
 
double Focal ()
 Returns the distance between the center of the ellipse and focus1 or focus2.
 
GPnt2d Focus1 ()
 Returns the first focus of the ellipse. This focus is on the positive side of the major axis of the ellipse.
 
GPnt2d Focus2 ()
 Returns the second focus of the ellipse. This focus is on the negative side of the major axis of the ellipse.
 
GPnt2d Location ()
 Returns the center of the ellipse.
 
double MajorRadius ()
 Returns the major radius of the Ellipse.
 
double MinorRadius ()
 Returns the minor radius of the Ellipse.
 
double Parameter ()
 Returns p = (1 - e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0
 
GAx22d Axis ()
 Returns the major axis of the ellipse.
 
GAx2d XAxis ()
 Returns the major axis of the ellipse.
 
GAx2d YAxis ()
 Returns the minor axis of the ellipse. Reverses the direction of the circle.
 
void Reverse ()
 
GElips2d Reversed ()
 
bool IsDirect ()
 Returns true if the local coordinate system is direct and false in the other case.
 
void Mirror (GPnt2d theP)
 
GElips2d Mirrored (GPnt2d theP)
 Performs the symmetrical transformation of a ellipse with respect to the point theP which is the center of the symmetry
 
void Mirror (GAx2d theA)
 
GElips2d Mirrored (GAx2d theA)
 Performs the symmetrical transformation of a ellipse with respect to an axis placement which is the axis of the symmetry.
 
void Rotate (GPnt2d theP, double theAng)
 
GElips2d Rotated (GPnt2d theP, double theAng)
 
void Scale (GPnt2d theP, double theS)
 
GElips2d Scaled (GPnt2d theP, double theS)
 Scales a ellipse. theS is the scaling value.
 
void Transform (GTrsf2d theT)
 
GElips2d Transformed (GTrsf2d theT)
 Transforms an ellipse with the transformation theT from class Trsf2d.
 
void Translate (GVec2d theV)
 
GElips2d Translated (GVec2d theV)
 Translates a ellipse in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
 
void Translate (GPnt2d theP1, GPnt2d theP2)
 
GElips2d Translated (GPnt2d theP1, GPnt2d theP2)
 Translates a ellipse from the point theP1 to the point 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:<code> X*X / (MajorRadius**2) + Y*Y / (MinorRadius**2) = 1.0</code> 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