0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / Font / Font_BRepFont.cxx
index d25b155..e25f1d8 100755 (executable)
@@ -26,6 +26,7 @@
 #include <Geom_Plane.hxx>
 #include <Geom2d_BezierCurve.hxx>
 #include <Geom2d_BSplineCurve.hxx>
+#include <Geom2d_TrimmedCurve.hxx>
 #include <Geom2d_Line.hxx>
 #include <GeomAPI.hxx>
 #include <GeomAdaptor_HSurface.hxx>
@@ -82,7 +83,7 @@ void Font_BRepFont::init()
 {
   mySurface        = new Geom_Plane (gp_Pln (gp::XOY()));
   myCurve2dAdaptor = new Geom2dAdaptor_HCurve();
-  Handle(GeomAdaptor_HSurface) aSurfAdaptor = new GeomAdaptor_HSurface (mySurface);
+  Handle(Adaptor3d_HSurface) aSurfAdaptor = new GeomAdaptor_HSurface (mySurface);
   myCurvOnSurf.Load (aSurfAdaptor);
 
   myFixer.FixWireMode()          = 1;
@@ -212,14 +213,15 @@ TopoDS_Shape Font_BRepFont::RenderGlyph (const Standard_Utf32Char& theChar)
 // function : to3d
 // purpose  :
 // =======================================================================
-bool Font_BRepFont::to3d (const Handle(Geom2d_Curve) theCurve2d,
+bool Font_BRepFont::to3d (const Handle(Geom2d_Curve)& theCurve2d,
                           const GeomAbs_Shape        theContinuity,
                           Handle(Geom_Curve)&        theCurve3d)
 {
   Standard_Real aMaxDeviation   = 0.0;
   Standard_Real anAverDeviation = 0.0;
   myCurve2dAdaptor->ChangeCurve2d().Load (theCurve2d);
-  myCurvOnSurf.Load (myCurve2dAdaptor);
+  const Handle(Adaptor2d_HCurve2d)& aCurve = myCurve2dAdaptor; // to avoid ambiguity
+  myCurvOnSurf.Load (aCurve);
   GeomLib::BuildCurve3d (myPrecision, myCurvOnSurf,
                          myCurve2dAdaptor->FirstParameter(), myCurve2dAdaptor->LastParameter(),
                          theCurve3d, aMaxDeviation, anAverDeviation, theContinuity);