AnyCAD Rapid API 2024
Help you to create a better world!
|
Public 成员函数 | |
GPnt2d () | |
GPnt2d (GXY theCoord) | |
GPnt2d (double theXp, double theYp) | |
void | SetCoord (int theIndex, double theXi) |
void | SetCoord (double theXp, double theYp) |
void | SetX (double theX) |
void | SetY (double theY) |
void | SetXY (GXY theCoord) |
double | Coord (int theIndex) |
void | Coord (double[] theXp, double[] theYp) |
double | X () |
double | Y () |
GXY | XY () |
GXY | Coord () |
GXY | ChangeCoord () |
boolean | IsEqual (GPnt2d theOther, double theLinearTolerance) |
double | Distance (GPnt2d theOther) |
double | SquareDistance (GPnt2d theOther) |
void | Mirror (GPnt2d theP) |
GPnt2d | Mirrored (GPnt2d theP) |
void | Mirror (GAx2d theA) |
GPnt2d | Mirrored (GAx2d theA) |
void | Rotate (GPnt2d theP, double theAng) |
GPnt2d | Rotated (GPnt2d theP, double theAng) |
void | Scale (GPnt2d theP, double theS) |
GPnt2d | Scaled (GPnt2d theP, double theS) |
void | Transform (GTrsf2d theT) |
GPnt2d | Transformed (GTrsf2d theT) |
void | Translate (GVec2d theV) |
GPnt2d | Translated (GVec2d theV) |
void | Translate (GPnt2d theP1, GPnt2d theP2) |
GPnt2d | Translated (GPnt2d theP1, GPnt2d theP2) |
Defines a non-persistent 2D cartesian point.
GPnt2d.GPnt2d | ( | ) |
Creates a point with zero coordinates.
GPnt2d.GPnt2d | ( | GXY | theCoord | ) |
Creates a point with a doublet of coordinates.
GPnt2d.GPnt2d | ( | double | theXp, |
double | theYp ) |
Creates a point with its 2 cartesian's coordinates : theXp, theYp.
GXY GPnt2d.ChangeCoord | ( | ) |
Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.
GXY GPnt2d.Coord | ( | ) |
For this point, returns its two coordinates as a number pair.
void GPnt2d.Coord | ( | double[] | theXp, |
double[] | theYp ) |
For this point returns its two coordinates as a number pair.
double GPnt2d.Coord | ( | int | theIndex | ) |
Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}.
double GPnt2d.Distance | ( | GPnt2d | theOther | ) |
Computes the distance between two points.
boolean GPnt2d.IsEqual | ( | GPnt2d | theOther, |
double | theLinearTolerance ) |
Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance.
void GPnt2d.Mirror | ( | GPnt2d | theP | ) |
Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry.
Performs the symmetrical transformation of a point with respect to an axis placement which is the axis
void GPnt2d.Rotate | ( | GPnt2d | theP, |
double | theAng ) |
Rotates a point. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
void GPnt2d.Scale | ( | GPnt2d | theP, |
double | theS ) |
Scales a point. theS is the scaling value.
void GPnt2d.SetCoord | ( | double | theXp, |
double | theYp ) |
For this point, assigns the values theXp and theYp to its two coordinates
void GPnt2d.SetCoord | ( | int | theIndex, |
double | theXi ) |
Assigns the value Xi to the coordinate that corresponds to theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}.
void GPnt2d.SetX | ( | double | theX | ) |
Assigns the given value to the X coordinate of this point.
void GPnt2d.SetXY | ( | GXY | theCoord | ) |
Assigns the two coordinates of Coord to this point.
void GPnt2d.SetY | ( | double | theY | ) |
Assigns the given value to the Y coordinate of this point.
double GPnt2d.SquareDistance | ( | GPnt2d | theOther | ) |
Computes the square distance between two points.
void GPnt2d.Transform | ( | GTrsf2d | theT | ) |
Transforms a point with the transformation theT.
Translates a point from the point theP1 to the point theP2.
void GPnt2d.Translate | ( | GVec2d | theV | ) |
Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
double GPnt2d.X | ( | ) |
For this point, returns its X coordinate.
GXY GPnt2d.XY | ( | ) |
For this point, returns its two coordinates as a number pair.
double GPnt2d.Y | ( | ) |
For this point, returns its Y coordinate.