// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _STEPControl_ActorRead_HeaderFile
#define _STEPControl_ActorRead_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_STEPControl_ActorRead.hxx>

#include <StepToTopoDS_NMTool.hxx>
#include <Standard_Real.hxx>
#include <Handle_StepRepr_Representation.hxx>
#include <Transfer_ActorOfTransientProcess.hxx>
#include <Standard_Boolean.hxx>
#include <Handle_Standard_Transient.hxx>
#include <Handle_Transfer_Binder.hxx>
#include <Handle_Transfer_TransientProcess.hxx>
#include <Handle_StepGeom_Axis2Placement3d.hxx>
#include <Handle_StepRepr_RepresentationRelationship.hxx>
#include <Handle_TransferBRep_ShapeBinder.hxx>
#include <Handle_StepBasic_ProductDefinition.hxx>
#include <Handle_StepRepr_NextAssemblyUsageOccurrence.hxx>
#include <Handle_StepShape_ShapeRepresentation.hxx>
#include <Handle_StepShape_ContextDependentShapeRepresentation.hxx>
#include <Handle_StepRepr_ShapeRepresentationRelationship.hxx>
#include <Standard_Integer.hxx>
#include <Handle_StepGeom_GeometricRepresentationItem.hxx>
#include <Handle_StepRepr_MappedItem.hxx>
#include <Handle_StepShape_FaceSurface.hxx>
class StepRepr_Representation;
class Standard_Transient;
class Transfer_Binder;
class Transfer_TransientProcess;
class StepGeom_Axis2Placement3d;
class gp_Trsf;
class StepRepr_RepresentationRelationship;
class TransferBRep_ShapeBinder;
class StepBasic_ProductDefinition;
class StepRepr_NextAssemblyUsageOccurrence;
class StepShape_ShapeRepresentation;
class StepShape_ContextDependentShapeRepresentation;
class StepRepr_ShapeRepresentationRelationship;
class StepGeom_GeometricRepresentationItem;
class StepRepr_MappedItem;
class StepShape_FaceSurface;
class TopoDS_Shell;
class TopTools_ListOfShape;
class TopoDS_Compound;
class TopTools_IndexedDataMapOfShapeListOfShape;


//! This class performs the transfer of an Entity from
//! AP214 and AP203, either Geometric or Topologic.
//!
//! I.E. for each type of Entity, it invokes the appropriate Tool
//! then returns the Binder which contains the Result
class STEPControl_ActorRead : public Transfer_ActorOfTransientProcess
{

public:

  
  Standard_EXPORT STEPControl_ActorRead();
  
  Standard_EXPORT virtual   Standard_Boolean Recognize (const Handle(Standard_Transient)& start) ;
  
  Standard_EXPORT virtual   Handle(Transfer_Binder) Transfer (const Handle(Standard_Transient)& start, const Handle(Transfer_TransientProcess)& TP) ;
  
  Standard_EXPORT   Handle(Transfer_Binder) TransferShape (const Handle(Standard_Transient)& start, const Handle(Transfer_TransientProcess)& TP, const Standard_Boolean isManifold = Standard_True) ;
  
  //! set units and tolerances context by given ShapeRepresentation
  Standard_EXPORT   void PrepareUnits (const Handle(StepRepr_Representation)& rep, const Handle(Transfer_TransientProcess)& TP) ;
  
  //! reset units and tolerances context to default
  //! (mm, radians, read.precision.val, etc.)
  Standard_EXPORT   void ResetUnits() ;
  
  //! Computes transformation defined by two axis placements (in MAPPED_ITEM
  //! or ITEM_DEFINED_TRANSFORMATION) taking into account their
  //! representation contexts (i.e. units, which may be different)
  //! Returns True if transformation is computed and is not an identity.
  Standard_EXPORT   Standard_Boolean ComputeTransformation (const Handle(StepGeom_Axis2Placement3d)& Origin, const Handle(StepGeom_Axis2Placement3d)& Target, const Handle(StepRepr_Representation)& OrigContext, const Handle(StepRepr_Representation)& TargContext, const Handle(Transfer_TransientProcess)& TP, gp_Trsf& Trsf) ;
  
  //! Computes transformation defined by given
  //! REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION
  Standard_EXPORT   Standard_Boolean ComputeSRRWT (const Handle(StepRepr_RepresentationRelationship)& SRR, const Handle(Transfer_TransientProcess)& TP, gp_Trsf& Trsf) ;




  DEFINE_STANDARD_RTTI(STEPControl_ActorRead)

protected:

  
  //! Transfers product definition entity
  Standard_EXPORT   Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepBasic_ProductDefinition)& PD, const Handle(Transfer_TransientProcess)& TP) ;
  
  //! Transfers next assembly usage occurence entity
  Standard_EXPORT   Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO, const Handle(Transfer_TransientProcess)& TP) ;
  
  //! Transfers shape representation entity
  Standard_EXPORT   Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepShape_ShapeRepresentation)& sr, const Handle(Transfer_TransientProcess)& TP, Standard_Boolean& isBound) ;
  
  //! Transfers context dependent shape representation entity
  Standard_EXPORT   Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR, const Handle(Transfer_TransientProcess)& TP) ;
  
  //! Transfers  shape representation relationship entity
  Standard_EXPORT   Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepRepr_ShapeRepresentationRelationship)& und, const Handle(Transfer_TransientProcess)& TP, const Standard_Integer nbrep = 0) ;
  
  //! Transfers  geometric representation item entity such as ManifoldSolidBRep ,...etc
  Standard_EXPORT   Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepGeom_GeometricRepresentationItem)& git, const Handle(Transfer_TransientProcess)& TP, const Standard_Boolean isManifold) ;
  
  //! Transfers  mapped item
  Standard_EXPORT   Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepRepr_MappedItem)& mapit, const Handle(Transfer_TransientProcess)& TP) ;
  
  //! Transfers  FaceSurface entity
  Standard_EXPORT   Handle(TransferBRep_ShapeBinder) TransferEntity (const Handle(StepShape_FaceSurface)& fs, const Handle(Transfer_TransientProcess)& TP) ;
  
  //! Tranlates file by old way when CDSR are roots . Acts only if "read.step.product_mode" is equal Off.
  Standard_EXPORT   Handle(TransferBRep_ShapeBinder) OldWay (const Handle(Standard_Transient)& start, const Handle(Transfer_TransientProcess)& TP) ;



private: 

  
  Standard_EXPORT   TopoDS_Shell closeIDEASShell (const TopoDS_Shell& shell, const TopTools_ListOfShape& closingShells) ;
  
  Standard_EXPORT   void computeIDEASClosings (const TopoDS_Compound& comp, TopTools_IndexedDataMapOfShapeListOfShape& shellClosingMap) ;

  StepToTopoDS_NMTool myNMTool;
  Standard_Real myPrecision;
  Standard_Real myMaxTol;
  Handle(StepRepr_Representation) mySRContext;


};







#endif // _STEPControl_ActorRead_HeaderFile
