Open CASCADE Technology  7.9.3
Functions
TopoDS Namespace Reference

Provides methods to cast objects of class TopoDS_Shape to more specialized sub-classes. The types are not verified before casting. If the type does not match, a Standard_TypeMismatch exception is thrown. Below are examples of correct and incorrect casts: More...

Functions

const TopoDS_VertexVertex (const TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Vertex. More...
 
TopoDS_VertexVertex (TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Vertex. More...
 
const TopoDS_EdgeEdge (const TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Edge. More...
 
TopoDS_EdgeEdge (TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Edge. More...
 
const TopoDS_WireWire (const TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Wire. More...
 
TopoDS_WireWire (TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Wire. More...
 
const TopoDS_FaceFace (const TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Face. More...
 
TopoDS_FaceFace (TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Face. More...
 
const TopoDS_ShellShell (const TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Shell. More...
 
TopoDS_ShellShell (TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Shell. More...
 
const TopoDS_SolidSolid (const TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Solid. More...
 
TopoDS_SolidSolid (TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Solid. More...
 
const TopoDS_CompSolidCompSolid (const TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, CompSolid. More...
 
TopoDS_CompSolidCompSolid (TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, CompSolid. More...
 
const TopoDS_CompoundCompound (const TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Compound. More...
 
TopoDS_CompoundCompound (TopoDS_Shape &theShape)
 Casts shape theShape to the more specialized return type, Compound. More...
 

Detailed Description

Provides methods to cast objects of class TopoDS_Shape to more specialized sub-classes. The types are not verified before casting. If the type does not match, a Standard_TypeMismatch exception is thrown. Below are examples of correct and incorrect casts:

Correct:

TopoDS_Shape aShape = ...; // aShape->ShapeType() == TopAbs_VERTEX
const TopoDS_Vertex& aVertex = TopoDS::Vertex(aShape);

Incorrect (will throw a Standard_TypeMismatch exception):

TopoDS_Shape aShape = ...; // aShape->ShapeType() == TopAbs_VERTEX
const TopoDS_Face& face = TopoDS::Edge(aShape);

Function Documentation

const TopoDS_Compound& TopoDS::Compound ( const TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Compound.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Compound
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
TopoDS_Compound& TopoDS::Compound ( TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Compound.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Compound
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
const TopoDS_CompSolid& TopoDS::CompSolid ( const TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, CompSolid.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_CompSolid
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
TopoDS_CompSolid& TopoDS::CompSolid ( TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, CompSolid.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_CompSolid
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
const TopoDS_Edge& TopoDS::Edge ( const TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Edge.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Edge
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
TopoDS_Edge& TopoDS::Edge ( TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Edge.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Edge
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
const TopoDS_Face& TopoDS::Face ( const TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Face.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Face
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
TopoDS_Face& TopoDS::Face ( TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Face.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Face
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
const TopoDS_Shell& TopoDS::Shell ( const TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Shell.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Shell
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
TopoDS_Shell& TopoDS::Shell ( TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Shell.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Shell
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
const TopoDS_Solid& TopoDS::Solid ( const TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Solid.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Solid
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
TopoDS_Solid& TopoDS::Solid ( TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Solid.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Solid
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
const TopoDS_Vertex& TopoDS::Vertex ( const TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Vertex.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Vertex
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
TopoDS_Vertex& TopoDS::Vertex ( TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Vertex.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Vertex
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
const TopoDS_Wire& TopoDS::Wire ( const TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Wire.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Wire
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.
TopoDS_Wire& TopoDS::Wire ( TopoDS_Shape theShape)
inline

Casts shape theShape to the more specialized return type, Wire.

Parameters
theShapethe shape to be cast
Returns
the casted shape as TopoDS_Wire
Exceptions
Standard_TypeMismatchif theShape cannot be cast to this return type.