diff --git a/src/AIS/AIS_IdenticRelation.cxx b/src/AIS/AIS_IdenticRelation.cxx index 3b6cbccc6e..a57d98155c 100644 --- a/src/AIS/AIS_IdenticRelation.cxx +++ b/src/AIS/AIS_IdenticRelation.cxx @@ -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); diff --git a/src/AIS/AIS_InteractiveContext.cxx b/src/AIS/AIS_InteractiveContext.cxx index ff0cad77a0..9aba993f94 100644 --- a/src/AIS/AIS_InteractiveContext.cxx +++ b/src/AIS/AIS_InteractiveContext.cxx @@ -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; diff --git a/src/AIS/AIS_LocalContext.cxx b/src/AIS/AIS_LocalContext.cxx index b9f6b74a0b..8a8ec68b92 100644 --- a/src/AIS/AIS_LocalContext.cxx +++ b/src/AIS/AIS_LocalContext.cxx @@ -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); diff --git a/src/AIS/AIS_LocalContext_1.cxx b/src/AIS/AIS_LocalContext_1.cxx index 2d57d56678..0d62d977b6 100644 --- a/src/AIS/AIS_LocalContext_1.cxx +++ b/src/AIS/AIS_LocalContext_1.cxx @@ -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)); } diff --git a/src/AIS/AIS_MidPointRelation.cxx b/src/AIS/AIS_MidPointRelation.cxx index 89eac2cd9f..d6000540e3 100644 --- a/src/AIS/AIS_MidPointRelation.cxx +++ b/src/AIS/AIS_MidPointRelation.cxx @@ -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); diff --git a/src/AIS/AIS_PlaneTrihedron.cxx b/src/AIS/AIS_PlaneTrihedron.cxx index 7ea3d8a131..ac9583c065 100644 --- a/src/AIS/AIS_PlaneTrihedron.cxx +++ b/src/AIS/AIS_PlaneTrihedron.cxx @@ -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))); } diff --git a/src/AIS/AIS_Trihedron.cxx b/src/AIS/AIS_Trihedron.cxx index aa75b760a7..34decac954 100644 --- a/src/AIS/AIS_Trihedron.cxx +++ b/src/AIS/AIS_Trihedron.cxx @@ -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))); diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cdl b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cdl index acc3d23b6e..55867ee5ff 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cdl +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cdl @@ -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; diff --git a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx index 12bdeb1239..ea6de7e105 100644 --- a/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx +++ b/src/Adaptor3d/Adaptor3d_CurveOnSurface.cxx @@ -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 : diff --git a/src/BOPTest/BOPTest_BOPCommands.cxx b/src/BOPTest/BOPTest_BOPCommands.cxx index 39aba2fab1..54b065f5c0 100644 --- a/src/BOPTest/BOPTest_BOPCommands.cxx +++ b/src/BOPTest/BOPTest_BOPCommands.cxx @@ -56,6 +56,9 @@ #include #include +#include +#include + // static BOPAlgo_PaveFiller* pPF=NULL; // diff --git a/src/BOPTools/BOPTools_AlgoTools2D_1.cxx b/src/BOPTools/BOPTools_AlgoTools2D_1.cxx index 86390a2355..52359fa6f1 100644 --- a/src/BOPTools/BOPTools_AlgoTools2D_1.cxx +++ b/src/BOPTools/BOPTools_AlgoTools2D_1.cxx @@ -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; diff --git a/src/BOPTools/BOPTools_AlgoTools_1.cxx b/src/BOPTools/BOPTools_AlgoTools_1.cxx index 68b4669218..262102bde0 100644 --- a/src/BOPTools/BOPTools_AlgoTools_1.cxx +++ b/src/BOPTools/BOPTools_AlgoTools_1.cxx @@ -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 (aNewTolChangeCurve2d().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(); } diff --git a/src/BRepCheck/BRepCheck_Edge.cxx b/src/BRepCheck/BRepCheck_Edge.cxx index a23283df9f..aab134333a 100644 --- a/src/BRepCheck/BRepCheck_Edge.cxx +++ b/src/BRepCheck/BRepCheck_Edge.cxx @@ -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); diff --git a/src/BRepFeat/BRepFeat_RibSlot.cxx b/src/BRepFeat/BRepFeat_RibSlot.cxx index 5a52d35000..0b81edc999 100644 --- a/src/BRepFeat/BRepFeat_RibSlot.cxx +++ b/src/BRepFeat/BRepFeat_RibSlot.cxx @@ -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(); diff --git a/src/BRepFill/BRepFill_Filling.cxx b/src/BRepFill/BRepFill_Filling.cxx index d903b476f2..2470ed4784 100644 --- a/src/BRepFill/BRepFill_Filling.cxx +++ b/src/BRepFill/BRepFill_Filling.cxx @@ -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 ); diff --git a/src/BRepFill/BRepFill_NSections.cxx b/src/BRepFill/BRepFill_NSections.cxx index 81431a2f50..8c35c70558 100644 --- a/src/BRepFill/BRepFill_NSections.cxx +++ b/src/BRepFill/BRepFill_NSections.cxx @@ -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(); } diff --git a/src/BRepFill/BRepFill_Sweep.cxx b/src/BRepFill/BRepFill_Sweep.cxx index 5e14d93340..51b80a4da7 100644 --- a/src/BRepFill/BRepFill_Sweep.cxx +++ b/src/BRepFill/BRepFill_Sweep.cxx @@ -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 diff --git a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx index e11dda2e5a..6e0f40a203 100644 --- a/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx +++ b/src/BRepIntCurveSurface/BRepIntCurveSurface_Inter.cxx @@ -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; diff --git a/src/BRepLib/BRepLib.cxx b/src/BRepLib/BRepLib.cxx index d9934bf3db..a330798e05 100644 --- a/src/BRepLib/BRepLib.cxx +++ b/src/BRepLib/BRepLib.cxx @@ -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()); diff --git a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx index c35f32ff96..c0b96d6296 100644 --- a/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx +++ b/src/BRepOffsetAPI/BRepOffsetAPI_ThruSections.cxx @@ -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(); } diff --git a/src/BRepTest/BRepTest_BasicCommands.cxx b/src/BRepTest/BRepTest_BasicCommands.cxx index 13a97aa416..420a190554 100644 --- a/src/BRepTest/BRepTest_BasicCommands.cxx +++ b/src/BRepTest/BRepTest_BasicCommands.cxx @@ -47,7 +47,6 @@ #include #include #include - #include #include @@ -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 ; } diff --git a/src/BRepTest/BRepTest_FilletCommands.cxx b/src/BRepTest/BRepTest_FilletCommands.cxx index c4de2d21ad..f8cb060fb4 100644 --- a/src/BRepTest/BRepTest_FilletCommands.cxx +++ b/src/BRepTest/BRepTest_FilletCommands.cxx @@ -46,6 +46,9 @@ #include #include #include +#include +#include +#include #include #include #include diff --git a/src/BRepTest/BRepTest_FillingCommands.cxx b/src/BRepTest/BRepTest_FillingCommands.cxx index 49b4aead6f..638d888c48 100644 --- a/src/BRepTest/BRepTest_FillingCommands.cxx +++ b/src/BRepTest/BRepTest_FillingCommands.cxx @@ -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)); diff --git a/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx b/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx index f40e51dd2c..90d393c73b 100644 --- a/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx +++ b/src/BRepTopAdaptor/BRepTopAdaptor_Tool.cxx @@ -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; } diff --git a/src/Bisector/Bisector_Bisec.cxx b/src/Bisector/Bisector_Bisec.cxx index 9262b91599..21ffeb03c3 100644 --- a/src/Bisector/Bisector_Bisec.cxx +++ b/src/Bisector/Bisector_Bisec.cxx @@ -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 ) diff --git a/src/ChFi3d/ChFi3d_Builder.cdl b/src/ChFi3d/ChFi3d_Builder.cdl index c9d9b4d507..fe89ebf1cc 100644 --- a/src/ChFi3d/ChFi3d_Builder.cdl +++ b/src/ChFi3d/ChFi3d_Builder.cdl @@ -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; diff --git a/src/ChFi3d/ChFi3d_Builder_0.cxx b/src/ChFi3d/ChFi3d_Builder_0.cxx index 445f22acf8..040b295d10 100644 --- a/src/ChFi3d/ChFi3d_Builder_0.cxx +++ b/src/ChFi3d/ChFi3d_Builder_0.cxx @@ -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, // 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; diff --git a/src/ChFi3d/ChFi3d_Builder_0.hxx b/src/ChFi3d/ChFi3d_Builder_0.hxx index a1c683affc..5817598663 100644 --- a/src/ChFi3d/ChFi3d_Builder_0.hxx +++ b/src/ChFi3d/ChFi3d_Builder_0.hxx @@ -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); diff --git a/src/ChFi3d/ChFi3d_Builder_2.cxx b/src/ChFi3d/ChFi3d_Builder_2.cxx index 86e3c4fc71..d5f52e5393 100644 --- a/src/ChFi3d/ChFi3d_Builder_2.cxx +++ b/src/ChFi3d/ChFi3d_Builder_2.cxx @@ -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; diff --git a/src/ChFi3d/ChFi3d_FilBuilder.cxx b/src/ChFi3d/ChFi3d_FilBuilder.cxx index 98aaf957b3..738a705bc9 100644 --- a/src/ChFi3d/ChFi3d_FilBuilder.cxx +++ b/src/ChFi3d/ChFi3d_FilBuilder.cxx @@ -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); diff --git a/src/DrawTrSurf/DrawTrSurf.cdl b/src/DrawTrSurf/DrawTrSurf.cdl index e60ccaf729..3fe17e11ba 100644 --- a/src/DrawTrSurf/DrawTrSurf.cdl +++ b/src/DrawTrSurf/DrawTrSurf.cdl @@ -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 static void Set (const Standard_CString Name, const Handle(T)& Arg, typename std::enable_if::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 static void Set (const Standard_CString Name, const Handle(T)& Arg, typename std::enable_if::value>::type * = 0) { Set (Name, (const Handle(Geom2d_Curve)&)Arg); }" Set(Name : CString; T : Triangulation from Poly); ---Purpose: Sets in the variable . Overwrite the diff --git a/src/ExprIntrp/ExprIntrp_yaccintrf.cxx b/src/ExprIntrp/ExprIntrp_yaccintrf.cxx index e007ea5913..61df40a882 100644 --- a/src/ExprIntrp/ExprIntrp_yaccintrf.cxx +++ b/src/ExprIntrp/ExprIntrp_yaccintrf.cxx @@ -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); } diff --git a/src/Font/Font_BRepFont.cxx b/src/Font/Font_BRepFont.cxx index d25b1557b8..e25f1d87bc 100755 --- a/src/Font/Font_BRepFont.cxx +++ b/src/Font/Font_BRepFont.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -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); diff --git a/src/Font/Font_BRepFont.hxx b/src/Font/Font_BRepFont.hxx index 0bf228fa50..83afd067e2 100755 --- a/src/Font/Font_BRepFont.hxx +++ b/src/Font/Font_BRepFont.hxx @@ -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); diff --git a/src/GeomLib/GeomLib.cxx b/src/GeomLib/GeomLib.cxx index dc3ec85842..3a2b8ce652 100644 --- a/src/GeomLib/GeomLib.cxx +++ b/src/GeomLib/GeomLib.cxx @@ -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 diff --git a/src/GeomToIGES/GeomToIGES_GeomCurve.cxx b/src/GeomToIGES/GeomToIGES_GeomCurve.cxx index e551302916..cfffaa125a 100644 --- a/src/GeomToIGES/GeomToIGES_GeomCurve.cxx +++ b/src/GeomToIGES/GeomToIGES_GeomCurve.cxx @@ -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() ) diff --git a/src/GeomToStep/GeomToStep_MakeCurve.cxx b/src/GeomToStep/GeomToStep_MakeCurve.cxx index 732727f99f..3a0432008a 100644 --- a/src/GeomToStep/GeomToStep_MakeCurve.cxx +++ b/src/GeomToStep/GeomToStep_MakeCurve.cxx @@ -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 { diff --git a/src/GeometryTest/GeometryTest_API2dCommands.cxx b/src/GeometryTest/GeometryTest_API2dCommands.cxx index c3da988c10..39c7748325 100644 --- a/src/GeometryTest/GeometryTest_API2dCommands.cxx +++ b/src/GeometryTest/GeometryTest_API2dCommands.cxx @@ -15,7 +15,7 @@ // commercial license or contractual agreement. #include -#include +#include #include #include #include diff --git a/src/GeometryTest/GeometryTest_APICommands.cxx b/src/GeometryTest/GeometryTest_APICommands.cxx index a72ecf46bb..e5e6c23e88 100644 --- a/src/GeometryTest/GeometryTest_APICommands.cxx +++ b/src/GeometryTest/GeometryTest_APICommands.cxx @@ -14,8 +14,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include #include #include diff --git a/src/GeometryTest/GeometryTest_ConstraintCommands.cxx b/src/GeometryTest/GeometryTest_ConstraintCommands.cxx index fad59f76a1..f53022a648 100644 --- a/src/GeometryTest/GeometryTest_ConstraintCommands.cxx +++ b/src/GeometryTest/GeometryTest_ConstraintCommands.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include diff --git a/src/GeomliteTest/GeomliteTest_API2dCommands.cxx b/src/GeomliteTest/GeomliteTest_API2dCommands.cxx index e657e38408..e499762bf5 100644 --- a/src/GeomliteTest/GeomliteTest_API2dCommands.cxx +++ b/src/GeomliteTest/GeomliteTest_API2dCommands.cxx @@ -18,7 +18,7 @@ #include -#include +#include #include #include #include diff --git a/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx b/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx index ec4923951e..64b090cc04 100644 --- a/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx +++ b/src/HLRTopoBRep/HLRTopoBRep_FaceIsoLiner.cxx @@ -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); diff --git a/src/IGESData/IGESData_BasicEditor.cxx b/src/IGESData/IGESData_BasicEditor.cxx index 8935af292b..b00842b64d 100644 --- a/src/IGESData/IGESData_BasicEditor.cxx +++ b/src/IGESData/IGESData_BasicEditor.cxx @@ -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; } diff --git a/src/IGESData/IGESData_IGESWriter.cdl b/src/IGESData/IGESData_IGESWriter.cdl index 2522bf1482..cb83b36a13 100644 --- a/src/IGESData/IGESData_IGESWriter.cdl +++ b/src/IGESData/IGESData_IGESWriter.cdl @@ -155,6 +155,7 @@ is -- pointer is 2*N-1) -- If is Null, "0" will be sent -- If is True, "Pointer" is sent as negative + ---C++: alias "template void Send (const Handle(T)& val, Standard_Boolean negative = Standard_False, typename std::enable_if::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 diff --git a/src/IGESToBRep/IGESToBRep_Reader.cxx b/src/IGESToBRep/IGESToBRep_Reader.cxx index 32ccf23b10..288681b56f 100644 --- a/src/IGESToBRep/IGESToBRep_Reader.cxx +++ b/src/IGESToBRep/IGESToBRep_Reader.cxx @@ -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; diff --git a/src/IntTools/IntTools_Context.cxx b/src/IntTools/IntTools_Context.cxx index 76b02b8693..30cbd2105e 100644 --- a/src/IntTools/IntTools_Context.cxx +++ b/src/IntTools/IntTools_Context.cxx @@ -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; diff --git a/src/NCollection/NCollection_DefineHSequence.hxx b/src/NCollection/NCollection_DefineHSequence.hxx index fbdf53882c..8857f1987c 100644 --- a/src/NCollection/NCollection_DefineHSequence.hxx +++ b/src/NCollection/NCollection_DefineHSequence.hxx @@ -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 \ + void Append (const Handle(T)& theOther, \ + typename std::enable_if::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) diff --git a/src/QABugs/QABugs_10.cxx b/src/QABugs/QABugs_10.cxx index bdf42dc093..a4229cc9cb 100644 --- a/src/QABugs/QABugs_10.cxx +++ b/src/QABugs/QABugs_10.cxx @@ -46,6 +46,8 @@ #include #include #include +#include +#include static Standard_Integer OCC426 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv) { diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index 7792fd52cf..6d0d620fc5 100644 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/QABugs/QABugs_13.cxx b/src/QABugs/QABugs_13.cxx index 312f252472..89258d5bc2 100644 --- a/src/QABugs/QABugs_13.cxx +++ b/src/QABugs/QABugs_13.cxx @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/QABugs/QABugs_16.cxx b/src/QABugs/QABugs_16.cxx index ce65c74798..cc79a1e5ad 100644 --- a/src/QABugs/QABugs_16.cxx +++ b/src/QABugs/QABugs_16.cxx @@ -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); diff --git a/src/QABugs/QABugs_17.cxx b/src/QABugs/QABugs_17.cxx index 7a3ea386af..44dd476a33 100644 --- a/src/QABugs/QABugs_17.cxx +++ b/src/QABugs/QABugs_17.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -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); diff --git a/src/SWDRAW/SWDRAW_ShapeTool.cxx b/src/SWDRAW/SWDRAW_ShapeTool.cxx index 14b2755de1..ee1f8b7ff0 100644 --- a/src/SWDRAW/SWDRAW_ShapeTool.cxx +++ b/src/SWDRAW/SWDRAW_ShapeTool.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx index c9c9fc58ee..97f7c3372b 100644 --- a/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx +++ b/src/ShapeAnalysis/ShapeAnalysis_Edge.cxx @@ -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 ); } diff --git a/src/ShapeBuild/ShapeBuild_Edge.cxx b/src/ShapeBuild/ShapeBuild_Edge.cxx index 7d42ddc5db..e3815a3d80 100644 --- a/src/ShapeBuild/ShapeBuild_Edge.cxx +++ b/src/ShapeBuild/ShapeBuild_Edge.cxx @@ -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() ) diff --git a/src/ShapeConstruct/ShapeConstruct.cxx b/src/ShapeConstruct/ShapeConstruct.cxx index 3ce84c9f49..54e19a3072 100644 --- a/src/ShapeConstruct/ShapeConstruct.cxx +++ b/src/ShapeConstruct/ShapeConstruct.cxx @@ -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 { diff --git a/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx b/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx index 637776d537..25319d078f 100644 --- a/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx +++ b/src/ShapeCustom/ShapeCustom_BSplineRestriction.cxx @@ -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)) { diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx index d643a9adab..a8d6fadb45 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve2dToBezier.cxx @@ -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() ) diff --git a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx index b4f2cd7b75..640d2a0d8c 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_ConvertCurve3dToBezier.cxx @@ -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() ) diff --git a/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.cxx b/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.cxx index e7ca8c3017..a35c36be58 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_FixSmallBezierCurves.cxx @@ -15,8 +15,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -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 { diff --git a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx index dacdf7268b..b4b339a82b 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx @@ -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); } diff --git a/src/StepData/StepData_StepModel.cxx b/src/StepData/StepData_StepModel.cxx index 8922383d64..1e5a8027f3 100644 --- a/src/StepData/StepData_StepModel.cxx +++ b/src/StepData/StepData_StepModel.cxx @@ -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 << " --"<DeltaOnModification(backupAtt)); + anAttrPtr->DeltaOnModification(backupAtt)); if (aPtrCurrentAtt->myTransaction == backupAtt->myTransaction) aPtrCurrentAtt->RemoveBackup(); attMod = attMod || (aPtrCurrentAtt->myTransaction > 0); diff --git a/src/TestTopOpe/TestTopOpe_CORCommands.cxx b/src/TestTopOpe/TestTopOpe_CORCommands.cxx index a9001436fb..9ef17baee0 100644 --- a/src/TestTopOpe/TestTopOpe_CORCommands.cxx +++ b/src/TestTopOpe/TestTopOpe_CORCommands.cxx @@ -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); diff --git a/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx b/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx index 920864d40e..c9051e1b5d 100644 --- a/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx +++ b/src/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx @@ -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(); diff --git a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx index afbaacc65a..4db4e9d5d5 100644 --- a/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx +++ b/src/TopOpeBRepBuild/TopOpeBRepBuild_Tools_1.cxx @@ -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 (aNewTolAddOption (opt); return IFSelect_RetDone; }