Back to index

salome-geom  6.5.0
Public Member Functions | Protected Member Functions | Protected Attributes
ShHealOper_ChangeOrientation Class Reference

Class ShHealOper_ChangeOrientation. More...

#include <ShHealOper_ChangeOrientation.hxx>

Inheritance diagram for ShHealOper_ChangeOrientation:
Inheritance graph
[legend]
Collaboration diagram for ShHealOper_ChangeOrientation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Standard_EXPORT ShHealOper_ChangeOrientation ()
 Empty constructor.
Standard_EXPORT ShHealOper_ChangeOrientation (const TopoDS_Shape &theShape)
 Copy constructor.
virtual Standard_EXPORT void Init (const TopoDS_Shape &theShape)
Standard_EXPORT Standard_Boolean Perform ()
const TopoDS_Shape & GetResultShape () const
Standard_Boolean GetModifiedShape (const TopoDS_Shape &theOldShape, TopoDS_Shape &theNewShape) const
Standard_Boolean IsDone () const
void SetContext (Handle(ShapeBuild_ReShape)&theContext)
 Handle (ShapeBuild_ReShape) Context()
Standard_Integer GetErrorStatus ()

Protected Member Functions

 Handle (ShapeBuild_ReShape) myContext

Protected Attributes

TopoDS_Shape myInitShape
TopoDS_Shape myResultShape
Standard_Boolean myDone
ShHealOper_Error myErrorStatus

Detailed Description

Class ShHealOper_ChangeOrientation.

Definition at line 39 of file ShHealOper_ChangeOrientation.hxx.


Constructor & Destructor Documentation

Empty constructor.

Definition at line 45 of file ShHealOper_ChangeOrientation.hxx.

{}

Copy constructor.

Definition at line 39 of file ShHealOper_ChangeOrientation.cxx.

{
  Init(theShape);
}

Here is the call graph for this function:


Member Function Documentation

Standard_Integer ShHealOper_Tool::GetErrorStatus ( ) [inline, inherited]

Definition at line 90 of file ShHealOper_Tool.hxx.

  {
    return myErrorStatus;
  }

Here is the caller graph for this function:

Standard_Boolean ShHealOper_Tool::GetModifiedShape ( const TopoDS_Shape &  theOldShape,
TopoDS_Shape &  theNewShape 
) const [inline, inherited]

Definition at line 64 of file ShHealOper_Tool.hxx.

  {
    theNewShape = myContext->Apply(theOldShape);
    return (!theNewShape.IsSame(theOldShape));
  }
const TopoDS_Shape& ShHealOper_Tool::GetResultShape ( ) const [inline, inherited]

Definition at line 57 of file ShHealOper_Tool.hxx.

  {
    return myResultShape;

  }

Here is the caller graph for this function:

ShHealOper_Tool::Handle ( ShapeBuild_ReShape  ) [inline, inherited]

Definition at line 84 of file ShHealOper_Tool.hxx.

  {
    return myContext;
  }

Here is the caller graph for this function:

ShHealOper_Tool::Handle ( ShapeBuild_ReShape  ) [protected, inherited]
void ShHealOper_ChangeOrientation::Init ( const TopoDS_Shape &  theShape) [virtual]

Reimplemented from ShHealOper_Tool.

Definition at line 49 of file ShHealOper_ChangeOrientation.cxx.

{
  ShHealOper_Tool::Init(theShape);
}

Here is the caller graph for this function:

Standard_Boolean ShHealOper_Tool::IsDone ( ) const [inline, inherited]

Definition at line 72 of file ShHealOper_Tool.hxx.

  {
    return myDone;
  }

Definition at line 59 of file ShHealOper_ChangeOrientation.cxx.

{
  BRep_Builder B;
  if (myInitShape.ShapeType() == TopAbs_SHELL) {
    myResultShape = myInitShape.EmptyCopied();
    TopoDS_Iterator itr (myInitShape);
    while (itr.More()) {
      B.Add(myResultShape,itr.Value().Reversed());
      itr.Next();
    }
  }
  else if (myInitShape.ShapeType() == TopAbs_FACE) {
    myResultShape = myInitShape.EmptyCopied();
    TopoDS_Iterator itr (myInitShape);
    while (itr.More()) {
      B.Add(myResultShape,itr.Value());
      itr.Next();
    }
    myResultShape.Reverse();
  }
  else if ( myInitShape.ShapeType() == TopAbs_WIRE || myInitShape.ShapeType() == TopAbs_EDGE) {
    myResultShape = myInitShape.EmptyCopied();
    TopoDS_Iterator itr (myInitShape);
    while (itr.More()) {
      B.Add(myResultShape,itr.Value());
      itr.Next();
    }
    myResultShape.Reverse();
  }
  else {
    BRepBuilderAPI_Copy Copy (myInitShape);
    if (!Copy.IsDone()) return false;

    myResultShape = Copy.Shape();
    if (myResultShape.IsNull()) return false;

    if (myResultShape.Orientation() == TopAbs_FORWARD)
      myResultShape.Orientation(TopAbs_REVERSED);
    else
      myResultShape.Orientation(TopAbs_FORWARD);
  }

  return true;
}

Here is the caller graph for this function:

void ShHealOper_Tool::SetContext ( Handle(ShapeBuild_ReShape)&  theContext) [inline, inherited]

Definition at line 78 of file ShHealOper_Tool.hxx.

  {
    myContext = theContext;
  }

Member Data Documentation

Standard_Boolean ShHealOper_Tool::myDone [protected, inherited]

Definition at line 100 of file ShHealOper_Tool.hxx.

Definition at line 101 of file ShHealOper_Tool.hxx.

TopoDS_Shape ShHealOper_Tool::myInitShape [protected, inherited]

Definition at line 98 of file ShHealOper_Tool.hxx.

TopoDS_Shape ShHealOper_Tool::myResultShape [protected, inherited]

Definition at line 99 of file ShHealOper_Tool.hxx.


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