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_Torus Interface


Properties of a torus. To create this type of a circle use a call similar to iDIObjGenerator.Create3("KO_gp_Cone") where iDIObjGenerator has IDIObjGenerator type.

A torus is defined by its major and minor radii and positioned in space with a coordinate system (a gp_Ax3 object) as follows:
� The origin of the coordinate system is the center of the torus;
� The surface is obtained by rotating a circle of radius equal to the minor radius of the torus about the "main
Direction" of the coordinate system. This circle is located in the plane defined by the origin, the "X
Direction" and the "main Direction" of the coordinate system. It is centered on the "X Axis" of this coordinate system, and located at a distance, from the origin of this coordinate system, equal to the major radius of the torus;
� The "X Direction" and "Y Direction" define the reference plane of the torus. The coordinate system described above is the "local
coordinate system" of the torus. Note: when a gp_Torus torus is converted into a Geom_ToroidalSurface torus, some implicit properties of its local coordinate system are used explicitly:
� its origin, "X Direction", "Y Direction" and "main Direction" are used directly to define the parametric directions on the torus and the origin of the parameters,
� its implicit orientation (right-handed or left-handed) gives the orientation (direct, indirect) to the Geom_ToroidalSurface torus. See Also gce_MakeTorus which provides functions for more complex torus constructions Geom_ToroidalSurface which provides additional functions for constructing tori and works, in particular, with the parametric equations of tori. 

Query IKO_gp_Object from this interface to obtain or modify location and orientation of the plane

Query IKO_gp_Transformation to transform position and orientation

IKO_Standard_Object to create a copy or obtain type name

Init
SetMajorRadius
SetMinorRadius
Coefficients
MajorRadius
MinorRadius
Volume

HRESULT Init(IKO_gp_Ax3* A3, double MajorRadius, double MinorRadius)

Creates an infinite conical surface. A3 locates the cone in the space and defines the reference plane of the surface. Ang is the conical surface semi-angle between 0 and PI/2 radians. Radius is the radius of the circle in the reference plane of the cone. Raises ConstructionError . if Radius is lower than 0.0 . Ang < Resolution from gp or Ang >= (PI/2) - Resolution.


HRESULT SetMajorRadius(double MajorRadius)


HRESULT SetMinorRadius(double MinorRadius)


HRESULT Area(double* retVal)

Returns the cone's top. The Apex of the cone is on the negative side of the symmetry axis of the cone.


HRESULT Coefficients(IKO_TColStd_Array1OfReal* Coef)

Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinates system : A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + 2.(C1.X + C2.Y + C3.Z) + D = 0.0


HRESULT MajorRadius(double* retVal)

Returns the radius of the cone in the reference plane


HRESULT MinorRadius(double* retVal)

Returns the minor radius of the torus.


HRESULT Volume(double* retVal)

Returns volume