DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


IKO_gp_Circ2d Interface


Describes a circle in the plane (2D space).
A circle is defined by its radius 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 circle, and
- the orientation (direct or indirect) of the coordinate
system gives an implicit orientation to the circle (and
defines its trigonometric sense).
This positioning coordinate system is the "local
coordinate system" of the circle.
Note: when a gp_Circ2d circle is converted into a
Geom2d_Circle circle, some implicit properties of the
circle are used explicitly:
- the implicit orientation corresponds to the direction in
which parameter values increase,
- the starting point for parameterization is that of the "X
Axis" of the local coordinate system (i.e. the "X Axis" of the circle).
See Also
GccAna and Geom2dGcc packages which provide
functions for constructing circles defined by geometric constraints
gce_MakeCirc2d which provides functions for more
complex circle constructions
Geom2d_Circle which provides additional functions for
constructing circles and works, with the parametric
equations of circles in particular gp_Ax22d

Query IKO_Standard_Object from this interface to create a copy or obtain the type name

Methods

Init
Init1
Init2
SetLocation
SetXAxis
SetAxis
SetYAxis
SetRadius
Area
Coefficients
Contains
Distance
SquareDistance
Length
Location
Radius
Axis
Position
XAxis
YAxis
Reverse
Reversed
IsDirect
Mirror
Mirrored
Mirror1
Mirrored1
Rotate
Rotated
Scale
Scaled
Transform
Transformed
Translate
Translated
Translate1
Translated1
_CSFDB_Getgp_Circ2dpos
_CSFDB_Getgp_Circ2dradius
_CSFDB_Setgp_Circ2dradius

HRESULT Init()

creates an indefinite circle.


HRESULT Init1(IKO_gp_Ax2d* XAxis, double Radius, VARIANT_BOOL Sense)

The location point of XAxis is the center of the circle.
Warnings :
It is not forbidden to create a circle with Radius = 0.0 Raises ConstructionError if Radius 0.0. br Raised if Radius < 0.0.


HRESULT Init2(IKO_gp_Ax22d* Axis, double Radius)

Axis defines the Xaxis and Yaxis of the circle which defines
the origin and the sense of parametrization.
The location point of Axis is the center of the circle.
Warnings :
It is not forbidden to create a circle with Radius = 0.0 Raises ConstructionError if Radius 0.0. br Raised if Radius < 0.0.


HRESULT SetLocation(KC2D* P)


HRESULT SetXAxis(IKO_gp_Ax2d* A)


HRESULT SetAxis(IKO_gp_Ax22d* A)


HRESULT SetYAxis(IKO_gp_Ax2d* A)


HRESULT SetRadius(double Radius)

Modifies the radius of this circle.
This class does not prevent the creation of a circle where
Radius is null.
Exceptions
Standard_ConstructionError if Radius is negative.


HRESULT Area(double* ret)

Computes the area of the circle.


HRESULT Coefficients(double* A, double* B, double* C, double* D, double* E, double* F)

Returns the normalized coefficients from the implicit equation
of the circle :
A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.0


HRESULT Contains(KC2D* P, double LinearTolerance, VARIANT_BOOL* ret)

Does this contain P ?
Returns True if the distance between P and any point on
the circumference of the circle is lower of equal to
LinearTolerance.


HRESULT Distance(KC2D* P, double* ret)

Computes the minimum of distance between the point P and any
point on the circumference of the circle.


HRESULT SquareDistance(KC2D* P, double* ret)

Computes the square distance between this and the point P.


HRESULT Length(double* ret)

computes the circumference of the circle.


HRESULT Location(KC2D* ret)

Returns the location point (center) of the circle.


HRESULT Radius(double* ret)

Returns the radius value of the circle.


HRESULT Axis(IKO_gp_Ax22d** ret)

returns the position of the circle.


HRESULT Position(IKO_gp_Ax22d** ret)

returns the position of the circle. Idem Axis(me).


HRESULT XAxis(IKO_gp_Ax2d** ret)

returns the X axis of the circle.


HRESULT YAxis(IKO_gp_Ax2d** ret)

Returns the Y axis of the circle.
Reverses the direction of the circle.


HRESULT Reverse()


HRESULT Reversed(IKO_gp_Circ2d** ret)

Reverses the orientation of the local coordinate system
of this circle (the "Y Direction" is reversed) and therefore
changes the implicit orientation of this circle.
Reversed creates a new circle.


HRESULT IsDirect(VARIANT_BOOL* ret)

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


HRESULT Mirror(KC2D* P)


HRESULT Mirrored(KC2D* P, IKO_gp_Circ2d** ret)


HRESULT Mirror1(IKO_gp_Ax2d* A)


HRESULT Mirrored1(IKO_gp_Ax2d* A, IKO_gp_Circ2d** ret)


HRESULT Rotate(KC2D* P, double Ang)


HRESULT Rotated(KC2D* P, double Ang, IKO_gp_Circ2d** ret)

Rotates a circle. P is the center of the rotation.
Ang is the angular value of the rotation in radians.


HRESULT Scale(KC2D* P, double S)


HRESULT Scaled(KC2D* P, double S, IKO_gp_Circ2d** ret)

Scales a circle. S is the scaling value.
Warnings :
If S is negative the radius stay positive but
the "XAxis" and the "YAxis" are reversed as for
an ellipse.


HRESULT Transform(IKO_gp_Trsf2d* T)


HRESULT Transformed(IKO_gp_Trsf2d* T, IKO_gp_Circ2d** ret)

Transforms a circle with the transformation T from class Trsf2d.


HRESULT Translate(KC2D* V)


HRESULT Translated(KC2D* V, IKO_gp_Circ2d** ret)

Translates a circle in the direction of the vector V.
The magnitude of the translation is the vector's magnitude.


HRESULT Translate1(KC2D* P1, KC2D* P2)


HRESULT Translated1(KC2D* P1, KC2D* P2, IKO_gp_Circ2d** ret)

Translates a circle from the point P1 to the point P2.


HRESULT _CSFDB_Getgp_Circ2dpos(IKO_gp_Ax22d** ret)


HRESULT _CSFDB_Getgp_Circ2dradius(double* ret)


HRESULT _CSFDB_Setgp_Circ2dradius(double p)