Open CASCADE Technology 7.8.2.dev
TopoDS_Shape Class Reference

Describes a shape which. More...

#include <TopoDS_Shape.hxx>

Inheritance diagram for TopoDS_Shape:

Public Member Functions

 TopoDS_Shape ()
 Creates a NULL Shape referring to nothing.
 
template<class T2 >
 TopoDS_Shape (T2 &&theOther, typename std::enable_if< opencascade::std::is_base_of< TopoDS_Shape, T2 >::value >::type *=0)
 Generalized move constructor, accepting also sub-classes (TopoDS_Shape hierarchy declares only fake sub-classes with no extra fields).
 
template<class T2 >
std::enable_if< opencascade::std::is_base_of< TopoDS_Shape, T2 >::value, TopoDS_Shape >::type & operator= (T2 &&theOther)
 Generalized move assignment operator.
 
Standard_Boolean IsNull () const
 Returns true if this shape is null. In other words, it references no underlying shape with the potential to be given a location and an orientation.
 
void Nullify ()
 Destroys the reference to the underlying shape stored in this shape. As a result, this shape becomes null.
 
const TopLoc_LocationLocation () const
 Returns the shape local coordinate system.
 
void Location (const TopLoc_Location &theLoc, const Standard_Boolean theRaiseExc=Standard_True)
 Sets the shape local coordinate system.
 
TopoDS_Shape Located (const TopLoc_Location &theLoc, const Standard_Boolean theRaiseExc=Standard_True) const
 Returns a shape similar to <me> with the local coordinate system set to <Loc>.
 
TopAbs_Orientation Orientation () const
 Returns the shape orientation.
 
void Orientation (TopAbs_Orientation theOrient)
 Sets the shape orientation.
 
TopoDS_Shape Oriented (TopAbs_Orientation theOrient) const
 Returns a shape similar to <me> with the orientation set to <Or>.
 
const Handle< TopoDS_TShape > & TShape () const
 Returns a handle to the actual shape implementation.
 
TopAbs_ShapeEnum ShapeType () const
 Returns the value of the TopAbs_ShapeEnum enumeration that corresponds to this shape, for example VERTEX, EDGE, and so on. Exceptions Standard_NullObject if this shape is null.
 
Standard_Boolean Free () const
 Returns the free flag.
 
void Free (Standard_Boolean theIsFree)
 Sets the free flag.
 
Standard_Boolean Locked () const
 Returns the locked flag.
 
void Locked (Standard_Boolean theIsLocked)
 Sets the locked flag.
 
Standard_Boolean Modified () const
 Returns the modification flag.
 
void Modified (Standard_Boolean theIsModified)
 Sets the modification flag.
 
Standard_Boolean Checked () const
 Returns the checked flag.
 
void Checked (Standard_Boolean theIsChecked)
 Sets the checked flag.
 
Standard_Boolean Orientable () const
 Returns the orientability flag.
 
void Orientable (const Standard_Boolean theIsOrientable)
 Sets the orientability flag.
 
Standard_Boolean Closed () const
 Returns the closedness flag.
 
void Closed (Standard_Boolean theIsClosed)
 Sets the closedness flag.
 
Standard_Boolean Infinite () const
 Returns the infinity flag.
 
void Infinite (Standard_Boolean theIsInfinite)
 Sets the infinity flag.
 
Standard_Boolean Convex () const
 Returns the convexness flag.
 
void Convex (Standard_Boolean theIsConvex)
 Sets the convexness flag.
 
void Move (const TopLoc_Location &thePosition, const Standard_Boolean theRaiseExc=Standard_True)
 Multiplies the Shape location by thePosition.
 
TopoDS_Shape Moved (const TopLoc_Location &thePosition, const Standard_Boolean theRaiseExc=Standard_True) const
 Returns a shape similar to <me> with a location multiplied by thePosition.
 
void Reverse ()
 Reverses the orientation, using the Reverse method from the TopAbs package.
 
TopoDS_Shape Reversed () const
 Returns a shape similar to <me> with the orientation reversed, using the Reverse method from the TopAbs package.
 
void Complement ()
 Complements the orientation, using the Complement method from the TopAbs package.
 
TopoDS_Shape Complemented () const
 Returns a shape similar to <me> with the orientation complemented, using the Complement method from the TopAbs package.
 
void Compose (TopAbs_Orientation theOrient)
 Updates the Shape Orientation by composition with theOrient, using the Compose method from the TopAbs package.
 
TopoDS_Shape Composed (TopAbs_Orientation theOrient) const
 Returns a shape similar to <me> with the orientation composed with theOrient, using the Compose method from the TopAbs package.
 
Standard_Integer NbChildren () const
 Returns the number of direct sub-shapes (children).
 
Standard_Boolean IsPartner (const TopoDS_Shape &theOther) const
 Returns True if two shapes are partners, i.e. if they share the same TShape. Locations and Orientations may differ.
 
Standard_Boolean IsSame (const TopoDS_Shape &theOther) const
 Returns True if two shapes are same, i.e. if they share the same TShape with the same Locations. Orientations may differ.
 
Standard_Boolean IsEqual (const TopoDS_Shape &theOther) const
 Returns True if two shapes are equal, i.e. if they share the same TShape with the same Locations and Orientations.
 
Standard_Boolean operator== (const TopoDS_Shape &theOther) const
 
Standard_Boolean IsNotEqual (const TopoDS_Shape &theOther) const
 Negation of the IsEqual method.
 
Standard_Boolean operator!= (const TopoDS_Shape &theOther) const
 
void EmptyCopy ()
 Replace <me> by a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes.
 
TopoDS_Shape EmptyCopied () const
 Returns a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes.
 
void TShape (const Handle< TopoDS_TShape > &theTShape)
 
void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream.
 

Detailed Description

Describes a shape which.

  • references an underlying shape with the potential to be given a location and an orientation
  • has a location for the underlying shape, giving its placement in the local coordinate system
  • has an orientation for the underlying shape, in terms of its geometry (as opposed to orientation in relation to other shapes). Note: A Shape is empty if it references an underlying shape which has an empty list of shapes.

Constructor & Destructor Documentation

◆ TopoDS_Shape() [1/2]

TopoDS_Shape::TopoDS_Shape ( )
inline

Creates a NULL Shape referring to nothing.

◆ TopoDS_Shape() [2/2]

template<class T2 >
TopoDS_Shape::TopoDS_Shape ( T2 && theOther,
typename std::enable_if< opencascade::std::is_base_of< TopoDS_Shape, T2 >::value >::type * = 0 )
inline

Generalized move constructor, accepting also sub-classes (TopoDS_Shape hierarchy declares only fake sub-classes with no extra fields).

Member Function Documentation

◆ Checked() [1/2]

Standard_Boolean TopoDS_Shape::Checked ( ) const
inline

Returns the checked flag.

◆ Checked() [2/2]

void TopoDS_Shape::Checked ( Standard_Boolean theIsChecked)
inline

Sets the checked flag.

◆ Closed() [1/2]

Standard_Boolean TopoDS_Shape::Closed ( ) const
inline

Returns the closedness flag.

◆ Closed() [2/2]

void TopoDS_Shape::Closed ( Standard_Boolean theIsClosed)
inline

Sets the closedness flag.

◆ Complement()

void TopoDS_Shape::Complement ( )
inline

Complements the orientation, using the Complement method from the TopAbs package.

◆ Complemented()

TopoDS_Shape TopoDS_Shape::Complemented ( ) const
inline

Returns a shape similar to <me> with the orientation complemented, using the Complement method from the TopAbs package.

◆ Compose()

void TopoDS_Shape::Compose ( TopAbs_Orientation theOrient)
inline

Updates the Shape Orientation by composition with theOrient, using the Compose method from the TopAbs package.

◆ Composed()

TopoDS_Shape TopoDS_Shape::Composed ( TopAbs_Orientation theOrient) const
inline

Returns a shape similar to <me> with the orientation composed with theOrient, using the Compose method from the TopAbs package.

◆ Convex() [1/2]

Standard_Boolean TopoDS_Shape::Convex ( ) const
inline

Returns the convexness flag.

◆ Convex() [2/2]

void TopoDS_Shape::Convex ( Standard_Boolean theIsConvex)
inline

Sets the convexness flag.

◆ DumpJson()

void TopoDS_Shape::DumpJson ( Standard_OStream & theOStream,
Standard_Integer theDepth = -1 ) const

Dumps the content of me into the stream.

◆ EmptyCopied()

TopoDS_Shape TopoDS_Shape::EmptyCopied ( ) const
inline

Returns a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes.

◆ EmptyCopy()

void TopoDS_Shape::EmptyCopy ( )
inline

Replace <me> by a new Shape with the same Orientation and Location and a new TShape with the same geometry and no sub-shapes.

◆ Free() [1/2]

Standard_Boolean TopoDS_Shape::Free ( ) const
inline

Returns the free flag.

◆ Free() [2/2]

void TopoDS_Shape::Free ( Standard_Boolean theIsFree)
inline

Sets the free flag.

◆ Infinite() [1/2]

Standard_Boolean TopoDS_Shape::Infinite ( ) const
inline

Returns the infinity flag.

◆ Infinite() [2/2]

void TopoDS_Shape::Infinite ( Standard_Boolean theIsInfinite)
inline

Sets the infinity flag.

◆ IsEqual()

Standard_Boolean TopoDS_Shape::IsEqual ( const TopoDS_Shape & theOther) const
inline

Returns True if two shapes are equal, i.e. if they share the same TShape with the same Locations and Orientations.

◆ IsNotEqual()

Standard_Boolean TopoDS_Shape::IsNotEqual ( const TopoDS_Shape & theOther) const
inline

Negation of the IsEqual method.

◆ IsNull()

Standard_Boolean TopoDS_Shape::IsNull ( ) const
inline

Returns true if this shape is null. In other words, it references no underlying shape with the potential to be given a location and an orientation.

◆ IsPartner()

Standard_Boolean TopoDS_Shape::IsPartner ( const TopoDS_Shape & theOther) const
inline

Returns True if two shapes are partners, i.e. if they share the same TShape. Locations and Orientations may differ.

◆ IsSame()

Standard_Boolean TopoDS_Shape::IsSame ( const TopoDS_Shape & theOther) const
inline

Returns True if two shapes are same, i.e. if they share the same TShape with the same Locations. Orientations may differ.

◆ Located()

TopoDS_Shape TopoDS_Shape::Located ( const TopLoc_Location & theLoc,
const Standard_Boolean theRaiseExc = Standard_True ) const
inline

Returns a shape similar to <me> with the local coordinate system set to <Loc>.

◆ Location() [1/2]

const TopLoc_Location & TopoDS_Shape::Location ( ) const
inline

Returns the shape local coordinate system.

◆ Location() [2/2]

void TopoDS_Shape::Location ( const TopLoc_Location & theLoc,
const Standard_Boolean theRaiseExc = Standard_True )
inline

Sets the shape local coordinate system.

◆ Locked() [1/2]

Standard_Boolean TopoDS_Shape::Locked ( ) const
inline

Returns the locked flag.

◆ Locked() [2/2]

void TopoDS_Shape::Locked ( Standard_Boolean theIsLocked)
inline

Sets the locked flag.

◆ Modified() [1/2]

Standard_Boolean TopoDS_Shape::Modified ( ) const
inline

Returns the modification flag.

◆ Modified() [2/2]

void TopoDS_Shape::Modified ( Standard_Boolean theIsModified)
inline

Sets the modification flag.

◆ Move()

void TopoDS_Shape::Move ( const TopLoc_Location & thePosition,
const Standard_Boolean theRaiseExc = Standard_True )
inline

Multiplies the Shape location by thePosition.

◆ Moved()

TopoDS_Shape TopoDS_Shape::Moved ( const TopLoc_Location & thePosition,
const Standard_Boolean theRaiseExc = Standard_True ) const
inline

Returns a shape similar to <me> with a location multiplied by thePosition.

◆ NbChildren()

Standard_Integer TopoDS_Shape::NbChildren ( ) const
inline

Returns the number of direct sub-shapes (children).

See also
TopoDS_Iterator for accessing sub-shapes

◆ Nullify()

void TopoDS_Shape::Nullify ( )
inline

Destroys the reference to the underlying shape stored in this shape. As a result, this shape becomes null.

◆ operator!=()

Standard_Boolean TopoDS_Shape::operator!= ( const TopoDS_Shape & theOther) const
inline

◆ operator=()

template<class T2 >
std::enable_if< opencascade::std::is_base_of< TopoDS_Shape, T2 >::value, TopoDS_Shape >::type & TopoDS_Shape::operator= ( T2 && theOther)
inline

Generalized move assignment operator.

◆ operator==()

Standard_Boolean TopoDS_Shape::operator== ( const TopoDS_Shape & theOther) const
inline

◆ Orientable() [1/2]

Standard_Boolean TopoDS_Shape::Orientable ( ) const
inline

Returns the orientability flag.

◆ Orientable() [2/2]

void TopoDS_Shape::Orientable ( const Standard_Boolean theIsOrientable)
inline

Sets the orientability flag.

◆ Orientation() [1/2]

TopAbs_Orientation TopoDS_Shape::Orientation ( ) const
inline

Returns the shape orientation.

◆ Orientation() [2/2]

void TopoDS_Shape::Orientation ( TopAbs_Orientation theOrient)
inline

Sets the shape orientation.

◆ Oriented()

TopoDS_Shape TopoDS_Shape::Oriented ( TopAbs_Orientation theOrient) const
inline

Returns a shape similar to <me> with the orientation set to <Or>.

◆ Reverse()

void TopoDS_Shape::Reverse ( )
inline

Reverses the orientation, using the Reverse method from the TopAbs package.

◆ Reversed()

TopoDS_Shape TopoDS_Shape::Reversed ( ) const
inline

Returns a shape similar to <me> with the orientation reversed, using the Reverse method from the TopAbs package.

◆ ShapeType()

TopAbs_ShapeEnum TopoDS_Shape::ShapeType ( ) const
inline

Returns the value of the TopAbs_ShapeEnum enumeration that corresponds to this shape, for example VERTEX, EDGE, and so on. Exceptions Standard_NullObject if this shape is null.

◆ TShape() [1/2]

const Handle< TopoDS_TShape > & TopoDS_Shape::TShape ( ) const
inline

Returns a handle to the actual shape implementation.

◆ TShape() [2/2]

void TopoDS_Shape::TShape ( const Handle< TopoDS_TShape > & theTShape)
inline

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