]> OCCT Git - occt-copy.git/commitdiff
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 3b6cbccc6e57b446681a438d7093b384271db3c8..a57d98155c4030f53c4c15b158ddc8ed45b54089 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 ff0cad77a02bd02823fdf955d83a1ca0de34a1cc..9aba993f94f38c953af8e28e0d9b668374cae6da 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 b9f6b74a0b9de2676796de4f60fa67a131a6072b..8a8ec68b926f1aa2cf433a508c9a7598a8685ddf 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 2d57d5667817f923f5479f64e24681c1ef4121dd..0d62d977b6c4e7a4432fb70a7a102faf7bf9c2b0 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 89eac2cd9f9d4abe55f50f7b11ee55df56940ef6..d6000540e3c071ce19c2bd7921561455be531bf0 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 7ea3d8a1312cc8237120c95317dfe079bb4bdbcc..ac9583c065a96e641ab3f5de970e1cd9fffeda8a 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 aa75b760a7bfcbd2f0431d919982cca6eaf48c6b..34decac95410676782bd82053bc664ee3035c654 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 acc3d23b6e78e1ad3d963c1349c647c632aeac16..55867ee5fffa3040b150a482a3db4348cd3b2fc3 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 12bdeb1239cd3cea497dccb5a25c5793c98e02a0..ea6de7e105248f6cbc3b576d69998ac238c65072 100644 (file)
@@ -743,6 +743,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 39aba2fab1c1a63253244dc7eebc1ce77554158d..54b065f5c05a907a9421e24898c71d9eecd9691f 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 86390a2355470474fa8ad77ec683dccc14659cf7..52359fa6f1b024c308cb4e0da92b67c56fc49136 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 68b466921864bc42658fd93f45093e4bb04814fb..262102bde032758f64105e1ccdc57de733043917 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 6e2ae65be80736a6df6a865bf435f574a941d440..bb15e5d45a93e8722bb6b73ba71f0b117d069853 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 a23283df9f05cef0930ce4b696f4dacbfa55df17..aab134333ad20446bd73225c6842617658cb5580 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 5a52d3500078cada8b6891f87f45146945e99124..0b81edc999c4bf6cd60571a63f77a61c40020366 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 d903b476f2c2d30cad07756e537e7914c71e9afa..2470ed47846b76cc1c848d6723b007c6335b9b38 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 81431a2f501050079d274333a3da2196a1a8fca3..8c35c705582d277995ac3dbb2239b261c63954d6 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 5e14d93340d495b210f2451e50042778901729e1..51b80a4da7d5da3cf5e445db8669672af5dd1ede 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 e11dda2e5a274376d7a369ab931ad212b812cf6e..6e0f40a203df0e7a471c417012a8d7dbc3312f10 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 d9934bf3db20764535cf0676fb276fe1150fefc1..a330798e05da2277f8c1d0b4ec54fa78c6c32bde 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 c35f32ff96f90a910e6cedcba6c0e8546a30f74d..c0b96d6296c6c9782286ccddaac18648e35c7b95 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 13a97aa416565d9e10b0d2e321b046d1fb4031af..420a190554814e31c1c20b0b69a729f1f67b4d05 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 c4de2d21ad009c058d79dceaa4a78c5626a3f054..f8cb060fb4de639fc1bf07d11a98fc98997e5699 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 49b4aead6f5799312895b66692aa4881a835b529..638d888c48a084bcd21065aa58f9e7b62d720966 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 f40e51dd2c71ef0e3c783b5efdbe32d0a8041060..90d393c73b5866b229aed727f5e2b59d445e95b5 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 9262b91599383002a8fb3a91896f2d05142ebe61..21ffeb03c375c2976e144c81ba6c4611672fd1d7 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 c9d9b4d507ce9a31043be3a42a560072bb37c7be..fe89ebf1ccea6acc1ec9b12dfa7365b6cf24e5c7 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 445f22acf83309b242514ba1ed22dd99bba4e8c3..040b295d10d1936d7e92fa66e4233b1afc70604a 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 a1c683affc8ea98cec79f258a034eb8d5b935b27..5817598663b1774edeab60d4aedb564b20f7e377 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 86e3c4fc71d384f4fd1906b20fb9cfbe5a5f99a5..d5f52e5393c32f19181703a4d44c07307cfa7b8d 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 98aaf957b373ff28fee08bfe9f1ab57d3cfab54e..738a705bc985e4527987d3ae6370aff74a258bd5 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 e60ccaf7291faaad530ed87b8ce407efc17749f5..3fe17e11ba7577e8226bd6122597b822a7ff49e4 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 e007ea5913567f14c43e387ea4ea3f0e907a1b87..61df40a882cb5006aba6965a79f44d769f0d022a 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 d25b1557b86a97c451739e301a5d5e64fec884f5..e25f1d87bc24c10b36b824da3d60d24eaf9be8ad 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 0bf228fa50dd70d5cb3a71a3c976bc522e517a4a..83afd067e2cc28f89eeef42ba826665986fac5aa 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 dc3ec85842050845cf2ae23ba7ab14c3d29add76..3a2b8ce652c71b7d53eeaea95a08637db9490ed4 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 e5513029163b10376ea6c6b7ef899a7817eb34a6..cfffaa125ac333949dd8aeeff075230c1176a8a8 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 732727f99fada7a03469ffe6a1aa403db1d33ab3..3a0432008acf9ca75202dec344277c8d2f25d17d 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 c3da988c10c8fd9ad074135781d009ecdbf61073..39c774832555fffa5b2710afcf70387e519e7013 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 a72ecf46bb25a37f7aac405de31ac802dbcc977f..e5e6c23e882d73f247a013f82831a0090d13c1de 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 fad59f76a13f9d528c9d82ff3cb05eb2c53cd746..f53022a648d415ed63417d94e1ae8ac49fdfc8a4 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 e657e384089c03573ee687bcf8550e23c932ad9b..e499762bf5e590ee6ef3b9f0899636d2ce93353e 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 ec4923951ecc02d3f6888762a83c1e6ae3cf68f8..64b090cc04079054d6026fdeaa04c6ba0136f771 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 8935af292b8709fa0c0ea77eba93da4a176d6a66..b00842b64d8fa647f167f5d067899827f807756e 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 2522bf1482358401e0b06457bc1c9f6a5fd9ca55..cb83b36a13e1a070f64e2a72cf4f6a75b4afe128 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 32ccf23b1076ad4e696aaeec43bf4caf19ca3b09..288681b56fb0b715ad330da78f7c434b8c707aa6 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 76b02b8693a4b1f0b67aa762827a694fc21f5757..30cbd2105ebad8c554a29da8f52644ca6e0dadfb 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 fbdf53882ceafc531f7a483bd15964e7b122fba7..8857f1987c397b9b588bd6b937d683fd4b8b014c 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 bdf42dc093840474fb2a4643f2788bbd1e8fe73d..a4229cc9cbae65f78dd148e6b861d520655d3aa2 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 7792fd52cf10fdbeeb1f479ade1ebac1dd42d184..6d0d620fc5df07cf18179b3cca75a8b0a45a06a7 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 312f2524722ef41818c48a8d012e88ef06c031c0..89258d5bc210b118205587d63087192d6740b225 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 ce65c74798d53314339ed66ec6e950edaa15b757..cc79a1e5ad5f267cb524b7b0b1536a8fe032da2d 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 7a3ea386af4f487fc3dc58e4b05b0180a5c17f0d..44dd476a3399105d0edfc743cff9a2e630358080 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 14b2755de1143cfdedb627bd52ce889ede9f72b2..ee1f8b7ff08c1c25e33c781e750e4594ca1e7a0d 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 c9c9fc58eeeb27ad9692e8a77764df2aee78cc10..97f7c3372b20188ec6b8e70580f08e1ff69176cc 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 7d42ddc5dba2a105119cbbfa1d0d1aa742f2435e..e3815a3d805c7267a24d37389cd5231aff7739b9 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 3ce84c9f49dcbfa4fc0de40fbca753d32a259ab8..54e19a3072235daa546930dfe784b4657ce0cab6 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 637776d537a4d04b1ca6aed687b2e5ce5c3a34a4..25319d078fd47d4621df6bc5561b69fbc9c130f1 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 d643a9adab697b24b02df0b1fb477227b71b812d..a8d6fadb458306228484c167ce8273ea073e680c 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 b4f2cd7b7592e91bc0e2f023deb72ae961404515..640d2a0d8cf39367fc8429aad1e9e3b725fed7a0 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 e7ca8c30178b3e27b0928aea5ef1beea922a5df8..a35c36be58be0bb32393203b71b464378b1b8fff 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 dacdf7268ba1974560258330b6c3f0babac32aae..b4b339a82b1f679252755b3955427547a39ce52b 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 8922383d64019d73bef8a92c700f87d3cdae6304..1e5a8027f31e71b98004a53ac15728513c2843ef 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 684acbb8d2bdfb4abcec9e1c345edf573ae9e909..0adf820fda83e21d5961032f6bb9c17440193763 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 61f845bde52e89a2da5d512588d38dd2bf558a58..25668a0df54c987d3b815d4a2a8364a69c0d42ea 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 a9001436fb7c11e302e85e8437b54715bb4a38ed..9ef17baee012344f06c6fcbd8c19680322cbb021 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 920864d40e3cdaf51f88678039d506721f95d906..c9051e1b5d895ff384914b67ed7dd7680e7bea97 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 afbaacc65ad14d6384b6b74947c61de41d9b72f4..4db4e9d5d5e349f5e1385e107a7d2b0671bdcefb 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 727bf053cbfb644e4fc522c1c5ac5779dafb3b5b..43e4bc1fd379653e9e25885f31da8b2225702eca 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;
   }