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.
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);
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);
// 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())
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);
}
}
if (theSelectionMode != -1)
{
- if (!mgrSelector->Contains (theIObj))
+ const Handle(SelectMgr_SelectableObject)& anObj = theIObj; // to avoid ambiguity
+ if (!mgrSelector->Contains (anObj))
{
mgrSelector->Load (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);
}
{
// 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;
}
}
// 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);
{
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;
}
// 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())
}
// 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);
}
}
if(EO.IsNull())
- EO = new SelectMgr_EntityOwner(anIObj);
+ EO = new SelectMgr_EntityOwner((const Handle(SelectMgr_SelectableObject)&)anIObj);
}
ClearSelected(Standard_False);
}
if(EO.IsNull())
{
- EO = new SelectMgr_EntityOwner(anIObj);
+ EO = new SelectMgr_EntityOwner((const Handle(SelectMgr_SelectableObject)&)anIObj);
}
}
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));
}
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);
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);
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);
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);
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);
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;
{ //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)));
}
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
{ //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)));
}
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)));
---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;
}
}
+//=======================================================================
+//function : Load
+//purpose :
+//=======================================================================
+
+void Adaptor3d_CurveOnSurface::Load (const Handle(Adaptor2d_HCurve2d)& C,
+ const Handle(Adaptor3d_HSurface)& S)
+{
+ Load (C);
+ Load (S);
+}
+
//=======================================================================
//function : FirstParameter
//purpose :
#include <BOPTest_DrawableShape.hxx>
#include <BOPTest_Objects.hxx>
+#include <Geom_Curve.hxx>
+#include <Geom2d_Curve.hxx>
+
//
static BOPAlgo_PaveFiller* pPF=NULL;
//
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;
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) {
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");
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();
}
}
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);
#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;
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();
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 );
// 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();
}
}
}
- 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
if( !myCurrentnbpoints)
continue;
- myFastClass->Initialize(aSurfForFastClass);
+ const Handle(Adaptor3d_HSurface)& aSurf = aSurfForFastClass; // to avoid ambiguity
+ myFastClass->Initialize(aSurf);
myIndFace = i;
if(FindPoint())
return;
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,
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());
// 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();
}
#include <GeomAdaptor_Curve.hxx>
#include <ProjLib_ComputeApproxOnPolarSurface.hxx>
#include <DrawTrSurf.hxx>
-
#include <Geom_Plane.hxx>
#include <Draw_Segment3D.hxx>
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 ;
}
#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>
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));
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
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);
}
}
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));
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;
}
{
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;
}
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);
//=============================================================================
{
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);
}
}
{
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);
}
}
//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 )
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;
//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)
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);
}
//=======================================================================
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);
}
//=======================================================================
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));
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));
// <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,
//
//=======================================================================
-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;
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);
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,
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);
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*/,
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();
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;
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()) {
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();
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);
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));
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();
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,
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;
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);
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));
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);
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));
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);
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);
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);
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));
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);
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));
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);
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);
-- 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);
-- 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
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))) {
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);
}
#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>
{
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;
// 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);
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);
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
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() )
#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 {
#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 {
// 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>
// 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>
#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>
#include <GeomliteTest.hxx>
-#include <Geom2d_Curve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
#include <Draw.hxx>
#include <Draw_Interpretor.hxx>
#include <DrawTrSurf.hxx>
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;
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;
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);
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);
theunit = Standard_False;
theproto = protocol;
themodel = GetCasted(IGESData_IGESModel,Interface_InterfaceModel::Template("iges"));
- theglib = protocol;
+ theglib = Interface_GeneralLib (protocol);
theslib = protocol;
}
theunit = Standard_False;
theproto = protocol;
themodel = model;
- theglib = protocol;
+ theglib = Interface_GeneralLib (protocol);
theslib = protocol;
}
-- 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
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;
}
//
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;
_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)
#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)
{
#include <AIS_Shape.hxx>
#include <TopoDS_Shape.hxx>
+#include <Geom_Surface.hxx>
#include <Geom_Axis2Placement.hxx>
#include <gp.hxx>
#include <gp_Trsf.hxx>
#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>
}
// 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);
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);
#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>
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);
#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>
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 );
}
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() )
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);
{
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());
}
}
- 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 {
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());
}
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)) {
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());
}
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)) {
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() )
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() )
#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>
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;
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
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 {
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);
}
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();
<< " --"<<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();
// .... 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
}
// --------------------------------------------------------- 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);
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);
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();
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)
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;
}