Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
Prs3d_ToolTorus Class Reference

Standard presentation algorithm that outputs graphical primitives for torus surface. More...

#include <Prs3d_ToolTorus.hxx>

Inheritance diagram for Prs3d_ToolTorus:
Inheritance graph
[legend]

Public Member Functions

 Prs3d_ToolTorus (const double theMajorRad, const double theMinorRad, const int theNbSlices, const int theNbStacks)
 Initializes the algorithm creating a complete torus.
 
 Prs3d_ToolTorus (const double theMajorRad, const double theMinorRad, const double theAngle, const int theNbSlices, const int theNbStacks)
 Initializes the algorithm creating a torus pipe segment.
 
 Prs3d_ToolTorus (const double theMajorRad, const double theMinorRad, const double theAngle1, const double theAngle2, const int theNbSlices, const int theNbStacks)
 Initializes the algorithm creating a torus ring segment.
 
 Prs3d_ToolTorus (const double theMajorRad, const double theMinorRad, const double theAngle1, const double theAngle2, const double theAngle, const int theNbSlices, const int theNbStacks)
 Initializes the algorithm creating a torus ring segment.
 
- Public Member Functions inherited from Prs3d_ToolQuadric
occ::handle< Graphic3d_ArrayOfTrianglesCreateTriangulation (const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface presentation.
 
occ::handle< Poly_TriangulationCreatePolyTriangulation (const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface presentation.
 
void FillArray (occ::handle< Graphic3d_ArrayOfTriangles > &theArray, const gp_Trsf &theTrsf) const
 Generate primitives for 3D quadric surface and fill the given array.
 
int TrianglesNb () const
 Return number of triangles in generated presentation.
 
int VerticesNb (bool theIsIndexed=true) const
 Return number of vertices in generated presentation.
 

Static Public Member Functions

static occ::handle< Graphic3d_ArrayOfTrianglesCreate (const double theMajorRad, const double theMinorRad, const int theNbSlices, const int theNbStacks, const gp_Trsf &theTrsf)
 Generate primitives for 3D quadric surface (complete torus).
 
static occ::handle< Graphic3d_ArrayOfTrianglesCreate (const double theMajorRad, const double theMinorRad, const double theAngle, const int theNbSlices, const int theNbStacks, const gp_Trsf &theTrsf)
 Generate primitives for 3D quadric surface (torus segment).
 
static occ::handle< Graphic3d_ArrayOfTrianglesCreate (const double theMajorRad, const double theMinorRad, const double theAngle1, const double theAngle2, const int theNbSlices, const int theNbStacks, const gp_Trsf &theTrsf)
 Generate primitives for 3D quadric surface (torus ring segment).
 
static occ::handle< Graphic3d_ArrayOfTrianglesCreate (const double theMajorRad, const double theMinorRad, const double theAngle1, const double theAngle2, const double theAngle, const int theNbSlices, const int theNbStacks, const gp_Trsf &theTrsf)
 Generate primitives for 3D quadric surface (segment of the torus ring segment).
 
- Static Public Member Functions inherited from Prs3d_ToolQuadric
static int TrianglesNb (const int theSlicesNb, const int theStacksNb)
 Return number of triangles for presentation with the given params.
 
static int VerticesNb (const int theSlicesNb, const int theStacksNb, const bool theIsIndexed=true)
 Return number of vertices for presentation with the given params.
 

Protected Member Functions

gp_Pnt Vertex (const double theU, const double theV) const override
 Computes vertex at given parameter location of the surface.
 
gp_Dir Normal (const double theU, const double theV) const override
 Computes normal at given parameter location of the surface.
 

Protected Attributes

double myMajorRadius
 distance from the center of the pipe to the center of the torus
 
double myMinorRadius
 radius of the pipe
 
double myAngle
 angle to create a torus pipe segment
 
double myVMin
 first angle to create a torus ring segment
 
double myVMax
 second angle to create a torus ring segment
 
- Protected Attributes inherited from Prs3d_ToolQuadric
int mySlicesNb
 number of slices within U parameter
 
int myStacksNb
 number of stacks within V parameter
 

Additional Inherited Members

- Data Fields inherited from Prs3d_ToolQuadric
Deprecated method
 Generate primitives for 3D quadric surface presentation.
 

Detailed Description

Standard presentation algorithm that outputs graphical primitives for torus surface.

Constructor & Destructor Documentation

◆ Prs3d_ToolTorus() [1/4]

Prs3d_ToolTorus::Prs3d_ToolTorus ( const double theMajorRad,
const double theMinorRad,
const int theNbSlices,
const int theNbStacks )
inline

Initializes the algorithm creating a complete torus.

Parameters
[in]theMajorRaddistance from the center of the pipe to the center of the torus
[in]theMinorRadradius of the pipe
[in]theNbSlicesnumber of slices within U parameter
[in]theNbStacksnumber of stacks within V parameter

◆ Prs3d_ToolTorus() [2/4]

Prs3d_ToolTorus::Prs3d_ToolTorus ( const double theMajorRad,
const double theMinorRad,
const double theAngle,
const int theNbSlices,
const int theNbStacks )
inline

Initializes the algorithm creating a torus pipe segment.

Parameters
[in]theMajorRaddistance from the center of the pipe to the center of the torus
[in]theMinorRadradius of the pipe
[in]theAngleangle to create a torus pipe segment
[in]theNbSlicesnumber of slices within U parameter
[in]theNbStacksnumber of stacks within V parameter

◆ Prs3d_ToolTorus() [3/4]

Prs3d_ToolTorus::Prs3d_ToolTorus ( const double theMajorRad,
const double theMinorRad,
const double theAngle1,
const double theAngle2,
const int theNbSlices,
const int theNbStacks )
inline

Initializes the algorithm creating a torus ring segment.

Parameters
[in]theMajorRaddistance from the center of the pipe to the center of the torus
[in]theMinorRadradius of the pipe
[in]theAngle1first angle to create a torus ring segment
[in]theAngle2second angle to create a torus ring segment
[in]theNbSlicesnumber of slices within U parameter
[in]theNbStacksnumber of stacks within V parameter

◆ Prs3d_ToolTorus() [4/4]

Prs3d_ToolTorus::Prs3d_ToolTorus ( const double theMajorRad,
const double theMinorRad,
const double theAngle1,
const double theAngle2,
const double theAngle,
const int theNbSlices,
const int theNbStacks )
inline

Initializes the algorithm creating a torus ring segment.

Parameters
[in]theMajorRaddistance from the center of the pipe to the center of the torus
[in]theMinorRadradius of the pipe
[in]theAngle1first angle to create a torus ring segment
[in]theAngle2second angle to create a torus ring segment
[in]theAngleangle to create a torus pipe segment
[in]theNbSlicesnumber of slices within U parameter
[in]theNbStacksnumber of stacks within V parameter

Member Function Documentation

◆ Create() [1/4]

static occ::handle< Graphic3d_ArrayOfTriangles > Prs3d_ToolTorus::Create ( const double theMajorRad,
const double theMinorRad,
const double theAngle,
const int theNbSlices,
const int theNbStacks,
const gp_Trsf & theTrsf )
inlinestatic

Generate primitives for 3D quadric surface (torus segment).

Parameters
[in]theMajorRaddistance from the center of the pipe to the center of the torus
[in]theMinorRadradius of the pipe
[in]theAngleangle to create a torus pipe segment
[in]theNbSlicesnumber of slices within U parameter
[in]theNbStacksnumber of stacks within V parameter
[in]theTrsfoptional transformation to apply
Returns
generated triangulation

◆ Create() [2/4]

static occ::handle< Graphic3d_ArrayOfTriangles > Prs3d_ToolTorus::Create ( const double theMajorRad,
const double theMinorRad,
const double theAngle1,
const double theAngle2,
const double theAngle,
const int theNbSlices,
const int theNbStacks,
const gp_Trsf & theTrsf )
static

Generate primitives for 3D quadric surface (segment of the torus ring segment).

Parameters
[in]theMajorRaddistance from the center of the pipe to the center of the torus
[in]theMinorRadradius of the pipe
[in]theAngle1first angle to create a torus ring segment
[in]theAngle2second angle to create a torus ring segment
[in]theAngleangle to create a torus pipe segment
[in]theNbSlicesnumber of slices within U parameter
[in]theNbStacksnumber of stacks within V parameter
[in]theTrsfoptional transformation to apply
Returns
generated triangulation

◆ Create() [3/4]

static occ::handle< Graphic3d_ArrayOfTriangles > Prs3d_ToolTorus::Create ( const double theMajorRad,
const double theMinorRad,
const double theAngle1,
const double theAngle2,
const int theNbSlices,
const int theNbStacks,
const gp_Trsf & theTrsf )
inlinestatic

Generate primitives for 3D quadric surface (torus ring segment).

Parameters
[in]theMajorRaddistance from the center of the pipe to the center of the torus
[in]theMinorRadradius of the pipe
[in]theAngle1first angle to create a torus ring segment
[in]theAngle2second angle to create a torus ring segment
[in]theNbSlicesnumber of slices within U parameter
[in]theNbStacksnumber of stacks within V parameter
[in]theTrsfoptional transformation to apply
Returns
generated triangulation

◆ Create() [4/4]

static occ::handle< Graphic3d_ArrayOfTriangles > Prs3d_ToolTorus::Create ( const double theMajorRad,
const double theMinorRad,
const int theNbSlices,
const int theNbStacks,
const gp_Trsf & theTrsf )
inlinestatic

Generate primitives for 3D quadric surface (complete torus).

Parameters
[in]theMajorRaddistance from the center of the pipe to the center of the torus
[in]theMinorRadradius of the pipe
[in]theNbSlicesnumber of slices within U parameter
[in]theNbStacksnumber of stacks within V parameter
[in]theTrsfoptional transformation to apply
Returns
generated triangulation

◆ Normal()

gp_Dir Prs3d_ToolTorus::Normal ( const double theU,
const double theV ) const
overrideprotectedvirtual

Computes normal at given parameter location of the surface.

Implements Prs3d_ToolQuadric.

◆ Vertex()

gp_Pnt Prs3d_ToolTorus::Vertex ( const double theU,
const double theV ) const
overrideprotectedvirtual

Computes vertex at given parameter location of the surface.

Implements Prs3d_ToolQuadric.

Field Documentation

◆ myAngle

double Prs3d_ToolTorus::myAngle
protected

angle to create a torus pipe segment

◆ myMajorRadius

double Prs3d_ToolTorus::myMajorRadius
protected

distance from the center of the pipe to the center of the torus

◆ myMinorRadius

double Prs3d_ToolTorus::myMinorRadius
protected

radius of the pipe

◆ myVMax

double Prs3d_ToolTorus::myVMax
protected

second angle to create a torus ring segment

◆ myVMin

double Prs3d_ToolTorus::myVMin
protected

first angle to create a torus ring segment


The documentation for this class was generated from the following file: