Warnings on vc14 were eliminated
[occt.git] / src / STEPControl / STEPControl_ActorRead.cxx
index 3afe546..42b2ca0 100644 (file)
@@ -86,8 +86,7 @@
 #include <StepShape_ShapeDefinitionRepresentation.hxx>
 #include <StepShape_ShapeRepresentation.hxx>
 #include <StepShape_ShellBasedSurfaceModel.hxx>
-#include <StepToGeom_MakeAxis2Placement.hxx>
-#include <StepToGeom_MakeTransformation3d.hxx>
+#include <StepToGeom.hxx>
 #include <StepToTopoDS_Builder.hxx>
 #include <StepToTopoDS_DataMapOfTRI.hxx>
 #include <StepToTopoDS_MakeTransformed.hxx>
 #include <XSAlgo.hxx>
 #include <XSAlgo_AlgoContainer.hxx>
 
+IMPLEMENT_STANDARD_RTTIEXT(STEPControl_ActorRead,Transfer_ActorOfTransientProcess)
+
 // #include <Interface_InterfaceModel.hxx>  // pour mise au point
 // MappedItem :
 // FaceSurface :
@@ -191,7 +192,7 @@ namespace {
   // The better way is to pass this information via binder or via TopoDS_Shape itself, however,
   // this is very specific info to do so...
   Standard_Boolean NM_DETECTED = Standard_False;
-};
+}
 
 // ============================================================================
 // Method  : STEPControl_ActorRead::STEPControl_ActorRead  ()    
@@ -678,7 +679,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
       IsDepend=Standard_True;
       Handle(StepRepr_RepresentationRelationship) RR = CDSR->RepresentationRelation();
       if (RR.IsNull()) continue;
-      SRRReversed = STEPConstruct_Assembly::CheckSRRReversesNAUO ( TP->Model(), CDSR );
+      SRRReversed = STEPConstruct_Assembly::CheckSRRReversesNAUO ( graph, CDSR );
       Handle(StepRepr_Representation) rep = ( SRRReversed ? RR->Rep2() : RR->Rep1() );
       iatrsf = ComputeSRRWT ( RR, TP, Trsf );
       // find real ProductDefinition used rep
@@ -753,7 +754,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
   if(!Recognize(sr))
     return shbinder;
   isBound = Standard_False;
-  Standard_Integer i,nb = sr->NbItems();
+  Standard_Integer nb = sr->NbItems();
   // Used in XSAlgo::AlgoContainer()->ProcessShape (ssv; 13.11.2010)
   Standard_Integer nbTPitems = TP->NbMapped();
   Handle(Message_Messenger) sout = TP->Messenger();
@@ -774,7 +775,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
   Message_ProgressSentry PS ( TP->GetProgress(), "Sub-assembly", 0, nb, 1 );
 
   // [BEGIN] Proceed with non-manifold topology (ssv; 12.11.2010)
-  Standard_Boolean isNMMode = Interface_Static::IVal("read.step.nonmanifold");
+  Standard_Boolean isNMMode = Interface_Static::IVal("read.step.nonmanifold") != 0;
   Standard_Boolean isManifold = Standard_True;
   if ( isNMMode && sr->IsKind(STANDARD_TYPE(StepShape_NonManifoldSurfaceShapeRepresentation)) ) {
     isManifold = Standard_False;
@@ -804,7 +805,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
   myNMTool.SetActive(!isManifold && isNMMode);
   // [END] Proceed with non-manifold topology (ssv; 12.11.2010)
 
-  for (i = 1; i <= nb && PS.More(); i ++,PS.Next()) {
+  for (Standard_Integer i = 1; i <= nb && PS.More(); i ++,PS.Next()) {
   //for (i = 1; i <= nb ; i ++) {
     #ifdef TRANSLOG
     if (TP->TraceLevel() > 2) 
@@ -856,7 +857,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
       // Make compound to store closed Shells
       TopoDS_Compound compWithClosings;
       brepBuilder.MakeCompound(compWithClosings);
-
+      
       // Attempt to close Shells one-by-one
       for (Standard_Integer i = 1; i <= shellClosingsMap.Extent(); i++) {
         TopoDS_Shell adjustedShell = this->closeIDEASShell( TopoDS::Shell( shellClosingsMap.FindKey(i) ),
@@ -927,7 +928,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
   //DeclareAndCast(StepRepr_RepresentationRelationship,SRR,CDSR->RepresentationRelation());
   if ( SRR.IsNull() ) return shbinder;
   
-  Standard_Boolean SRRReversed = STEPConstruct_Assembly::CheckSRRReversesNAUO ( TP->Model(), CDSR );
+  Standard_Boolean SRRReversed = STEPConstruct_Assembly::CheckSRRReversesNAUO ( TP->Graph(), CDSR );
   Handle(StepRepr_Representation) rep1 = ( SRRReversed ? SRR->Rep2() : SRR->Rep1() );
   Handle(StepShape_ShapeRepresentation) rep = Handle(StepShape_ShapeRepresentation)::DownCast(rep1);
 
@@ -1327,7 +1328,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(const Han
       Handle(StepGeom_CartesianTransformationOperator3d) CartOp =
         Handle(StepGeom_CartesianTransformationOperator3d)::DownCast(mapit->MappingTarget());
       if ( ! CartOp.IsNull() ) {
-        ok = StepToGeom_MakeTransformation3d::Convert( CartOp, Trsf );
+        ok = StepToGeom::MakeTransformation3d (CartOp, Trsf);
       }
       else {
         Handle(StepGeom_Axis2Placement3d) Origin = 
@@ -1658,11 +1659,9 @@ Standard_Boolean STEPControl_ActorRead::ComputeTransformation (const Handle(Step
   // translate axis_placements taking units into account 
   Handle(StepRepr_Representation) oldSRContext = mySRContext;
   if ( OrigContext  != oldSRContext ) PrepareUnits(OrigContext,TP);
-  Handle(Geom_Axis2Placement) theOrig;
-  StepToGeom_MakeAxis2Placement::Convert(org,theOrig);
+  Handle(Geom_Axis2Placement) theOrig = StepToGeom::MakeAxis2Placement (org);
   if ( TargContext  != OrigContext  ) PrepareUnits(TargContext,TP);
-  Handle(Geom_Axis2Placement) theTarg;
-  StepToGeom_MakeAxis2Placement::Convert(trg,theTarg);
+  Handle(Geom_Axis2Placement) theTarg = StepToGeom::MakeAxis2Placement (trg);
   if ( oldSRContext != TargContext  ) PrepareUnits(oldSRContext,TP);
 
   gp_Ax3 ax3Orig(theOrig->Ax2());
@@ -1697,7 +1696,7 @@ Standard_Boolean STEPControl_ActorRead::ComputeSRRWT (const Handle(StepRepr_Repr
     // reset units (by Rep2 - ?)
     Handle(StepRepr_Representation) oldSRContext = mySRContext;
     if ( SRR->Rep2() != oldSRContext ) PrepareUnits(SRR->Rep2(),TP);
-    StepToGeom_MakeTransformation3d::Convert( CartOp, Trsf );
+    StepToGeom::MakeTransformation3d (CartOp, Trsf);
     if ( SRR->Rep2() != oldSRContext ) PrepareUnits(oldSRContext,TP);
     return Trsf.Form() != gp_Identity;
   }