b311480e |
1 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
3 | // |
973c2be1 |
4 | // This file is part of Open CASCADE Technology software library. |
b311480e |
5 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
11 | // |
973c2be1 |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
b311480e |
14 | |
7fd59977 |
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> |
21 | |
0797d9d3 |
22 | #ifdef OCCT_DEBUG |
7fd59977 |
23 | #include <TColStd_Array1OfInteger.hxx> |
24 | #include <TColStd_Array1OfReal.hxx> |
25 | #include <TColgp_Array1OfPnt2d.hxx> |
26 | #include <Geom_BSplineCurve.hxx> |
27 | #ifdef DRAW |
28 | #include <DrawTrSurf.hxx> |
29 | #endif |
30 | //POP pour NT |
31 | #include <stdio.h> |
32 | |
33 | static Standard_Integer IndexOfSection = 0; |
34 | extern Standard_Boolean Blend_GettraceDRAWSECT(); |
35 | |
36 | // Pour debug : visualisation de la section |
37 | |
38 | static void Drawsect(const TheSurface& surf, |
39 | const TheCurve& curv, |
40 | const Standard_Real param, |
41 | Blend_CSFunction& Func) |
42 | { |
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); |
48 | |
49 | Standard_Integer hp,hk,hd,hp2d; |
50 | Func.GetShape(hp,hk,hd,hp2d); |
51 | TColStd_Array1OfReal TK(1,hk); |
52 | Func.Knots(TK); |
53 | TColStd_Array1OfInteger TMul(1,hk); |
54 | Func.Mults(TMul); |
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 |
60 | (TP,TW,TK,TMul,hd); |
61 | IndexOfSection++; |
62 | |
63 | //POP pour NT |
64 | //char name[100]; |
65 | char* name = new char[100]; |
66 | sprintf(name,"%s_%d","Section",IndexOfSection); |
67 | #ifdef DRAW |
68 | DrawTrSurf::Set(name,sect); |
69 | #endif |
70 | } |
71 | |
72 | #endif |
73 | |
74 | #include <Blend_CSWalking_1.gxx> |
75 | #include <Blend_CSWalking_2.gxx> |
76 | #include <Blend_CSWalking_3.gxx> |
77 | #include <Blend_CSWalking_4.gxx> |