0024023: Revamp the OCCT Handle -- ambiguity
authorabv <abv@opencascade.com>
Thu, 2 Jul 2015 14:06:37 +0000 (17:06 +0300)
committerabv <abv@opencascade.com>
Sat, 11 Jul 2015 09:08:07 +0000 (12:08 +0300)
Code corrected to avoid ambiguous situations due to changed implementation of Handle (overloaded methods accepting handles of different types).
In Adaptor3d_CurveOnSurface added method Load() with two parameters, allowing to avoid ambiguity of cast of handles when calling separate methods Load() for curve and surface, replacing by single call.
In DrawTrSurf and IGESData_IGESWriter, template variants of methods Set() and Send(), respectively, are added to avoid ambiguity when these methods are called with handles to derived types (using SFINAE).
In NCollection_DefineHSequence, method Append() accepting handle to another HSequence is made template, to be available only if argument has compatible type.

69 files changed:
src/AIS/AIS_IdenticRelation.cxx
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_LocalContext.cxx
src/AIS/AIS_LocalContext_1.cxx
src/AIS/AIS_MidPointRelation.cxx
src/AIS/AIS_PlaneTrihedron.cxx
src/AIS/AIS_Trihedron.cxx
src/Adaptor3d/Adaptor3d_CurveOnSurface.cdl
src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx
src/BOPTest/BOPTest_BOPCommands.cxx
src/BOPTools/BOPTools_AlgoTools2D_1.cxx
src/BOPTools/BOPTools_AlgoTools_1.cxx
src/BRepAdaptor/BRepAdaptor_Curve.cxx
src/BRepCheck/BRepCheck_Edge.cxx
src/BRepFeat/BRepFeat_RibSlot.cxx
src/BRepFill/BRepFill_Filling.cxx
src/BRepFill/BRepFill_NSections.cxx
src/BRepFill/BRepFill_Sweep.cxx
src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx
src/BRepLib/BRepLib.cxx
src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx
src/BRepTest/BRepTest_BasicCommands.cxx
src/BRepTest/BRepTest_FilletCommands.cxx
src/BRepTest/BRepTest_FillingCommands.cxx
src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx
src/Bisector/Bisector_Bisec.cxx
src/ChFi3d/ChFi3d_Builder.cdl
src/ChFi3d/ChFi3d_Builder_0.cxx
src/ChFi3d/ChFi3d_Builder_0.hxx
src/ChFi3d/ChFi3d_Builder_2.cxx
src/ChFi3d/ChFi3d_FilBuilder.cxx
src/DrawTrSurf/DrawTrSurf.cdl
src/ExprIntrp/ExprIntrp_yaccintrf.cxx
src/Font/Font_BRepFont.cxx
src/Font/Font_BRepFont.hxx
src/GeomLib/GeomLib.cxx
src/GeomToIGES/GeomToIGES_GeomCurve.cxx
src/GeomToStep/GeomToStep_MakeCurve.cxx
src/GeometryTest/GeometryTest_API2dCommands.cxx
src/GeometryTest/GeometryTest_APICommands.cxx
src/GeometryTest/GeometryTest_ConstraintCommands.cxx
src/GeomliteTest/GeomliteTest_API2dCommands.cxx
src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx
src/IGESData/IGESData_BasicEditor.cxx
src/IGESData/IGESData_IGESWriter.cdl
src/IGESToBRep/IGESToBRep_Reader.cxx
src/IntTools/IntTools_Context.cxx
src/NCollection/NCollection_DefineHSequence.hxx
src/QABugs/QABugs_10.cxx
src/QABugs/QABugs_11.cxx
src/QABugs/QABugs_13.cxx
src/QABugs/QABugs_16.cxx
src/QABugs/QABugs_17.cxx
src/SWDRAW/SWDRAW_ShapeTool.cxx
src/ShapeAnalysis/ShapeAnalysis_Edge.cxx
src/ShapeBuild/ShapeBuild_Edge.cxx
src/ShapeConstruct/ShapeConstruct.cxx
src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx
src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx
src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx
src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.cxx
src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx
src/StepData/StepData_StepModel.cxx
src/StepData/StepData_StepReaderData.cxx
src/TDF/TDF_Data.cxx
src/TestTopOpe/TestTopOpe_CORCommands.cxx
src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx
src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx
src/XSControl/XSControl_Functions.cxx

index 3b6cbcc..a57d981 100644 (file)
@@ -423,7 +423,7 @@ void AIS_IdenticRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aS
              Handle(Geom_Circle) thecirc = Handle(Geom_Circle)::DownCast (curv1);
              Standard_Real udeb = ElCLib::Parameter(thecirc->Circ(),myFAttach);
              Standard_Real ufin = ElCLib::Parameter(thecirc->Circ(),mySAttach);
-             Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(thecirc,udeb,ufin);
+             Handle(Geom_Curve) thecu = new Geom_TrimmedCurve(thecirc,udeb,ufin);
       
              Handle(Select3D_SensitiveCurve) scurv = new Select3D_SensitiveCurve(own, thecu);
              aSelection->Add(scurv);
@@ -437,7 +437,7 @@ void AIS_IdenticRelation::ComputeSelection(const Handle(SelectMgr_Selection)& aS
 
              Standard_Real udeb = ElCLib::Parameter(theEll->Elips(),myFAttach);
              Standard_Real ufin = ElCLib::Parameter(theEll->Elips(),mySAttach);
-             Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(theEll,udeb,ufin);
+             Handle(Geom_Curve) thecu = new Geom_TrimmedCurve(theEll,udeb,ufin);
       
              Handle(Select3D_SensitiveCurve) scurv = new Select3D_SensitiveCurve(own, thecu);
              aSelection->Add(scurv);
index ff0cad7..9aba993 100644 (file)
@@ -124,7 +124,8 @@ void AIS_InteractiveContext::Delete() const
 
   // let's remove one reference explicitly. this operation's supposed to
   // be performed when mgrSelector will be destroyed but anyway...
-  mgrSelector->Remove (myMainSel);
+  const Handle(SelectMgr_ViewerSelector)& aSelector = myMainSel; // to avoid ambiguity
+  mgrSelector->Remove (aSelector);
 
   Handle(AIS_InteractiveContext) aNullContext;
   for (AIS_DataMapIteratorOfDataMapOfIOStatus anObjIter (myObjects); anObjIter.More(); anObjIter.Next())
@@ -458,7 +459,8 @@ void AIS_InteractiveContext::Display (const Handle(AIS_InteractiveObject)& theIO
     myMainPM->Display(theIObj, theDispMode);
     if (theSelectionMode != -1)
     {
-      if (!mgrSelector->Contains (theIObj))
+      const Handle(SelectMgr_SelectableObject)& anObj = theIObj; // to avoid ambiguity
+      if (!mgrSelector->Contains (anObj))
       {
         mgrSelector->Load (theIObj);
       }
@@ -510,7 +512,8 @@ void AIS_InteractiveContext::Display (const Handle(AIS_InteractiveObject)& theIO
     }
     if (theSelectionMode != -1)
     {
-      if (!mgrSelector->Contains (theIObj))
+      const Handle(SelectMgr_SelectableObject)& anObj = theIObj; // to avoid ambiguity
+      if (!mgrSelector->Contains (anObj))
       {
         mgrSelector->Load (theIObj);
       }
@@ -563,7 +566,8 @@ void AIS_InteractiveContext::Load (const Handle(AIS_InteractiveObject)& theIObj,
     }
 
     // Register theIObj in the selection manager to prepare further activation of selection
-    if (!mgrSelector->Contains (theIObj))
+    const Handle(SelectMgr_SelectableObject)& anObj = theIObj; // to avoid ambiguity
+    if (!mgrSelector->Contains (anObj))
     {
       mgrSelector->Load (theIObj);
     }
@@ -2380,7 +2384,8 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t
   {
     // for cases when reference shape of connected interactives was not displayed
     // but its selection primitives were calculated
-    mgrSelector->Remove (theIObj);
+    const Handle(SelectMgr_SelectableObject)& anObj = theIObj; // to avoid ambiguity
+    mgrSelector->Remove (anObj);
     return;
   }
 
@@ -2429,7 +2434,8 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t
   }
 
   // remove IO from the selection manager to avoid memory leaks
-  mgrSelector->Remove (theIObj);
+  const Handle(SelectMgr_SelectableObject)& anObj = theIObj; // to avoid ambiguity
+  mgrSelector->Remove (anObj);
 
   myObjects.UnBind (theIObj);
   myMainVwr->Viewer()->UnregisterObject (theIObj);
@@ -2823,13 +2829,15 @@ void AIS_InteractiveContext::Disconnect (const Handle(AIS_InteractiveObject)& th
   {
     Handle(AIS_MultipleConnectedInteractive) theObj (Handle(AIS_MultipleConnectedInteractive)::DownCast (theAssembly));
     theObj->Disconnect (theObjToDisconnect);
-    mgrSelector->Remove (theObjToDisconnect);
+    const Handle(SelectMgr_SelectableObject)& anObj = theObjToDisconnect; // to avoid ambiguity
+    mgrSelector->Remove (anObj);
   }
   else if (theAssembly->IsInstance ("AIS_ConnectedInteractive") && theObjToDisconnect.IsNull())
   {
     Handle(AIS_ConnectedInteractive) theObj (Handle(AIS_ConnectedInteractive)::DownCast (theAssembly));
     theObj->Disconnect();
-    mgrSelector->Remove (theObj);
+    const Handle(SelectMgr_SelectableObject)& anObj = theObj; // to avoid ambiguity
+    mgrSelector->Remove (anObj);
   }
   else
     return;
index b9f6b74..8a8ec68 100644 (file)
@@ -308,7 +308,8 @@ Erase(const Handle(AIS_InteractiveObject)& anInteractive)
   }
 
   // Deactivate selectable entities of interactive object
-  if (mySM->Contains (anInteractive))
+  const Handle(SelectMgr_SelectableObject)& anObj = anInteractive; // to avoid ambiguity
+  if (mySM->Contains (anObj))
   {
     TColStd_ListIteratorOfListOfInteger aModeIter (STAT->SelectionModes());
     for (; aModeIter.More(); aModeIter.Next())
@@ -475,9 +476,10 @@ Standard_Boolean AIS_LocalContext::Remove(const Handle(AIS_InteractiveObject)& a
   }
 
   // Remove the interactive object from selection manager
-  if (mySM->Contains (aSelectable))
+  const Handle(SelectMgr_SelectableObject)& anObj = aSelectable; // to avoid ambiguity
+  if (mySM->Contains (anObj))
   {
-    mySM->Remove (aSelectable);
+    mySM->Remove (anObj);
   }
   ClearOutdatedSelection (aSelectable, Standard_True);
 
index 2d57d56..0d62d97 100644 (file)
@@ -1020,7 +1020,7 @@ void AIS_LocalContext::SetSelected(const Handle(AIS_InteractiveObject)& anIObj,
       }
     }
     if(EO.IsNull()) 
-      EO = new SelectMgr_EntityOwner(anIObj);
+      EO = new SelectMgr_EntityOwner((const Handle(SelectMgr_SelectableObject)&)anIObj);
   }
   
   ClearSelected(Standard_False);
@@ -1059,7 +1059,7 @@ void AIS_LocalContext::AddOrRemoveSelected(const Handle(AIS_InteractiveObject)&
     }
     if(EO.IsNull())
     {
-      EO = new SelectMgr_EntityOwner(anIObj);
+      EO = new SelectMgr_EntityOwner((const Handle(SelectMgr_SelectableObject)&)anIObj);
     }
   }
   
@@ -1315,7 +1315,7 @@ Standard_Boolean AIS_LocalContext::IsValidForSelection(const Handle(AIS_Interact
   Handle(AIS_Shape) shape = Handle(AIS_Shape)::DownCast(anIObj);
   if( !shape.IsNull() ) 
     return myFilters->IsOk(new StdSelect_BRepOwner(shape->Shape(),shape));
-  return myFilters->IsOk(new SelectMgr_EntityOwner(anIObj));
+  return myFilters->IsOk(new SelectMgr_EntityOwner((const Handle(SelectMgr_SelectableObject)&)anIObj));
 }
 
 
index 89eac2c..d600054 100644 (file)
@@ -189,7 +189,7 @@ void AIS_MidPointRelation::ComputeSelection(const Handle(SelectMgr_Selection)& a
   ax.SetLocation(myMidPoint);
   Standard_Real rad = myFAttach.Distance(myMidPoint)/20.0;
   gp_Circ aCircleM (ax,rad);
-  Handle(Geom_Circle) thecir = new Geom_Circle(aCircleM);
+  Handle(Geom_Curve) thecir = new Geom_Circle(aCircleM);
   Handle(Select3D_SensitiveCurve) scurv = new Select3D_SensitiveCurve(own, thecir);
   aSel->Add(scurv);
 
@@ -215,7 +215,7 @@ void AIS_MidPointRelation::ComputeSelection(const Handle(SelectMgr_Selection)& a
          Handle(Geom_Circle) thecirc = Handle(Geom_Circle)::DownCast (curv);
          Standard_Real udeb = ElCLib::Parameter(thecirc->Circ(),myFirstPnt1);
          Standard_Real ufin = ElCLib::Parameter(thecirc->Circ(),myFirstPnt2);
-         Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(thecirc,udeb,ufin);
+         Handle(Geom_Curve) thecu = new Geom_TrimmedCurve(thecirc,udeb,ufin);
          
          scurv = new Select3D_SensitiveCurve(own, thecu);
          aSel->Add(scurv);
@@ -226,7 +226,7 @@ void AIS_MidPointRelation::ComputeSelection(const Handle(SelectMgr_Selection)& a
          Handle(Geom_Ellipse) theEll = Handle(Geom_Ellipse)::DownCast (curv);
          Standard_Real udeb = ElCLib::Parameter(theEll->Elips(),myFirstPnt1);
          Standard_Real ufin = ElCLib::Parameter(theEll->Elips(),myFirstPnt2);
-         Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(theEll,udeb,ufin);
+         Handle(Geom_Curve) thecu = new Geom_TrimmedCurve(theEll,udeb,ufin);
          
          scurv = new Select3D_SensitiveCurve(own, thecu);
          aSel->Add(scurv);
@@ -250,7 +250,7 @@ void AIS_MidPointRelation::ComputeSelection(const Handle(SelectMgr_Selection)& a
          Handle(Geom_Circle) thecirc = Handle(Geom_Circle)::DownCast (curv);
          Standard_Real udeb = ElCLib::Parameter(thecirc->Circ(),mySecondPnt1);
          Standard_Real ufin = ElCLib::Parameter(thecirc->Circ(),mySecondPnt2);
-         Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(thecirc,udeb,ufin);
+         Handle(Geom_Curve) thecu = new Geom_TrimmedCurve(thecirc,udeb,ufin);
          
          scurv = new Select3D_SensitiveCurve(own, thecu);
          aSel->Add(scurv);
@@ -261,7 +261,7 @@ void AIS_MidPointRelation::ComputeSelection(const Handle(SelectMgr_Selection)& a
          Handle(Geom_Ellipse) theEll = Handle(Geom_Ellipse)::DownCast (curv);
          Standard_Real udeb = ElCLib::Parameter(theEll->Elips(),mySecondPnt1);
          Standard_Real ufin = ElCLib::Parameter(theEll->Elips(),mySecondPnt2);
-         Handle(Geom_TrimmedCurve) thecu = new Geom_TrimmedCurve(theEll,udeb,ufin);
+         Handle(Geom_Curve) thecu = new Geom_TrimmedCurve(theEll,udeb,ufin);
          
          scurv = new Select3D_SensitiveCurve(own, thecu);
          aSel->Add(scurv);
index 7ea3d8a..ac9583c 100644 (file)
@@ -210,7 +210,8 @@ void AIS_PlaneTrihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSe
   case 1:
     {  //origine
       Prior = 8;
-      eown= new SelectMgr_EntityOwner(myShapes[0],Prior);
+      const Handle(SelectMgr_SelectableObject)& anObj = myShapes[0]; // to avoid ambiguity
+      eown= new SelectMgr_EntityOwner(anObj,Prior);
       aSelection->Add(new Select3D_SensitivePoint(eown,myPlane->Location()));
 
       break;
@@ -219,7 +220,8 @@ void AIS_PlaneTrihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSe
     { //axes ... priorite 7
       Prior = 7;
       for (Standard_Integer i=1; i<=2;i++){
-       eown= new SelectMgr_EntityOwner(myShapes[i],Prior);
+        const Handle(SelectMgr_SelectableObject)& anObj = myShapes[i]; // to avoid ambiguity
+       eown= new SelectMgr_EntityOwner(anObj,Prior);
        aSelection->Add(new Select3D_SensitiveSegment(eown,PP(1),PP(i+1)));
 
       }
index aa75b76..34decac 100644 (file)
@@ -324,7 +324,8 @@ void AIS_Trihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSelecti
   case 1:
     {  //origin : 
       Prior = 8;
-      eown= new SelectMgr_EntityOwner(myShapes[0],Prior);
+      const Handle(SelectMgr_SelectableObject)& anObj = myShapes[0]; // to avoid ambiguity
+      eown= new SelectMgr_EntityOwner(anObj,Prior);
       
       aSelection->Add(new Select3D_SensitivePoint (eown,myComponent->Location()));
       // If the trihedron's shapes display and selection modes are the same
@@ -342,7 +343,8 @@ void AIS_Trihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSelecti
     {  //axes ... priority 7
       Prior = 7;
       for (Standard_Integer i=1; i<=3;i++){
-       eown= new SelectMgr_EntityOwner(myShapes[i],Prior);
+        const Handle(SelectMgr_SelectableObject)& anObj = myShapes[i]; // to avoid ambiguity
+       eown= new SelectMgr_EntityOwner(anObj,Prior);
        aSelection->Add(new Select3D_SensitiveSegment(eown,PP(1),PP(i+1)));
 
       }
@@ -379,15 +381,18 @@ void AIS_Trihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSelecti
       Prior =5;
       
       
-      eown= new SelectMgr_EntityOwner(myShapes[4],Prior);
+      const Handle(SelectMgr_SelectableObject)& anObj4 = myShapes[4]; // to avoid ambiguity
+      eown= new SelectMgr_EntityOwner(anObj4,Prior);
 //      PO(2) = PP(2);PO(3) = PP(3);
       aSelection->Add(new Select3D_SensitiveTriangle(eown,PP(1),PP(2),PP(3)));
 
-      eown= new SelectMgr_EntityOwner(myShapes[5],Prior);
+      const Handle(SelectMgr_SelectableObject)& anObj5 = myShapes[5]; // to avoid ambiguity
+      eown= new SelectMgr_EntityOwner(anObj5,Prior);
 //      PO(2) = PP(3);PO(3) = PP(4);
       aSelection->Add(new Select3D_SensitiveTriangle(eown,PP(1),PP(2),PP(4)));
 
-      eown= new SelectMgr_EntityOwner(myShapes[6],Prior);
+      const Handle(SelectMgr_SelectableObject)& anObj6 = myShapes[6]; // to avoid ambiguity
+      eown= new SelectMgr_EntityOwner(anObj6,Prior);
 //      PO(2) = PP(4);PO(3) = PP(2);
       aSelection->Add(new Select3D_SensitiveTriangle(eown,PP(1),PP(3),PP(4)));
       
index acc3d23..55867ee 100644 (file)
@@ -67,6 +67,11 @@ is
        ---Purpose: Changes the 2d curve.
     is static;
 
+    Load(me : in out; C : HCurve2d from Adaptor2d;
+                      S : HSurface from Adaptor3d)
+       ---Purpose: Load both curve and surface.
+    is static;
+
     GetCurve(me) returns HCurve2d from Adaptor2d
        ---C++: return const &
     is static;
index 12bdeb1..ea6de7e 100644 (file)
@@ -744,6 +744,18 @@ void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_HCurve2d)& C)
 }
 
 //=======================================================================
+//function : Load
+//purpose  : 
+//=======================================================================
+
+void Adaptor3d_CurveOnSurface::Load (const Handle(Adaptor2d_HCurve2d)& C,
+                                     const Handle(Adaptor3d_HSurface)& S) 
+{
+  Load (C);
+  Load (S);
+}
+
+//=======================================================================
 //function : FirstParameter
 //purpose  : 
 //=======================================================================
index 39aba2f..54b065f 100644 (file)
@@ -56,6 +56,9 @@
 #include <BOPTest_DrawableShape.hxx>
 #include <BOPTest_Objects.hxx>
 
+#include <Geom_Curve.hxx>
+#include <Geom2d_Curve.hxx>
+
 //
 static BOPAlgo_PaveFiller* pPF=NULL;
 //
index 86390a2..52359fa 100644 (file)
@@ -70,7 +70,7 @@ Standard_Integer BOPTools_AlgoTools2D::AttachExistingPCurve
   Standard_Integer iRet;
   Standard_Real aTol, aT11, aT12, aT21, aT22, aTolPPC;
   Handle(Geom2d_Curve) aC2Dold, aC2DoldC;
-  Handle(Geom2d_TrimmedCurve) aC2DT;
+  Handle(Geom2d_Curve) aC2DT;
   BRep_Builder aBB;
   //
   iRet=0;
index 68b4669..262102b 100644 (file)
@@ -814,8 +814,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
         if (cr->IsCurveOnClosedSurface()) {
           //checkclosed = Standard_True;
           GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
-          ACS.Load(GAHS); // sans doute inutile
-          ACS.Load(GHPC); // meme remarque...
+          ACS.Load(GHPC, GAHS); // sans doute inutile
           ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter, aNewTol);
           if (ok) {
             if (aNewTol<aMaxTol) {
index 6e2ae65..bb15e5d 100644 (file)
@@ -82,8 +82,7 @@ void BRepAdaptor_Curve::Initialize(const TopoDS_Edge& E)
       Handle(Geom2dAdaptor_HCurve) HC = new Geom2dAdaptor_HCurve();
       HC->ChangeCurve2d().Load(PC,pf,pl);
       myConSurf = new Adaptor3d_HCurveOnSurface();
-      myConSurf->ChangeCurve().Load(HC);
-      myConSurf->ChangeCurve().Load(HS);
+      myConSurf->ChangeCurve().Load(HC, HS);
     }
     else {
       Standard_NullObject::Raise("BRepAdaptor_Curve::No geometry");
@@ -113,8 +112,7 @@ void BRepAdaptor_Curve::Initialize(const TopoDS_Edge& E,
   Handle(Geom2dAdaptor_HCurve) HC = new Geom2dAdaptor_HCurve();
   HC->ChangeCurve2d().Load(PC,pf,pl);
   myConSurf = new Adaptor3d_HCurveOnSurface();
-  myConSurf->ChangeCurve().Load(HC);
-  myConSurf->ChangeCurve().Load(HS);
+  myConSurf->ChangeCurve().Load(HC, HS);
   
   myTrsf = L.Transformation();
 }
index a23283d..aab1343 100644 (file)
@@ -329,8 +329,7 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
             }
             if (cr->IsCurveOnClosedSurface()) {
               GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
-              ACS.Load(GAHS); // sans doute inutile
-              ACS.Load(GHPC); // meme remarque...
+              ACS.Load(GHPC, GAHS); // sans doute inutile
               ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter);
               if (!ok) {
                 BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
index 5a52d35..0b81edc 100644 (file)
@@ -668,7 +668,7 @@ void BRepFeat_RibSlot::EdgeExtention(TopoDS_Edge& e,
 #endif
   Standard_Real f, l;
   Handle(Geom_Curve) cu = BRep_Tool::Curve(e, f, l);
-  Handle(Geom_TrimmedCurve) C = 
+  Handle(Geom_BoundedCurve) C = 
     new Geom_TrimmedCurve(cu, f, l);
 
   TopoDS_Edge E;
@@ -1105,7 +1105,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
       Standard_Real intpar;
       for(; ex1.More(); ex1.Next()) {
         const TopoDS_Face& f = TopoDS::Face(ex1.Current());
-        inter.Init(f,curve, BRep_Tool::Tolerance(f));
+        GeomAdaptor_Curve aGAC (curve);
+        inter.Init (f, aGAC, BRep_Tool::Tolerance(f));
         if(!inter.More()) continue;
         for(; inter.More(); inter.Next()) {
           gp_Pnt thePoint = inter.Pnt();
index d903b47..2470ed4 100644 (file)
@@ -312,8 +312,8 @@ void BRepFill_Filling::AddConstraints( const BRepFill_SequenceOfEdgeFaceAndOrder
        if (CurOrder == GeomAbs_C0) {
          Handle( BRepAdaptor_HCurve ) HCurve = new BRepAdaptor_HCurve();
          HCurve->ChangeCurve().Initialize( CurEdge );
-         
-         Constr = new BRepFill_CurveConstraint(HCurve,
+         const Handle(Adaptor3d_HCurve)& aHCurve = HCurve; // to avoid ambiguity
+         Constr = new BRepFill_CurveConstraint(aHCurve,
                                                CurOrder,
                                                myNbPtsOnCur,
                                                myTol3d );
index 81431a2..8c35c70 100644 (file)
@@ -112,7 +112,8 @@ static Handle(Geom_BSplineCurve) EdgeToBSpline (const TopoDS_Edge& theEdge)
     // special treatment of conic curve
     if (aTrimCurve->BasisCurve()->IsKind(STANDARD_TYPE(Geom_Conic)))
     {
-      GeomConvert_ApproxCurve anAppr (aTrimCurve, Precision::Confusion(), GeomAbs_C1, 16, 14);
+      const Handle(Geom_Curve)& aCurve = aTrimCurve; // to avoid ambiguity
+      GeomConvert_ApproxCurve anAppr (aCurve, Precision::Confusion(), GeomAbs_C1, 16, 14);
       if (anAppr.HasResult())
         aBSCurve = anAppr.Curve();
     }
index 5e14d93..51b80a4 100644 (file)
@@ -350,7 +350,8 @@ static Standard_Boolean SameParameter(TopoDS_Edge&    E,
        }
     }
 
-  Approx_SameParameter sp( HC3d, Pcurv, S, tol3d );
+  const Handle(Adaptor3d_HCurve)& aHCurve = HC3d; // to avoid ambiguity
+  Approx_SameParameter sp (aHCurve, Pcurv, S, tol3d );
   if(sp.IsDone() && !sp.IsSameParameter()) Pcurv = sp.Curve2d();
   else if(!sp.IsDone() && !sp.IsSameParameter()){
 #ifdef OCCT_DEBUG
index e11dda2..6e0f40a 100644 (file)
@@ -173,7 +173,8 @@ void BRepIntCurveSurface_Inter::Find()
     if( !myCurrentnbpoints)
       continue;
 
-    myFastClass->Initialize(aSurfForFastClass);
+    const Handle(Adaptor3d_HSurface)& aSurf = aSurfForFastClass; // to avoid ambiguity
+    myFastClass->Initialize(aSurf);
     myIndFace = i;
     if(FindPoint())
       return; 
index d9934bf..a330798 100644 (file)
@@ -586,8 +586,7 @@ Standard_Boolean  BRepLib::UpdateEdgeTol(const TopoDS_Edge& AnEdge,
       new Geom2dAdaptor_HCurve(AnAdaptor3dCurve2d) ;
     Handle(GeomAdaptor_HSurface) AnAdaptor3dSurfacePtr =
       new GeomAdaptor_HSurface (AnAdaptor3dSurface) ;
-    curve_on_surface_reference.Load( AnAdaptor3dCurve2dPtr) ;
-    curve_on_surface_reference.Load( AnAdaptor3dSurfacePtr) ;
+    curve_on_surface_reference.Load (AnAdaptor3dCurve2dPtr, AnAdaptor3dSurfacePtr);
     a_sampler.Initialize(curve_on_surface_reference,
       MinToleranceRequested * factor,
       current_first,
@@ -1232,7 +1231,9 @@ void BRepLib::SameParameter(const TopoDS_Edge&  AnEdge,
         if(goodpc){
           //     Approx_SameParameter SameP(HC,HC2d,HS,Tolerance);
           Standard_Real aTol = (isANA && isBSP) ? 1.e-7 : Tolerance;
-          Approx_SameParameter SameP(HC,HC2d,HS,aTol);
+          const Handle(Adaptor3d_HCurve)& aHCurv = HC; // to avoid ambiguity
+          const Handle(Adaptor2d_HCurve2d)& aHCurv2d = HC2d; // to avoid ambiguity
+          Approx_SameParameter SameP(aHCurv,aHCurv2d,HS,aTol);
 
           if (SameP.IsSameParameter()) {
             maxdist = Max(maxdist,SameP.TolReached());
index c35f32f..c0b96d6 100644 (file)
@@ -900,7 +900,8 @@ static Handle(Geom_BSplineCurve) EdgeToBSpline (const TopoDS_Edge& theEdge)
     // special treatment of conic curve
     if (aTrimCurve->BasisCurve()->IsKind(STANDARD_TYPE(Geom_Conic)))
     {
-      GeomConvert_ApproxCurve anAppr (aTrimCurve, Precision::Confusion(), GeomAbs_C1, 16, 14);
+      const Handle(Geom_Curve)& aCurve = aTrimCurve; // to avoid ambiguity
+      GeomConvert_ApproxCurve anAppr (aCurve, Precision::Confusion(), GeomAbs_C1, 16, 14);
       if (anAppr.HasResult())
         aBSCurve = anAppr.Curve();
     }
index 13a97aa..420a190 100644 (file)
@@ -47,7 +47,6 @@
 #include <GeomAdaptor_Curve.hxx>
 #include <ProjLib_ComputeApproxOnPolarSurface.hxx>
 #include <DrawTrSurf.hxx>
-
 #include <Geom_Plane.hxx>
 
 #include <Draw_Segment3D.hxx>
@@ -440,7 +439,8 @@ static Standard_Integer findplane(Draw_Interpretor& di,Standard_Integer n,const
   if (a_plane_finder.Found()) {
     //cout << " a plane is found "   ;
     di << " a plane is found \n";
-    DrawTrSurf::Set(a[2],a_plane_finder.Plane()) ;
+    const Handle(Geom_Geometry)& aSurf = a_plane_finder.Plane(); // to avoid ambiguity
+    DrawTrSurf::Set(a[2],aSurf) ;
   }
   return 0 ;
 }
index c4de2d2..f8cb060 100644 (file)
@@ -46,6 +46,9 @@
 #include <FilletSurf_Builder.hxx>
 #include <ChFi3d_FilletShape.hxx>
 #include <Geom_TrimmedCurve.hxx>
+#include <Geom_Surface.hxx>
+#include <Geom_Curve.hxx>
+#include <Geom2d_Curve.hxx>
 #include <TopTools_ListOfShape.hxx>
 #include <FilletSurf_StatusType.hxx>
 #include <FilletSurf_ErrorTypeStatus.hxx>
index 49b4aea..638d888 100644 (file)
@@ -164,7 +164,7 @@ static Standard_Integer plate (Draw_Interpretor & di,Standard_Integer n,const ch
     Adaptor3d_CurveOnSurface ConS(C,S);
     Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS);
     Fronts->SetValue(i,HConS);
-    Handle(BRepFill_CurveConstraint) Cont
+    Handle(GeomPlate_CurveConstraint) Cont
       = new BRepFill_CurveConstraint(HConS,
                                     Tang->Value(i),
                                     NbPtsCur->Value(i));
@@ -251,7 +251,8 @@ static Standard_Integer gplate (Draw_Interpretor & ,Standard_Integer n,const cha
     if ((Conti==0)||(Conti==-1))
       { Handle(BRepAdaptor_HCurve) C = new BRepAdaptor_HCurve();
        C->ChangeCurve().Initialize(E);
-       Handle(BRepFill_CurveConstraint) Cont= new BRepFill_CurveConstraint(C,Conti);
+        const Handle(Adaptor3d_HCurve)& aC = C; // to avoid ambiguity
+       Handle(GeomPlate_CurveConstraint) Cont= new BRepFill_CurveConstraint(aC,Conti);
        Henri.Add(Cont);
      }
     else 
@@ -267,7 +268,7 @@ static Standard_Integer gplate (Draw_Interpretor & ,Standard_Integer n,const cha
        C->ChangeCurve2d().Initialize(E,F);
        Adaptor3d_CurveOnSurface ConS(C,S);
        Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS);
-       Handle(BRepFill_CurveConstraint) Cont= new BRepFill_CurveConstraint(HConS,Conti);
+       Handle(GeomPlate_CurveConstraint) Cont= new BRepFill_CurveConstraint(HConS,Conti);
        Henri.Add(Cont);
       }
   }
@@ -363,7 +364,7 @@ static Standard_Integer approxplate (Draw_Interpretor & di,Standard_Integer n,co
     Adaptor3d_CurveOnSurface ConS(C,S);
     Handle (Adaptor3d_HCurveOnSurface) HConS = new Adaptor3d_HCurveOnSurface(ConS);
     Fronts->SetValue(i,HConS);
-    Handle(BRepFill_CurveConstraint) Cont
+    Handle(GeomPlate_CurveConstraint) Cont
       = new BRepFill_CurveConstraint(HConS,
                                     Tang->Value(i),
                                     NbPtsCur->Value(i));
index f40e51d..90d393c 100644 (file)
@@ -33,7 +33,8 @@ BRepTopAdaptor_Tool::BRepTopAdaptor_Tool(const TopoDS_Face& F,
 
   Handle(BRepAdaptor_HSurface) surface = new BRepAdaptor_HSurface();
   surface->ChangeSurface().Initialize(F,Standard_True);
-  myTopolTool->Initialize(surface);
+  const Handle(Adaptor3d_HSurface)& aSurf = surface; // to avoid ambiguity
+  myTopolTool->Initialize(aSurf);
   myHSurface = surface;
   myloaded=Standard_True;
 }
@@ -52,7 +53,8 @@ void BRepTopAdaptor_Tool::Init(const TopoDS_Face& F,
 { 
   Handle(BRepAdaptor_HSurface) surface = new BRepAdaptor_HSurface();
   surface->ChangeSurface().Initialize(F);
-  myTopolTool->Initialize(surface);
+  const Handle(Adaptor3d_HSurface)& aSurf = surface; // to avoid ambiguity
+  myTopolTool->Initialize(aSurf);
   myHSurface = surface;
   myloaded=Standard_True;
 }
index 9262b91..21ffeb0 100644 (file)
@@ -50,7 +50,7 @@ static Standard_Boolean IsMaxRC (const Handle(Geom2d_Curve)& C,
   Standard_Real         U,
   Standard_Real&        R);
 
-static void ReplaceByLineIfIsToSmall (Handle(Geom2d_Curve)& Bis,
+static void ReplaceByLineIfIsToSmall (Handle(Bisector_Curve)& Bis,
   Standard_Real&        UFirst,
   Standard_Real&        ULast);                                        
 //=============================================================================
@@ -115,7 +115,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve   ,
     {
       if(aBS->Pole(1).Distance(aBS->Pole(2)) < 1.e-4)
       {
-        afirstcurve1 = GCE2d_MakeSegment(aBS->Pole(1), aBS->Pole(2));
+        afirstcurve1 = GCE2d_MakeSegment(aBS->Pole(1), aBS->Pole(2)).Value();
         Type1 = STANDARD_TYPE(Geom2d_Line);
       }
     }
@@ -138,7 +138,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve   ,
     {
       if(aBS->Pole(1).Distance(aBS->Pole(2)) < 1.e-4)
       {
-        asecondcurve1 = GCE2d_MakeSegment(aBS->Pole(1), aBS->Pole(2));
+        asecondcurve1 = GCE2d_MakeSegment(aBS->Pole(1), aBS->Pole(2)).Value();
         Type2 = STANDARD_TYPE(Geom2d_Line);
       }
     }
@@ -633,7 +633,7 @@ const Handle(Geom2d_TrimmedCurve)&  Bisector_Bisec::ChangeValue()
 //purpose  : If the size of an algorithmic bissectrice is negligeable it is
 //           replaced by a half-straight.
 //=============================================================================
-static void ReplaceByLineIfIsToSmall (Handle(Geom2d_Curve)& Bis,
+static void ReplaceByLineIfIsToSmall (Handle(Bisector_Curve)& Bis,
   Standard_Real&        UFirst,
   Standard_Real&        ULast )
 
index c9d9b4d..fe89ebf 100644 (file)
@@ -506,10 +506,10 @@ is
                 Spine           : Spine from ChFiDS; 
                 HS1,  HS3       : HSurface from BRepAdaptor; 
                P1,  P3         : Pnt2d  from  gp;
-                I1              : in  out  TopolTool from Adaptor3d;
+                I1              : TopolTool from Adaptor3d;
                 HS2,  HS4       : HSurface from BRepAdaptor;   
                P2,  P4         : Pnt2d  from  gp;
-                I2              : in  out  TopolTool from Adaptor3d;
+                I2              : TopolTool from Adaptor3d;
                 MaxStep         : Real from Standard;
                 Fleche          : Real from Standard;
                 TolGuide        : Real from Standard;
index 445f22a..040b295 100644 (file)
@@ -618,8 +618,8 @@ void ChFi3d_BoundSrf(GeomAdaptor_Surface& S,
 //function : ChFi3d_InterPlaneEdge
 //purpose  : 
 //=======================================================================
-Standard_Boolean  ChFi3d_InterPlaneEdge (Handle(Adaptor3d_HSurface)& Plan,
-  Handle(Adaptor3d_HCurve)&  C,
+Standard_Boolean  ChFi3d_InterPlaneEdge (const Handle(Adaptor3d_HSurface)& Plan,
+  const Handle(Adaptor3d_HCurve)&  C,
   Standard_Real& W,
   const Standard_Boolean Sens,
   const Standard_Real tolc)
@@ -1320,8 +1320,8 @@ void ChFi3d_ComputePCurv(const Handle(Geom_Curve)&   C3d,
   Standard_Real&              tolreached,
   const Standard_Boolean      reverse)
 {
-  /*szv:static*/ Handle(GeomAdaptor_HSurface) hs(new GeomAdaptor_HSurface(S));
-  /*szv:static*/ Handle(GeomAdaptor_HCurve) hc(new GeomAdaptor_HCurve(C3d,Pardeb,Parfin));
+  Handle(Adaptor3d_HSurface) hs(new GeomAdaptor_HSurface(S));
+  Handle(Adaptor3d_HCurve) hc(new GeomAdaptor_HCurve(C3d,Pardeb,Parfin));
   ChFi3d_ComputePCurv(hc,UV1,UV2,Pcurv,hs,Pardeb,Parfin,tol3d,tolreached,reverse);
 }
 //=======================================================================
@@ -1433,7 +1433,7 @@ Handle(GeomFill_Boundary) ChFi3d_mkbound(const Handle(Geom_Surface)& s,
   const Standard_Real ta,
   const Standard_Boolean isfreeboundary)
 {
-  Handle(GeomAdaptor_HSurface) HS = new GeomAdaptor_HSurface(s);
+  Handle(Adaptor3d_HSurface) HS = new GeomAdaptor_HSurface(s);
   return ChFi3d_mkbound(HS,p1,p2,t3d,ta,isfreeboundary);
 }
 //=======================================================================
@@ -1636,7 +1636,8 @@ void  ChFi3d_ComputeArete(const ChFiDS_CommonPoint&   P1,
     if(IFlag != 1) {
       hs->ChangeSurface().Load(Surf);
       hc->ChangeCurve().Load(C3d,Pardeb,Parfin);
-      ChFi3d_ComputePCurv(hc,UV1,UV2,Pcurv,hs,Pardeb,Parfin,tol3d,tolreached,Standard_False);
+      const Handle(Adaptor3d_HCurve)& aHCurve = hc; // to avoid ambiguity
+      ChFi3d_ComputePCurv(aHCurve,UV1,UV2,Pcurv,hs,Pardeb,Parfin,tol3d,tolreached,Standard_False);
     }
     else{
       Pcurv = new Geom2d_Line(UV1,gp_Vec2d(UV1,UV2));
@@ -1665,7 +1666,8 @@ void  ChFi3d_ComputeArete(const ChFiDS_CommonPoint&   P1,
     if(IFlag != 1) {
       hs->ChangeSurface().Load(Surf);
       hc->ChangeCurve().Load(C3d,Pardeb,Parfin);
-      ChFi3d_ComputePCurv(hc,UV1,UV2,Pcurv,hs,Pardeb,Parfin,tol3d,tolreached,Standard_False);
+      const Handle(Adaptor3d_HCurve)& aHCurve = hc; // to avoid ambiguity
+      ChFi3d_ComputePCurv(aHCurve,UV1,UV2,Pcurv,hs,Pardeb,Parfin,tol3d,tolreached,Standard_False);
     }
     else{
       Pcurv = new Geom2d_Line(UV1,gp_Vec2d(UV1,UV2));
@@ -3011,8 +3013,8 @@ static void CurveCleaner(Handle(Geom_BSplineCurve)& BS,
 //           <wholeCurv> means that the resulting curve is restricted by
 //           boundaries of input surfaces (eap 30 May occ354)
 //=======================================================================
-Standard_Boolean ChFi3d_ComputeCurves(Handle(Adaptor3d_HSurface)&   S1,
-  Handle(Adaptor3d_HSurface)&   S2,
+Standard_Boolean ChFi3d_ComputeCurves(const Handle(Adaptor3d_HSurface)&   S1,
+  const Handle(Adaptor3d_HSurface)&   S2,
   const TColStd_Array1OfReal& Pardeb,
   const TColStd_Array1OfReal& Parfin,
   Handle(Geom_Curve)&         C3d,
@@ -3488,10 +3490,10 @@ Standard_Boolean ChFi3d_ComputeCurves(Handle(Adaptor3d_HSurface)&   S1,
 //
 //=======================================================================
 
-Standard_Boolean ChFi3d_IntCS(Handle(Adaptor3d_HSurface)& S,
-  Handle(Adaptor3d_HCurve)& C,
-  gp_Pnt2d& p2dS,
-  Standard_Real& wc)
+Standard_Boolean ChFi3d_IntCS(const Handle(Adaptor3d_HSurface)& S,
+                              const Handle(Adaptor3d_HCurve)& C,
+                              gp_Pnt2d& p2dS,
+                              Standard_Real& wc)
 {
   IntCurveSurface_HInter Intersection;
 
index a1c683a..5817598 100644 (file)
@@ -152,8 +152,8 @@ void ChFi3d_BoundSrf(GeomAdaptor_Surface& S,
                     const Standard_Real  vmax,
                     const Standard_Boolean checknaturalbounds = Standard_True);
                      
-Standard_Boolean  ChFi3d_InterPlaneEdge (Handle(Adaptor3d_HSurface)& Plan,
-                                        Handle(Adaptor3d_HCurve)&   C,
+Standard_Boolean  ChFi3d_InterPlaneEdge (const Handle(Adaptor3d_HSurface)& Plan,
+                                        const Handle(Adaptor3d_HCurve)&   C,
                                         Standard_Real&            W,
                                         const Standard_Boolean    Sens,
                                         const Standard_Real tolc);
@@ -433,8 +433,8 @@ TopoDS_Edge ChFi3d_EdgeFromV1(const TopoDS_Vertex& V1,
 Standard_Real ChFi3d_ConvTol2dToTol3d(const Handle(Adaptor3d_HSurface)& S,
                                      const Standard_Real             tol2d);
 
-Standard_Boolean  ChFi3d_ComputeCurves(Handle(Adaptor3d_HSurface)&   S1,
-                                      Handle(Adaptor3d_HSurface)&   S2,
+Standard_Boolean  ChFi3d_ComputeCurves(const Handle(Adaptor3d_HSurface)&   S1,
+                                      const Handle(Adaptor3d_HSurface)&   S2,
                                       const TColStd_Array1OfReal& Pardeb,
                                       const TColStd_Array1OfReal& Parfin,
                                       Handle(Geom_Curve)&         C3d,
@@ -446,8 +446,8 @@ Standard_Boolean  ChFi3d_ComputeCurves(Handle(Adaptor3d_HSurface)&   S1,
                                       const Standard_Boolean      wholeCurv
                                        = Standard_True);
 
-Standard_Boolean ChFi3d_IntCS(Handle(Adaptor3d_HSurface)& S,
-                             Handle(Adaptor3d_HCurve)& C,
+Standard_Boolean ChFi3d_IntCS(const Handle(Adaptor3d_HSurface)& S,
+                             const Handle(Adaptor3d_HCurve)& C,
                              gp_Pnt2d& p2dS,
                              Standard_Real& wc);
 
index 86e3c4f..d5f52e5 100644 (file)
@@ -587,12 +587,12 @@ CallPerformSurf(Handle(ChFiDS_Stripe)&              Stripe,
                const Handle(BRepAdaptor_HSurface)& HS3,
                const gp_Pnt2d&                     pp1,
                const gp_Pnt2d&                     pp3,
-               Handle(Adaptor3d_TopolTool)&          It1,
+               const Handle(Adaptor3d_TopolTool)&          It1,
                const Handle(BRepAdaptor_HSurface)& HS2,
                const Handle(BRepAdaptor_HSurface)& HS4,
                const gp_Pnt2d&                     pp2,
                const gp_Pnt2d&                     pp4,
-               Handle(Adaptor3d_TopolTool)&          It2,
+               const Handle(Adaptor3d_TopolTool)&          It2,
                const Standard_Real                 MaxStep,
                const Standard_Real                 Fleche,
                const Standard_Real                 /*TolGuide*/,
@@ -616,8 +616,8 @@ CallPerformSurf(Handle(ChFiDS_Stripe)&              Stripe,
   HSon1 = HS1;
   HSon2 = HS2;
   // Definition of the domain of path It1, It2
-  It1->Initialize(HS1);
-  It2->Initialize(HS2);
+  It1->Initialize((const Handle(Adaptor3d_HSurface)&)HSon1);
+  It2->Initialize((const Handle(Adaptor3d_HSurface)&)HSon2);
 
 
   TopAbs_Orientation Or1 = HS1->ChangeSurface().Face().Orientation();
@@ -659,14 +659,14 @@ CallPerformSurf(Handle(ChFiDS_Stripe)&              Stripe,
    Standard_Boolean reprise = Standard_False;
    if (! HS3.IsNull()) {
      HSon1 = HS3;
-     It1->Initialize(HS3); 
+     It1->Initialize((const Handle(Adaptor3d_HSurface)&)HS3); 
      Or1 = HS3->ChangeSurface().Face().Orientation();
      Soldep(1) = pp3.X(); Soldep(2) = pp3.Y();
      reprise = Standard_True;
    }
    else if (! HS4.IsNull()) {
      HSon2 = HS4;
-     It2->Initialize(HS4); 
+     It2->Initialize((const Handle(Adaptor3d_HSurface)&)HS4); 
      Or2 = HS4->ChangeSurface().Face().Orientation();
      Soldep(3) = pp4.X(); Soldep(4) = pp4.Y();
      reprise = Standard_True;
@@ -842,7 +842,7 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)&      Stripe,
     f1forward.Orientation(TopAbs_FORWARD);
     f2forward.Orientation(TopAbs_FORWARD);
     PC = BRep_Tool::CurveOnSurface(cured,f1forward,Uf,Ul);
-    I1->Initialize(HS1);
+    I1->Initialize((const Handle(Adaptor3d_HSurface)&)HS1);
     PC->D1(woned, P1, derive);
     // There are ponts on the border, and internal points are found
     if (derive.Magnitude() > Precision::PConfusion()) {
@@ -866,7 +866,8 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)&      Stripe,
     if(f1.IsSame(f2)) cured.Orientation(TopAbs_REVERSED);
     PC = BRep_Tool::CurveOnSurface(cured,f2forward,Uf,Ul);
     P2 = PC->Value(woned);
-    I2->Initialize(HS2);
+    const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity
+    I2->Initialize(HSon2);
 
     SolDep(1) = P1.X(); SolDep(2) = P1.Y();
     SolDep(3) = P2.X(); SolDep(4) = P2.Y();
@@ -908,8 +909,10 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)&      Stripe,
     P1 = PC->Value(woned);
     PC = BRep_Tool::CurveOnSurface(cured,f2forward,Uf,Ul);
     P2 = PC->Value(woned);
-    I1->Initialize(HS1);
-    I2->Initialize(HS2);
+    const Handle(Adaptor3d_HSurface)& HSon1 = HS1; // to avoid ambiguity
+    const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity
+    I1->Initialize(HSon1);
+    I2->Initialize(HSon2);
     SolDep(1) = P1.X(); SolDep(2) = P1.Y();
     SolDep(3) = P2.X(); SolDep(4) = P2.Y();
     const BRepAdaptor_Curve& Ced = Spine->CurrentElementarySpine(iedge);
@@ -947,8 +950,10 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)&      Stripe,
                                   Stripe->OrientationOnFace1(),
                                   Stripe->OrientationOnFace2(),
                                   RC);
-         I1->Initialize(HS1);
-         I2->Initialize(HS2);
+          const Handle(Adaptor3d_HSurface)& HSon1 = HS1; // to avoid ambiguity
+          const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity
+         I1->Initialize(HSon1);
+         I2->Initialize(HSon2);
          if(PerformFirstSection(Spine,HGuide,Choix,HS1,HS2,
                                 I1,I2,w,SolDep,Pos1,Pos2)){
            P1.SetCoord(SolDep(1),SolDep(2));
@@ -2047,9 +2052,11 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine
       else Standard_Failure::Raise("PerformSetOfSurfOnElSpine : Chaining is impossible.");
     }
     
-    // Definition of the domain of path It1, It2
-    It1->Initialize(HS1);
-    It2->Initialize(HS2);
+    // Definition of the domain of patch It1, It2
+    const Handle(Adaptor3d_HSurface)& HSon1 = HS1; // to avoid ambiguity
+    const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity
+    It1->Initialize(HSon1);
+    It2->Initialize(HSon2);
     
     // Calculate one (several if singularity) SurfaData
     SD = new ChFiDS_SurfData();
@@ -2151,11 +2158,13 @@ void ChFi3d_Builder::PerformSetOfSurfOnElSpine
       SD->ChangeIndexOfS2(DStr.AddShape(HS2->ChangeSurface().Face()));
       decroch1 = 0;
     }
-    else{            
+    else{ 
+      const Handle(Adaptor3d_TopolTool)& aTT1 = It1; // to avoid ambiguity
+      const Handle(Adaptor3d_TopolTool)& aTT2 = It2; // to avoid ambiguity
       CallPerformSurf(Stripe, Simul, SeqSD, SD,
                      HGuide,Spine,
-                     HS1, HS3, pp1, pp3, It1,
-                     HS2, HS4, pp2, pp4, It2, 
+                     HS1, HS3, pp1, pp3, aTT1,
+                     HS2, HS4, pp2, pp4, aTT2, 
                      MaxStep,locfleche,tolesp,
                      First,Last,Inside,Inside,forward,
                      RecS1,RecS2,Soldep,intf,intl, 
@@ -2334,8 +2343,10 @@ void ChFi3d_Builder::PerformSetOfKPart(Handle(ChFiDS_Stripe)& Stripe,
       Or1   = HS1->ChangeSurface().Face().Orientation();
       Or2   = HS2->ChangeSurface().Face().Orientation();
       ChFi3d::NextSide(Or1,Or2,RefOr1,RefOr2,RefChoix);      
-      It1->Initialize(HS1);
-      It2->Initialize(HS2);
+      const Handle(Adaptor3d_HSurface)& HSon1 = HS1; // to avoid ambiguity
+      const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity
+      It1->Initialize(HSon1);
+      It2->Initialize(HSon2);
       
       Handle(ChFiDS_SurfData)   SD = new ChFiDS_SurfData();
       ChFiDS_SequenceOfSurfData LSD;
index 98aaf95..738a705 100644 (file)
@@ -771,8 +771,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
     BRepBlend_SurfRstConstRad func(HS2,HS1,PC1,HGuide);
     func.Set(HSref1,PCref1);
     Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface();
-    HC->ChangeCurve().Load(HS1);
-    HC->ChangeCurve().Load(PC1);
+    HC->ChangeCurve().Load(PC1, HS1);
     BRepBlend_SurfCurvConstRadInv finvc(HS2,HC,HGuide);
     BRepBlend_SurfPointConstRadInv finvp(HS2,HGuide);
     BRepBlend_ConstRadInv finv(HS2,HSref1,HGuide);
@@ -814,8 +813,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
   else {
     BRepBlend_SurfRstEvolRad func(HS2,HS1,PC1,HGuide,fsp->Law(HGuide));
     Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface();
-    HC->ChangeCurve().Load(HS1);
-    HC->ChangeCurve().Load(PC1);
+    HC->ChangeCurve().Load(PC1, HS1);
     BRepBlend_SurfCurvEvolRadInv finvc(HS2,HC,HGuide,fsp->Law(HGuide));
     BRepBlend_SurfPointEvolRadInv finvp(HS2,HGuide,fsp->Law(HGuide));
     BRepBlend_EvolRadInv finv(HS2,HSref1,HGuide,fsp->Law(HGuide));
@@ -908,8 +906,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
     BRepBlend_SurfRstConstRad func(HS1,HS2,PC2,HGuide);
     func.Set(HSref2,PCref2);
     Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface();
-    HC->ChangeCurve().Load(HS2);
-    HC->ChangeCurve().Load(PC2);
+    HC->ChangeCurve().Load(PC2, HS2);
     BRepBlend_SurfCurvConstRadInv finvc(HS1,HC,HGuide);
     BRepBlend_SurfPointConstRadInv finvp(HS1,HGuide);
     BRepBlend_ConstRadInv finv(HS1,HSref2,HGuide);
@@ -949,8 +946,7 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
   else {
     BRepBlend_SurfRstEvolRad func(HS1,HS2,PC2,HGuide,fsp->Law(HGuide));
     Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface();
-    HC->ChangeCurve().Load(HS2);
-    HC->ChangeCurve().Load(PC2);
+    HC->ChangeCurve().Load(PC2, HS2);
     BRepBlend_SurfCurvEvolRadInv finvc(HS1,HC,HGuide,fsp->Law(HGuide));
     BRepBlend_SurfPointEvolRadInv finvp(HS1,HGuide,fsp->Law(HGuide));
     BRepBlend_EvolRadInv finv(HS1,HSref2,HGuide,fsp->Law(HGuide));
@@ -1053,11 +1049,9 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
     BRepBlend_RstRstConstRad func(HS1, PC1, HS2, PC2, HGuide);
     func.Set(HSref1, PCref1, HSref2, PCref2);
     Handle(Adaptor3d_HCurveOnSurface) HC1 = new Adaptor3d_HCurveOnSurface();
-    HC1->ChangeCurve().Load(HS1);
-    HC1->ChangeCurve().Load(PC1);
+    HC1->ChangeCurve().Load(PC1, HS1);
     Handle(Adaptor3d_HCurveOnSurface) HC2 = new Adaptor3d_HCurveOnSurface();
-    HC2->ChangeCurve().Load(HS2);
-    HC2->ChangeCurve().Load(PC2);
+    HC2->ChangeCurve().Load(PC2, HS2);
     BRepBlend_SurfCurvConstRadInv finv1(HSref1, HC2, HGuide);
     BRepBlend_CurvPointRadInv     finvp1(HGuide, HC2);
     BRepBlend_SurfCurvConstRadInv finv2(HSref2, HC1, HGuide);
@@ -1103,11 +1097,9 @@ void  ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)&            Data,
     BRepBlend_RstRstEvolRad func(HS1,PC1, HS2, PC2, HGuide, fsp->Law(HGuide));
     func.Set(HSref1, PCref1, HSref2, PCref2);
     Handle(Adaptor3d_HCurveOnSurface) HC1 = new Adaptor3d_HCurveOnSurface();
-    HC1->ChangeCurve().Load(HS1);
-    HC1->ChangeCurve().Load(PC1);
+    HC1->ChangeCurve().Load(PC1, HS1);
     Handle(Adaptor3d_HCurveOnSurface) HC2 = new Adaptor3d_HCurveOnSurface();
-    HC2->ChangeCurve().Load(HS2);
-    HC2->ChangeCurve().Load(PC2);
+    HC2->ChangeCurve().Load(PC2, HS2);
 
     BRepBlend_SurfCurvEvolRadInv  finv1(HSref1, HC2, HGuide, fsp->Law(HGuide));
     BRepBlend_CurvPointRadInv     finvp1(HGuide, HC2);
@@ -1369,8 +1361,7 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
     BRepBlend_SurfRstConstRad func(HS2,HS1,PC1,HGuide);
     func.Set(HSref1,PCref1);
     Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface();
-    HC->ChangeCurve().Load(HS1);
-    HC->ChangeCurve().Load(PC1);
+    HC->ChangeCurve().Load(PC1, HS1);
     BRepBlend_SurfCurvConstRadInv finvc(HS2,HC,HGuide);
     BRepBlend_SurfPointConstRadInv finvp(HS2,HGuide);
     BRepBlend_ConstRadInv finv(HS2,HSref1,HGuide);
@@ -1403,8 +1394,7 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
     BRepBlend_SurfRstEvolRad func(HS2,HS1,PC1,HGuide,fsp->Law(HGuide));
     func.Set(HSref1,PCref1);
     Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface();
-    HC->ChangeCurve().Load(HS1);
-    HC->ChangeCurve().Load(PC1);
+    HC->ChangeCurve().Load(PC1, HS1);
     BRepBlend_SurfCurvEvolRadInv finvc(HS2,HC,HGuide,fsp->Law(HGuide));
     BRepBlend_SurfPointEvolRadInv finvp(HS2,HGuide,fsp->Law(HGuide));
     BRepBlend_EvolRadInv finv(HS2,HSref1,HGuide,fsp->Law(HGuide));
@@ -1476,8 +1466,7 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
     BRepBlend_SurfRstConstRad func(HS1,HS2,PC2,HGuide);
     func.Set(HSref2,PCref2);
     Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface();
-    HC->ChangeCurve().Load(HS2);
-    HC->ChangeCurve().Load(PC2);
+    HC->ChangeCurve().Load(PC2, HS2);
     BRepBlend_SurfCurvConstRadInv finvc(HS1,HC,HGuide);
     BRepBlend_SurfPointConstRadInv finvp(HS1,HGuide);
     BRepBlend_ConstRadInv finv(HS1,HSref2,HGuide);
@@ -1510,8 +1499,7 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
     BRepBlend_SurfRstEvolRad func(HS1,HS2,PC2,HGuide,fsp->Law(HGuide));
     func.Set(HSref2,PCref2);
     Handle(Adaptor3d_HCurveOnSurface) HC = new Adaptor3d_HCurveOnSurface();
-    HC->ChangeCurve().Load(HS2);
-    HC->ChangeCurve().Load(PC2);
+    HC->ChangeCurve().Load(PC2, HS2);
     BRepBlend_SurfCurvEvolRadInv finvc(HS1,HC,HGuide,fsp->Law(HGuide));
     BRepBlend_SurfPointEvolRadInv finvp(HS1,HGuide,fsp->Law(HGuide));
     BRepBlend_EvolRadInv finv(HS1,HSref2,HGuide,fsp->Law(HGuide));
@@ -1595,11 +1583,9 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
     BRepBlend_RstRstConstRad func(HS1, PC1, HS2, PC2, HGuide);
     func.Set(HSref1, PCref1, HSref2, PCref2);
     Handle(Adaptor3d_HCurveOnSurface) HC1 = new Adaptor3d_HCurveOnSurface();
-    HC1->ChangeCurve().Load(HS1);
-    HC1->ChangeCurve().Load(PC1);
+    HC1->ChangeCurve().Load(PC1, HS1);
     Handle(Adaptor3d_HCurveOnSurface) HC2 = new Adaptor3d_HCurveOnSurface();
-    HC2->ChangeCurve().Load(HS2);
-    HC2->ChangeCurve().Load(PC2);
+    HC2->ChangeCurve().Load(PC2, HS2);
     BRepBlend_SurfCurvConstRadInv finv1(HSref1, HC2, HGuide);
     BRepBlend_CurvPointRadInv     finvp1(HGuide, HC2);
     BRepBlend_SurfCurvConstRadInv finv2(HSref2, HC1, HGuide);
@@ -1637,11 +1623,9 @@ void  ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData&          SeqData
     BRepBlend_RstRstEvolRad func(HS1,PC1, HS2, PC2, HGuide, fsp->Law(HGuide));
     func.Set(HSref1, PCref1, HSref2, PCref2);
     Handle(Adaptor3d_HCurveOnSurface) HC1 = new Adaptor3d_HCurveOnSurface();
-    HC1->ChangeCurve().Load(HS1);
-    HC1->ChangeCurve().Load(PC1);
+    HC1->ChangeCurve().Load(PC1, HS1);
     Handle(Adaptor3d_HCurveOnSurface) HC2 = new Adaptor3d_HCurveOnSurface();
-    HC2->ChangeCurve().Load(HS2);
-    HC2->ChangeCurve().Load(PC2);
+    HC2->ChangeCurve().Load(PC2, HS2);
 
     BRepBlend_SurfCurvEvolRadInv finv1(HSref1, HC2, HGuide, fsp->Law(HGuide));
     BRepBlend_CurvPointRadInv     finvp1(HGuide, HC2);
index e60ccaf..3fe17e1 100644 (file)
@@ -96,6 +96,7 @@ is
        --          variable if already set.
   --          isSenseMarker indicates whether to render the
   --          sense glyph (arrow) for curves or not
+    ---C++: alias "template <class T> static void Set (const Standard_CString Name, const Handle(T)& Arg, typename std::enable_if<std::is_base_of<Geom_Geometry, T>::value>::type * = 0) { Set (Name, (const Handle(Geom_Geometry)&)Arg); };"
     
     Set(Name : CString; C : Curve from Geom2d;
         isSenseMarker : Boolean = Standard_True);
@@ -103,6 +104,7 @@ is
        --          variable if already set.
   --          isSenseMarker indicates whether to render the
   --          sense glyph (arrow) for curves or not
+       ---C++: alias "template <class T> static void Set (const Standard_CString Name, const Handle(T)& Arg, typename std::enable_if<std::is_base_of<Geom2d_Curve, T>::value>::type * = 0) { Set (Name, (const Handle(Geom2d_Curve)&)Arg); }"
     
     Set(Name : CString; T : Triangulation from Poly);
        ---Purpose: Sets <T> in the variable <Name>.  Overwrite the
index e007ea5..61df40a 100644 (file)
@@ -532,7 +532,8 @@ extern "C" void ExprIntrp_EndOfAssign()
   Handle(Expr_NamedUnknown) namu;
   if (namexp.IsNull()) {
     namu = new Expr_NamedUnknown(ExprIntrp_assname);
-    ExprIntrp_Recept.Use(namu);
+    const Handle(Expr_NamedExpression)& aNamedExpr = namu; // to resolve ambiguity
+    ExprIntrp_Recept.Use(aNamedExpr);
   }
   else {
     if (!namexp->IsKind(STANDARD_TYPE(Expr_NamedUnknown))) {
@@ -584,7 +585,8 @@ extern "C" void ExprIntrp_ConstantDefinition()
   const TCollection_AsciiString& aStr = ExprIntrp_GetResult();
   Standard_Real val = aStr.RealValue();
   Handle(Expr_NamedConstant) theconst = new Expr_NamedConstant(name,val);
-  ExprIntrp_Recept.Use(theconst);
+  const Handle(Expr_NamedExpression) theexpr = theconst; // to resolve ambiguity
+  ExprIntrp_Recept.Use(theexpr);
   ExprIntrp_Recept.Push(theconst);
 }
 
index d25b155..e25f1d8 100755 (executable)
@@ -26,6 +26,7 @@
 #include <Geom_Plane.hxx>
 #include <Geom2d_BezierCurve.hxx>
 #include <Geom2d_BSplineCurve.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
 #include <Geom2d_Line.hxx>
 #include <GeomAPI.hxx>
 #include <GeomAdaptor_HSurface.hxx>
@@ -82,7 +83,7 @@ void Font_BRepFont::init()
 {
   mySurface        = new Geom_Plane (gp_Pln (gp::XOY()));
   myCurve2dAdaptor = new Geom2dAdaptor_HCurve();
-  Handle(GeomAdaptor_HSurface) aSurfAdaptor = new GeomAdaptor_HSurface (mySurface);
+  Handle(Adaptor3d_HSurface) aSurfAdaptor = new GeomAdaptor_HSurface (mySurface);
   myCurvOnSurf.Load (aSurfAdaptor);
 
   myFixer.FixWireMode()          = 1;
@@ -212,14 +213,15 @@ TopoDS_Shape Font_BRepFont::RenderGlyph (const Standard_Utf32Char& theChar)
 // function : to3d
 // purpose  :
 // =======================================================================
-bool Font_BRepFont::to3d (const Handle(Geom2d_Curve) theCurve2d,
+bool Font_BRepFont::to3d (const Handle(Geom2d_Curve)& theCurve2d,
                           const GeomAbs_Shape        theContinuity,
                           Handle(Geom_Curve)&        theCurve3d)
 {
   Standard_Real aMaxDeviation   = 0.0;
   Standard_Real anAverDeviation = 0.0;
   myCurve2dAdaptor->ChangeCurve2d().Load (theCurve2d);
-  myCurvOnSurf.Load (myCurve2dAdaptor);
+  const Handle(Adaptor2d_HCurve2d)& aCurve = myCurve2dAdaptor; // to avoid ambiguity
+  myCurvOnSurf.Load (aCurve);
   GeomLib::BuildCurve3d (myPrecision, myCurvOnSurf,
                          myCurve2dAdaptor->FirstParameter(), myCurve2dAdaptor->LastParameter(),
                          theCurve3d, aMaxDeviation, anAverDeviation, theContinuity);
index 0bf228f..83afd06 100755 (executable)
@@ -187,7 +187,7 @@ private:
   void init();
 
   //! Auxiliary method to create 3D curve
-  bool to3d (const Handle(Geom2d_Curve) theCurve2d,
+  bool to3d (const Handle(Geom2d_Curve)& theCurve2d,
              const GeomAbs_Shape        theContinuity,
              Handle(Geom_Curve)&        theCurve3d);
 
index dc3ec85..3a2b8ce 100644 (file)
@@ -1438,8 +1438,9 @@ void GeomLib::ExtendSurfByLength(Handle(Geom_BoundedSurface)& Surface,
     GeomAbs_Shape UCont = GeomAbs_C1, VCont = GeomAbs_C1;
     Standard_Integer degU = 14, degV = 14;
     Standard_Integer nmax = 16;
-    Standard_Integer thePrec = 1;  
-    GeomConvert_ApproxSurface theApprox(Surface,Tol,UCont,VCont,degU,degV,nmax,thePrec);
+    Standard_Integer thePrec = 1; 
+    const Handle(Geom_Surface)& aSurf = Surface; // to resolve ambiguity
+    GeomConvert_ApproxSurface theApprox(aSurf,Tol,UCont,VCont,degU,degV,nmax,thePrec);
     if (theApprox.HasResult())
       BS = theApprox.Surface();
     else
index e551302..cfffaa1 100644 (file)
@@ -591,7 +591,8 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomCurve::TransferCurve
     copystart->SetPosition (pos.Rotated (pos.Axis(), gp_Ax3 (pos).Direct() ? Udeb : 2 * M_PI - Udeb));
     Handle(Geom_BSplineCurve) Bspline;
     //:q3 abv 17 Mar 99: use GeomConvert_ApproxCurve for precise conversion
-    GeomConvert_ApproxCurve approx (copystart, Precision::Approximation(), 
+    const Handle(Geom_Curve)& aCopy = copystart; // to avoid ambiguity
+    GeomConvert_ApproxCurve approx (aCopy, Precision::Approximation(), 
                                    GeomAbs_C1, 100, 6 );
     if ( approx.HasResult() ) Bspline = approx.Curve();
     if ( Bspline.IsNull() ) 
index 732727f..3a04320 100644 (file)
@@ -122,7 +122,8 @@ GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom2d_Curve)& C)
 #endif
        Handle(Geom2d_BSplineCurve) aBSplineCurve2d = 
          Geom2dConvert::CurveToBSplineCurve(theC2d);
-       GeomToStep_MakeBoundedCurve MkBoundedC(aBSplineCurve2d);
+        const Handle(Geom2d_BoundedCurve)& aBC2d = aBSplineCurve2d; // to avoid ambiguity
+       GeomToStep_MakeBoundedCurve MkBoundedC(aBC2d);
        theCurve = MkBoundedC.Value();
       }
       else {
@@ -140,7 +141,8 @@ GeomToStep_MakeCurve::GeomToStep_MakeCurve ( const Handle(Geom2d_Curve)& C)
 #endif
        Handle(Geom2d_BSplineCurve) aBSplineCurve2d = 
          Geom2dConvert::CurveToBSplineCurve(theE2d);
-       GeomToStep_MakeBoundedCurve MkBoundedC(aBSplineCurve2d);
+        const Handle(Geom2d_BoundedCurve)& aBC2d = aBSplineCurve2d; // to avoid ambiguity
+       GeomToStep_MakeBoundedCurve MkBoundedC(aBC2d);
        theCurve = MkBoundedC.Value();
       }
       else {
index c3da988..39c7748 100644 (file)
@@ -15,7 +15,7 @@
 // commercial license or contractual agreement.
 
 #include <GeometryTest.hxx>
-#include <Geom2d_Curve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
 #include <Draw.hxx>
 #include <Draw_Interpretor.hxx>
 #include <DrawTrSurf.hxx>
index a72ecf4..e5e6c23 100644 (file)
@@ -14,8 +14,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#include <Geom_Curve.hxx>
-#include <Geom_Surface.hxx>
+#include <Geom_BSplineCurve.hxx>
+#include <Geom_BSplineSurface.hxx>
 #include <Draw.hxx>
 #include <Draw_Interpretor.hxx>
 #include <DrawTrSurf.hxx>
index fad59f7..f53022a 100644 (file)
@@ -46,6 +46,7 @@
 #include <Geom_BSplineCurve.hxx>
 #include <TColgp_HArray1OfPnt2d.hxx>
 #include <Geom2d_BSplineCurve.hxx>
+#include <Geom_TrimmedCurve.hxx>
 #include <DrawTrSurf_BSplineCurve.hxx>
 #include <DrawTrSurf_BSplineCurve2d.hxx>
 #include <TColgp_HArray1OfPnt.hxx>
index e657e38..e499762 100644 (file)
@@ -18,7 +18,7 @@
 
 
 #include <GeomliteTest.hxx>
-#include <Geom2d_Curve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
 #include <Draw.hxx>
 #include <Draw_Interpretor.hxx>
 #include <DrawTrSurf.hxx>
index ec49239..64b090c 100644 (file)
@@ -127,7 +127,8 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI,
     else { 
       Handle (Geom2d_TrimmedCurve) TPC =
        new Geom2d_TrimmedCurve (PC, U1, U2);
-      IndE = Hatcher.AddElement (TPC, newE.Orientation());
+      Geom2dAdaptor_Curve aGAC (TPC);
+      IndE = Hatcher.AddElement (aGAC, newE.Orientation());
     }
     SH(IndE) = newE;
     if (DS.IsOutLFaceEdge(TF,newE)) IL(IndE) = Standard_True;
@@ -150,7 +151,8 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI,
       else { 
        Handle (Geom2d_TrimmedCurve) TPC =
          new Geom2d_TrimmedCurve (PC, U1, U2);
-       IndE = Hatcher.AddElement (TPC, TopAbs_INTERNAL);
+        Geom2dAdaptor_Curve aGAC (TPC);
+       IndE = Hatcher.AddElement (aGAC, TopAbs_INTERNAL);
       }
       SH(IndE) = newE;
       IL(IndE) = Standard_True;
@@ -183,7 +185,8 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI,
       gp_Pnt2d Ori (UPrm, 0.);
       Handle (Geom2d_Line) IsoLine = new Geom2d_Line (Ori, Dir);
       
-      Standard_Integer IndH = Hatcher.AddHatching (IsoLine);
+      Geom2dAdaptor_Curve aGAC (IsoLine);
+      Standard_Integer IndH = Hatcher.AddHatching (aGAC);
       Hatcher.Trim (IndH);
       if (Hatcher.TrimDone (IndH) && !Hatcher.TrimFailed (IndH))
        Hatcher.ComputeDomains (IndH);
@@ -276,7 +279,8 @@ void HLRTopoBRep_FaceIsoLiner::Perform (const Standard_Integer FI,
       gp_Pnt2d Ori (0., VPrm);
       Handle (Geom2d_Line) IsoLine = new Geom2d_Line (Ori, Dir);
       
-      Standard_Integer IndH = Hatcher.AddHatching (IsoLine);
+      Geom2dAdaptor_Curve aGAC (IsoLine);
+      Standard_Integer IndH = Hatcher.AddHatching (aGAC);
       Hatcher.Trim (IndH);
       if (Hatcher.TrimDone (IndH) && !Hatcher.TrimFailed (IndH))
        Hatcher.ComputeDomains (IndH);
index 8935af2..b00842b 100644 (file)
@@ -55,7 +55,7 @@ void IGESData_BasicEditor::Init (const Handle(IGESData_Protocol)& protocol)
   theunit = Standard_False;
   theproto = protocol;
   themodel = GetCasted(IGESData_IGESModel,Interface_InterfaceModel::Template("iges"));
-  theglib = protocol;
+  theglib = Interface_GeneralLib (protocol);
   theslib = protocol;
 }
 
@@ -64,7 +64,7 @@ void IGESData_BasicEditor::Init (const Handle(IGESData_IGESModel)& model, const
   theunit = Standard_False;
   theproto = protocol;
   themodel = model;
-  theglib = protocol;
+  theglib = Interface_GeneralLib (protocol);
   theslib = protocol;
 }
 
index 2522bf1..cb83b36 100644 (file)
@@ -155,6 +155,7 @@ is
     --           pointer is 2*N-1)
     --           If <val> is Null, "0" will be sent
     --           If <negative> is True, "Pointer" is sent as negative
+       ---C++: alias "template <class T> void Send (const Handle(T)& val, Standard_Boolean negative = Standard_False, typename std::enable_if<std::is_base_of<IGESData_IGESEntity, T>::value>::type * = 0) { Send ((const Handle(IGESData_IGESEntity)&)val, negative); }"
 
     SendString (me : in out; val : HAsciiString from TCollection);
     ---Purpose : sends a parameter under its exact form given as a string
index 32ccf23..288681b 100644 (file)
@@ -393,7 +393,8 @@ void  IGESToBRep_Reader::TransferRoots (const Standard_Boolean onlyvisible)
   theProc->SetActor (theActor);
   Transfer_TransferOutput TP (theProc,theModel);
 
-  Interface_ShareFlags SH (theModel,protocol);
+  const Handle(Interface_Protocol) aProtocol = protocol; // to avoid ambiguity
+  Interface_ShareFlags SH (theModel, aProtocol);
   Standard_Integer nb = theModel->NbEntities();
   ShapeExtend_Explorer SBE;
 
index 76b02b8..30cbd21 100644 (file)
@@ -419,7 +419,8 @@ Geom2dHatch_Hatcher& IntTools_Context::Hatcher(const TopoDS_Face& aF)
       }
       //
       aCT2D=new Geom2d_TrimmedCurve(aC2D, aU1, aU2);
-      pHatcher->AddElement(aCT2D, aOrE);
+      Geom2dAdaptor_Curve aGAC (aCT2D);
+      pHatcher->AddElement(aGAC, aOrE);
     }// for (; aExp.More() ; aExp.Next()) {
     //
     anAdr=(Standard_Address)pHatcher;
index fbdf538..8857f19 100644 (file)
@@ -39,10 +39,12 @@ class HClassName : public _SequenceType_, public MMgt_TShared {                \
      _SequenceType_::Append (theSequence);                                     \
    }                                                                           \
    _SequenceType_& ChangeSequence ()       { return *this; }                   \
-   void Append (const Handle(HClassName)& theOther) {                          \
+   template <class T>                                                          \
+   void Append (const Handle(T)& theOther,                                     \
+                typename std::enable_if<std::is_base_of<HClassName, T>::value>::type * = 0) { \
      _SequenceType_::Append (theOther->ChangeSequence());                      \
    }                                                                           \
-   DEFINE_STANDARD_RTTI (HClassName, MMgt_TShared)                              \
+   DEFINE_STANDARD_RTTI (HClassName, MMgt_TShared)                             \
 }; \
 DEFINE_STANDARD_HANDLE (HClassName, MMgt_TShared) 
 
index bdf42dc..a4229cc 100644 (file)
@@ -46,6 +46,8 @@
 #include <ChFi3d_FilletShape.hxx>
 #include <BRepFilletAPI_MakeFillet.hxx>
 #include <Standard_ErrorHandler.hxx>
+#include <Geom_TrimmedCurve.hxx>
+#include <Geom_BSplineSurface.hxx>
 
 static Standard_Integer OCC426 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
 {
index 7792fd5..6d0d620 100644 (file)
@@ -26,6 +26,7 @@
 #include <AIS_Shape.hxx>
 #include <TopoDS_Shape.hxx>
 
+#include <Geom_Surface.hxx>
 #include <Geom_Axis2Placement.hxx>
 #include <gp.hxx>
 #include <gp_Trsf.hxx>
index 312f252..89258d5 100644 (file)
@@ -35,7 +35,7 @@
 #include <BRepGProp.hxx>
 #include <BRepOffsetAPI_MakePipeShell.hxx>
 #include <GC_MakeArcOfCircle.hxx>
-#include <Geom_Curve.hxx>
+#include <Geom_TrimmedCurve.hxx>
 #include <Geom_Plane.hxx>
 #include <Law_Linear.hxx>
 #include <TopoDS.hxx>
index ce65c74..cc79a1e 100644 (file)
@@ -142,7 +142,7 @@ static Standard_Integer  BUC60814(Draw_Interpretor& di, Standard_Integer argc, c
   }
   
   // TRIHEDRON
-  Handle(AIS_Trihedron) aTrihedron;
+  Handle(AIS_InteractiveObject) aTrihedron;
   Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
   aTrihedron=new AIS_Trihedron(aTrihedronAxis);
   myAISContext->Display(aTrihedron);
@@ -153,7 +153,7 @@ static Standard_Integer  BUC60814(Draw_Interpretor& di, Standard_Integer argc, c
   gp_Ax2 aAx2(P,V);
   
   Handle(Geom_Circle) ahCircle=new Geom_Circle(aAx2,20);
-  Handle(AIS_Circle)   aCircle=new AIS_Circle(ahCircle);
+  Handle(AIS_InteractiveObject)   aCircle=new AIS_Circle(ahCircle);
   myAISContext->Display(aCircle);
     
   myAISContext->SelectionColor(Quantity_NOC_BLUE1);
index 7a3ea38..44dd476 100644 (file)
@@ -30,6 +30,7 @@
 #include <Geom_Circle.hxx>
 #include <Geom_Ellipse.hxx>
 #include <Geom_Plane.hxx>
+#include <Geom_BSplineSurface.hxx>
 #include <gp_Pln.hxx>
 #include <Geom2d_Curve.hxx>
 #include <GeomAPI.hxx>
@@ -637,9 +638,9 @@ static Standard_Integer  OCC138LC (Draw_Interpretor& di, Standard_Integer /*argc
   BRepPrimAPI_MakeBox box2(gp_Pnt(120, 120, 120),  gp_Pnt(300, 300,300));
   BRepPrimAPI_MakeBox box3(gp_Pnt(320, 320, 320),  gp_Pnt(500, 500,500));
 
-  Handle(AIS_Shape) ais1 = new AIS_Shape(box1.Shape());
-  Handle(AIS_Shape) ais2 = new AIS_Shape(box2.Shape());
-  Handle(AIS_Shape) ais3 = new AIS_Shape(box3.Shape());
+  Handle(AIS_InteractiveObject) ais1 = new AIS_Shape(box1.Shape());
+  Handle(AIS_InteractiveObject) ais2 = new AIS_Shape(box2.Shape());
+  Handle(AIS_InteractiveObject) ais3 = new AIS_Shape(box3.Shape());
 
   aContext->Display(ais1);
   aContext->Display(ais2);
index 14b2755..ee1f8b7 100644 (file)
@@ -40,6 +40,7 @@
 #include <BRep_Tool.hxx>
 #include <Geom_Curve.hxx>
 #include <Geom_Surface.hxx>
+#include <Geom2d_Curve.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Pnt2d.hxx>
 #include <TopTools_IndexedMapOfShape.hxx>
index c9c9fc5..97f7c33 100644 (file)
@@ -832,16 +832,14 @@ Standard_Boolean ShapeAnalysis_Edge::CheckSameParameter (const TopoDS_Edge& edge
     Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(PC,f,l);
     //Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
     Adaptor3d_CurveOnSurface ACS;
-    ACS.Load(GHPC);
-    ACS.Load(GAHS);
+    ACS.Load(GHPC, GAHS);
     if ( ! ComputeDeviation ( AC3d, ACS, SameParameter, maxdev, NbControl-1 ) ) {
       myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
     }
 
     if ( GC->IsCurveOnClosedSurface() ) {
       GHPC->ChangeCurve2d().Load ( GC->PCurve2(), f, l ); // same bounds
-      ACS.Load(GAHS); // sans doute inutile
-      ACS.Load(GHPC); // meme remarque...
+      ACS.Load(GHPC, GAHS); // sans doute inutile
       if ( ! ComputeDeviation ( AC3d, ACS, SameParameter, maxdev, NbControl-1 ) ) {
        myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
       }
index 7d42ddc..e3815a3 100644 (file)
@@ -546,7 +546,7 @@ Handle(Geom2d_Curve) ShapeBuild_Edge::TransformPCurve(const Handle(Geom2d_Curve)
     if(result->IsKind(STANDARD_TYPE(Geom2d_Conic))) {
       //gp_Pln pln(gp_Pnt(0,0,0),gp_Dir(0,0,1));
       //Handle(Geom_Curve) curve = GeomAPI::To3d(result,pln);
-      Handle(Geom2d_TrimmedCurve) tcurve = new Geom2d_TrimmedCurve(result,aFirst,aLast); //protection agains parabols ets
+      Handle(Geom2d_Curve) tcurve = new Geom2d_TrimmedCurve(result,aFirst,aLast); //protection agains parabols ets
       Geom2dConvert_ApproxCurve approx (tcurve, Precision::Approximation(), 
         GeomAbs_C1, 100, 6 );
       if ( approx.HasResult() )
index 3ce84c9..54e19a3 100644 (file)
@@ -74,7 +74,7 @@ Handle(Geom_BSplineCurve) ShapeConstruct::ConvertCurveToBSpline(const Handle(Geo
     if(C3D->IsKind(STANDARD_TYPE(Geom_Conic))) 
       MaxDeg = Min(MaxDeg,6);
  
-    Handle(Geom_TrimmedCurve) tcurve = new Geom_TrimmedCurve(C3D,First,Last); //protection agains parabols ets
+    Handle(Geom_Curve) tcurve = new Geom_TrimmedCurve(C3D,First,Last); //protection agains parabols ets
     try {
       OCC_CATCH_SIGNALS
       GeomConvert_ApproxCurve approx (tcurve, Tol3d, Continuity, MaxSegments, MaxDeg);
@@ -109,7 +109,7 @@ Handle(Geom2d_BSplineCurve) ShapeConstruct::ConvertCurveToBSpline(const Handle(G
 {
   Handle(Geom2d_BSplineCurve) aBSpline2d;
   if(C2D->IsKind(STANDARD_TYPE(Geom2d_Conic))) {
-    Handle(Geom2d_TrimmedCurve) tcurve = new Geom2d_TrimmedCurve(C2D,First,Last); //protection agains parabols ets
+    Handle(Geom2d_Curve) tcurve = new Geom2d_TrimmedCurve(C2D,First,Last); //protection agains parabols ets
     Geom2dConvert_ApproxCurve approx (tcurve, Tol2d, Continuity, MaxSegments, MaxDegree);
     if ( approx.HasResult() )
       aBSpline2d = Handle(Geom2d_BSplineCurve)::DownCast(approx.Curve());
@@ -222,7 +222,7 @@ Handle(Geom_BSplineSurface) ShapeConstruct::ConvertSurfaceToBSpline(const Handle
     }
   }
     
-  Handle(Geom_RectangularTrimmedSurface) aSurface = new Geom_RectangularTrimmedSurface(S,UF,UL,VF,VL);
+  Handle(Geom_Surface) aSurface = new Geom_RectangularTrimmedSurface(S,UF,UL,VF,VL);
   Handle(Geom_BSplineSurface) errSpl;
   for(Standard_Integer cnt = (Continuity > GeomAbs_C3 ? GeomAbs_C3: Continuity); cnt >= 0 ; ) {
     try {
index 637776d..25319d0 100644 (file)
@@ -885,7 +885,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve(Handle(Geom_Curve)
 
   if (aCurve->IsKind(STANDARD_TYPE(Geom_Conic)) && myParameters->ConvertCurve3d()) {
     Handle(Geom_BSplineCurve) aBSpline;
-    Handle(Geom_TrimmedCurve) tcurve = new Geom_TrimmedCurve(aCurve,First,Last); //protection agains parabols ets
+    Handle(Geom_Curve) tcurve = new Geom_TrimmedCurve(aCurve,First,Last); //protection agains parabols ets
     GeomConvert_ApproxCurve approx (tcurve, myTol3d/*Precision::Approximation()*/, myContinuity2d, myNbMaxSeg, 6 );
     if ( approx.HasResult() )
       aBSpline = Handle(Geom_BSplineCurve)::DownCast(approx.Curve());
@@ -914,7 +914,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve(Handle(Geom_Curve)
   }
 
   if (aCurve->IsKind(STANDARD_TYPE(Geom_BezierCurve)) && myParameters->ConvertCurve3d()) {
-    Handle(Geom_BSplineCurve) aBSpline 
+    Handle(Geom_Curve) aBSpline 
       = GeomConvert::CurveToBSplineCurve(aCurve,Convert_QuasiAngular);
     Handle(Geom_Curve) ResCurve;
     if(ConvertCurve(aBSpline,ResCurve,IsConvert,First,Last,TolCur,Standard_False)) {
@@ -1192,7 +1192,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve2d(Handle(Geom2d_Cu
 
   if (aCurve->IsKind(STANDARD_TYPE(Geom2d_Conic)) && myParameters->ConvertCurve2d()) {
     Handle(Geom2d_BSplineCurve) aBSpline2d;
-    Handle(Geom2d_TrimmedCurve) tcurve = new Geom2d_TrimmedCurve(aCurve,First,Last); //protection agains parabols ets
+    Handle(Geom2d_Curve) tcurve = new Geom2d_TrimmedCurve(aCurve,First,Last); //protection agains parabols ets
     Geom2dConvert_ApproxCurve approx (tcurve, myTol2d,myContinuity2d,myNbMaxSeg , 6 );
     if ( approx.HasResult() )
       aBSpline2d = Handle(Geom2d_BSplineCurve)::DownCast(approx.Curve());
@@ -1221,7 +1221,7 @@ Standard_Boolean ShapeCustom_BSplineRestriction::ConvertCurve2d(Handle(Geom2d_Cu
   }
 
   if (aCurve->IsKind(STANDARD_TYPE(Geom2d_BezierCurve)) && myParameters->ConvertCurve2d()) {
-    Handle(Geom2d_BSplineCurve) aBSpline2d 
+    Handle(Geom2d_Curve) aBSpline2d 
       = Geom2dConvert::CurveToBSplineCurve(aCurve,Convert_QuasiAngular);
     Handle(Geom2d_Curve) ResCurve;
     if(ConvertCurve2d(aBSpline2d,ResCurve,IsConvert,First,Last,TolCur,Standard_False)) {
index d643a9a..a8d6fad 100644 (file)
@@ -130,7 +130,7 @@ void ShapeUpgrade_ConvertCurve2dToBezier::Compute()
     Handle(Geom2d_BSplineCurve) aBSpline2d;
     Standard_Real Shift = 0.;
     if(myCurve->IsKind(STANDARD_TYPE(Geom2d_Conic))) {
-      Handle(Geom2d_TrimmedCurve) tcurve = new Geom2d_TrimmedCurve(myCurve,First,Last); //protection agains parabols ets
+      Handle(Geom2d_Curve) tcurve = new Geom2d_TrimmedCurve(myCurve,First,Last); //protection agains parabols ets
       Geom2dConvert_ApproxCurve approx (tcurve, Precision::Approximation(), 
                                        GeomAbs_C1, 100, 6 );
       if ( approx.HasResult() )
index b4f2cd7..640d2a0 100644 (file)
@@ -113,7 +113,7 @@ void ShapeUpgrade_ConvertCurve3dToBezier::Compute()
     Handle(Geom_BSplineCurve) aBSpline;
     Standard_Real Shift = 0.;
     if(myCurve->IsKind(STANDARD_TYPE(Geom_Conic))) {
-      Handle(Geom_TrimmedCurve) tcurve = new Geom_TrimmedCurve(myCurve,First,Last); //protection agains parabols ets
+      Handle(Geom_Curve) tcurve = new Geom_TrimmedCurve(myCurve,First,Last); //protection agains parabols ets
       GeomConvert_ApproxCurve approx (tcurve, Precision::Approximation(), 
                                      GeomAbs_C1, 100, 6 );
       if ( approx.HasResult() )
index e7ca8c3..a35c36b 100644 (file)
@@ -15,8 +15,8 @@
 
 #include <ShapeUpgrade_FixSmallBezierCurves.ixx>
 #include <TopoDS_Edge.hxx>
-#include <Geom_Curve.hxx>
-#include <Geom2d_Curve.hxx>
+#include <Geom_BSplineCurve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
 #include <gp_Pnt.hxx>
 #include <ShapeAnalysis_Edge.hxx>
 #include <TopExp.hxx>
@@ -57,7 +57,7 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
       First = f;
     if(Last > l)
       Last =l;
-    Handle(Geom_TrimmedCurve) trc = new  Geom_TrimmedCurve(c3d,First,Last);
+    Handle(Geom_Curve) trc = new  Geom_TrimmedCurve(c3d,First,Last);
     GeomAbs_Shape aCont = (GeomAbs_Shape)trc->Continuity();
     if(aCont == GeomAbs_C3 || aCont == GeomAbs_CN)
       aCont = GeomAbs_C2;
@@ -95,7 +95,7 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
       First = f;
     if(Last > l)
       Last =l;
-    Handle(Geom2d_TrimmedCurve) trc2d = new  Geom2d_TrimmedCurve(c2d,First,Last);
+    Handle(Geom2d_Curve) trc2d = new  Geom2d_TrimmedCurve(c2d,First,Last);
     GeomAbs_Shape aCont = (GeomAbs_Shape)trc2d->Continuity();
     try {
       OCC_CATCH_SIGNALS
@@ -132,7 +132,7 @@ Standard_Boolean ShapeUpgrade_FixSmallBezierCurves::Approx(Handle(Geom_Curve)& C
        First = f;
       if(Last > l)
        Last =l;
-      Handle(Geom2d_TrimmedCurve) trc2d = new  Geom2d_TrimmedCurve(c2,First,Last);
+      Handle(Geom2d_Curve) trc2d = new  Geom2d_TrimmedCurve(c2,First,Last);
       GeomAbs_Shape aCont = trc2d->Continuity();
       Geom2dConvert_ApproxCurve AproxCurve2d(trc2d,prec,aCont,1,9);
       try {
index dacdf72..b4b339a 100644 (file)
@@ -414,8 +414,8 @@ void ShapeUpgrade_WireDivide::Perform ()
       else if(myEdgeDivide->HasCurve2d() && !Surf.IsNull()) {
        Handle(Geom2d_Curve) c2d;
        sae.PCurve ( E, myFace, c2d, af, al, Standard_False); 
-       Handle(GeomAdaptor_HSurface) AdS = new GeomAdaptor_HSurface(Surf);
-       Handle(Geom2dAdaptor_HCurve) AC2d  = new Geom2dAdaptor_HCurve(c2d,af,al);
+       Handle(Adaptor3d_HSurface) AdS = new GeomAdaptor_HSurface(Surf);
+       Handle(Adaptor2d_HCurve2d) AC2d  = new Geom2dAdaptor_HCurve(c2d,af,al);
        AdCS.Load(AC2d);
        AdCS.Load(AdS);
       }
index 8922383..1e5a802 100644 (file)
@@ -84,7 +84,9 @@ void StepData_StepModel::AddHeaderEntity
 void StepData_StepModel::VerifyCheck(Handle(Interface_Check)& ach) const
 {
   Interface_GeneralLib lib(StepData::HeaderProtocol());
-  Interface_ShareTool sh(this,StepData::HeaderProtocol());
+  Handle(StepData_StepModel) me (this);
+  Handle(Interface_Protocol) aHP = StepData::HeaderProtocol();
+  Interface_ShareTool sh(me,aHP);
   Handle(Interface_GeneralModule) module;  Standard_Integer CN;
   for (Interface_EntityIterator iter = Header(); iter.More(); iter.Next()) {
     Handle(Standard_Transient) head = iter.Value();
@@ -115,7 +117,8 @@ void StepData_StepModel::DumpHeader
     << "   --"<<endl;
 
   Standard_SStream aSStream;
-  StepData_StepWriter SW(this);
+  Handle(StepData_StepModel) me (this);
+  StepData_StepWriter SW(me);
   SW.SendModel(stepro,Standard_True);    // envoi HEADER seul
   SW.Print(aSStream);
   S << aSStream.str().c_str();
index 684acbb..0adf820 100644 (file)
@@ -51,7 +51,6 @@
 //  ....   Creation et Acces de base aux donnees atomiques du fichier    ....
 
 typedef TCollection_HAsciiString String;
-typedef Handle(TCollection_HAsciiString) Handle(String);
 static char txtmes[200];  // plus commode que redeclarer partout
 
 
index 61f845b..25668a0 100644 (file)
@@ -296,9 +296,10 @@ Standard_Integer TDF_Data::CommitTransaction
         }
         // --------------------------------------------------------- Modified.
         else {
+          const TDF_Attribute* anAttrPtr = aPtrCurrentAtt; // to avoid ambiguity
           TDF_Data_DeltaCreation
             ("Modification",
-             aPtrCurrentAtt->DeltaOnModification(backupAtt));
+             anAttrPtr->DeltaOnModification(backupAtt));
           if (aPtrCurrentAtt->myTransaction == backupAtt->myTransaction)
             aPtrCurrentAtt->RemoveBackup();
           attMod = attMod || (aPtrCurrentAtt->myTransaction > 0);
index a900143..9ef17ba 100644 (file)
@@ -569,10 +569,12 @@ static Standard_Integer drawbnd2d(Draw_Interpretor& , Standard_Integer n, const
   gp_Trsf2d tx; gp_Vec2d vx(umax-umin,0.); tx.SetTranslation(vx);
   gp_Trsf2d ty; gp_Vec2d vy(0.,vmax-vmin); ty.SetTranslation(vy);
   
-  Handle(Geom2d_TrimmedCurve) tcx = new Geom2d_TrimmedCurve(cx,0.,umax-umin);
-  Handle(Geom2d_TrimmedCurve) tcy = new Geom2d_TrimmedCurve(cy,0.,vmax-vmin);
-  Handle(Geom2d_TrimmedCurve) tccx = Handle(Geom2d_TrimmedCurve)::DownCast(tcx->Copy()); tccx->Transform(ty);
-  Handle(Geom2d_TrimmedCurve) tccy = Handle(Geom2d_TrimmedCurve)::DownCast(tcy->Copy()); tccy->Transform(tx);
+  Handle(Geom2d_Curve) tcx = new Geom2d_TrimmedCurve(cx,0.,umax-umin);
+  Handle(Geom2d_Curve) tcy = new Geom2d_TrimmedCurve(cy,0.,vmax-vmin);
+  Handle(Geom2d_Curve) tccx = Handle(Geom2d_Curve)::DownCast (tcx->Copy());
+  tccx->Transform(ty);
+  Handle(Geom2d_Curve) tccy = Handle(Geom2d_Curve)::DownCast (tcy->Copy());
+  tccy->Transform(tx);
   
   Draw_Color col(Draw_blanc);
   DrawTrSurf_CurveColor(col);
index 920864d..c9051e1 100644 (file)
@@ -180,8 +180,10 @@ void TopOpeBRep_FacesIntersector::Perform(const TopoDS_Shape& F1,const TopoDS_Sh
   BRepAdaptor_Surface& S2 = mySurface2->ChangeSurface(); S2.Initialize(myFace2);
   mySurfaceType1 = S1.GetType();
   mySurfaceType2 = S2.GetType();
-  myDomain1->Initialize(mySurface1);
-  myDomain2->Initialize(mySurface2);
+  const Handle(Adaptor3d_HSurface)& aSurf1 = mySurface1; // to avoid ambiguity
+  myDomain1->Initialize(aSurf1);
+  const Handle(Adaptor3d_HSurface)& aSurf2 = mySurface2; // to avoid ambiguity
+  myDomain2->Initialize(aSurf2);
 
 #ifdef OCCT_DEBUG
   if (TopOpeBRepTool_GettraceKRO()) KRO_DSFILLER_INTFF.Start();
index afbaacc..4db4e9d 100644 (file)
@@ -267,8 +267,7 @@ void CorrectEdgeTolerance (const TopoDS_Edge& myShape,
         if (cr->IsCurveOnClosedSurface()) {
           // checkclosed = Standard_True;
           GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
-          ACS.Load(GAHS); // sans doute inutile
-          ACS.Load(GHPC); // meme remarque...
+          ACS.Load(GHPC, GAHS); // sans doute inutile
           ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter, aNewTol);
           if (ok) {
             if (aNewTol<aMaxTol)
index 727bf05..43e4bc1 100644 (file)
@@ -332,7 +332,8 @@ static IFSelect_ReturnStatus XSControl_xoption(const Handle(IFSelect_SessionPilo
     Handle(Interface_Static) param = Interface_Static::Static(parname);
     if (param.IsNull()) { sout<<"No static parameter is named "<<parname<<endl;
                          return IFSelect_RetError; }
-    Handle(MoniTool_Option) opt = new MoniTool_Option(param,arg2);
+    const Handle(MoniTool_TypedValue)& aparam = param; // to avoid ambiguity
+    Handle(MoniTool_Option) opt = new MoniTool_Option(aparam,arg2);
     prof->AddOption (opt);
     return IFSelect_RetDone;
   }