// Copyright (c) 1995-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef OCCT_DEBUG static void DEBUG(const AppParCurves_MultiCurve& MC) { Standard_Integer i, j; Standard_Integer nbcu = MC.NbCurves(); Standard_Integer nbpoles = MC.NbPoles(); TColgp_Array1OfPnt Poles(1, nbpoles); TColgp_Array1OfPnt2d Poles2d(1, nbpoles); for (i = 1; i <= nbcu; i++) { std::cout << " Curve No. " << i << std::endl; if (MC.Dimension(i) == 3) { MC.Curve(i, Poles); for (j = 1; j <= nbpoles; j++) { std::cout<< " Pole = " << Poles(j).X() <<" "< 0) { BSplCLib::IncreaseDegree(deg, ThePoles, BSplCLib::NoWeights(), Points, BSplCLib::NoWeights()); } else { Points = ThePoles; } for (k = first; k <= last; k++) { tabMU.ChangeValue(kpol++).SetPoint(j, Points(k)); } } kpoles3d = kpol; for (j = thefirst; j <= nb2d; j++) { kpol = kpoles2d; TColgp_Array1OfPnt2d ThePoles2d(1, CU.NbPoles()); CU.Curve(j+nb3d, ThePoles2d); Inc = deg-mydegre; TColgp_Array1OfPnt2d Points2d(1, deg+1); if (Inc > 0) { BSplCLib::IncreaseDegree(deg, ThePoles2d, BSplCLib::NoWeights(), Points2d, BSplCLib::NoWeights()); } else { Points2d = ThePoles2d; } for (k = first; k <= last; k++) { tabMU.ChangeValue(kpol++).SetPoint2d(j+nb3d, Points2d(k)); } } kpoles2d = kpol; } mySpline = AppParCurves_MultiBSpCurve(tabMU, TheKnots, TheMults); } #ifdef OCCT_DEBUG if(debug) DEBUG(mySpline); #endif myDone = Standard_True; } const AppParCurves_MultiBSpCurve& Approx_MCurvesToBSpCurve::Value() const { return mySpline; } const AppParCurves_MultiBSpCurve& Approx_MCurvesToBSpCurve::ChangeValue() { return mySpline; }