1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #include <math_FunctionSetRoot.hxx>
16 #include <math_Gauss.hxx>
17 #include <TColgp_Array1OfPnt.hxx>
18 #include <IntSurf.hxx>
19 #include <Adaptor2d_HCurve2d.hxx>
20 #include <Precision.hxx>
23 #include <TColStd_Array1OfInteger.hxx>
24 #include <TColStd_Array1OfReal.hxx>
25 #include <TColgp_Array1OfPnt2d.hxx>
26 #include <Geom_BSplineCurve.hxx>
28 #include <DrawTrSurf.hxx>
33 static Standard_Integer IndexOfSection = 0;
34 extern Standard_Boolean Blend_GettraceDRAWSECT();
36 // Pour debug : visualisation de la section
38 static void Drawsect(const TheSurface& surf,
40 const Standard_Real param,
41 Blend_CSFunction& Func)
43 gp_Pnt2d p2d = Func.Pnt2d();
44 Standard_Real pc = Func.ParameterOnC();
45 Blend_Point BP(TheSurfaceTool::Value(surf,p2d.X(),p2d.Y()),
46 TheCurveTool::Value(curv,pc),
47 param,p2d.X(),p2d.Y(),pc);
49 Standard_Integer hp,hk,hd,hp2d;
50 Func.GetShape(hp,hk,hd,hp2d);
51 TColStd_Array1OfReal TK(1,hk);
53 TColStd_Array1OfInteger TMul(1,hk);
55 TColgp_Array1OfPnt TP(1,hp);
56 TColgp_Array1OfPnt2d TP2d(1,hp2d);
57 TColStd_Array1OfReal TW(1,hp);
58 Func.Section(BP,TP,TP2d,TW);
59 Handle(Geom_BSplineCurve) sect = new Geom_BSplineCurve
65 char* name = new char[100];
66 sprintf(name,"%s_%d","Section",IndexOfSection);
68 DrawTrSurf::Set(name,sect);
74 #include <Blend_CSWalking_1.gxx>
75 #include <Blend_CSWalking_2.gxx>
76 #include <Blend_CSWalking_3.gxx>
77 #include <Blend_CSWalking_4.gxx>