Warning, /include/opencascade/Blend_CSWalking.gxx is written in an unsupported language. File is not indexed.
0001 // Copyright (c) 1995-1999 Matra Datavision
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014
0015 #include <math_FunctionSetRoot.hxx>
0016 #include <math_Gauss.hxx>
0017 #include <TColgp_Array1OfPnt.hxx>
0018 #include <IntSurf.hxx>
0019 #include <Adaptor2d_Curve2d.hxx>
0020 #include <Precision.hxx>
0021
0022 #ifdef OCCT_DEBUG
0023 #include <TColStd_Array1OfInteger.hxx>
0024 #include <TColStd_Array1OfReal.hxx>
0025 #include <TColgp_Array1OfPnt2d.hxx>
0026 #include <Geom_BSplineCurve.hxx>
0027 #ifdef DRAW
0028 #include <DrawTrSurf.hxx>
0029 #endif
0030 //POP pour NT
0031 #include <stdio.h>
0032
0033 static Standard_Integer IndexOfSection = 0;
0034 extern Standard_Boolean Blend_GettraceDRAWSECT();
0035
0036 // Pour debug : visualisation de la section
0037
0038 static void Drawsect(const TheSurface& surf,
0039 const TheCurve& curv,
0040 const Standard_Real param,
0041 Blend_CSFunction& Func)
0042 {
0043 gp_Pnt2d p2d = Func.Pnt2d();
0044 Standard_Real pc = Func.ParameterOnC();
0045 Blend_Point BP(TheSurfaceTool::Value(surf,p2d.X(),p2d.Y()),
0046 TheCurveTool::Value(curv,pc),
0047 param,p2d.X(),p2d.Y(),pc);
0048
0049 Standard_Integer hp,hk,hd,hp2d;
0050 Func.GetShape(hp,hk,hd,hp2d);
0051 TColStd_Array1OfReal TK(1,hk);
0052 Func.Knots(TK);
0053 TColStd_Array1OfInteger TMul(1,hk);
0054 Func.Mults(TMul);
0055 TColgp_Array1OfPnt TP(1,hp);
0056 TColgp_Array1OfPnt2d TP2d(1,hp2d);
0057 TColStd_Array1OfReal TW(1,hp);
0058 Func.Section(BP,TP,TP2d,TW);
0059 Handle(Geom_BSplineCurve) sect = new Geom_BSplineCurve
0060 (TP,TW,TK,TMul,hd);
0061 IndexOfSection++;
0062
0063 //POP pour NT
0064 //char name[100];
0065 char* name = new char[100];
0066 sprintf(name,"%s_%d","Section",IndexOfSection);
0067 #ifdef DRAW
0068 DrawTrSurf::Set(name,sect);
0069 #endif
0070 }
0071
0072 #endif
0073
0074 #include <Blend_CSWalking_1.gxx>
0075 #include <Blend_CSWalking_2.gxx>
0076 #include <Blend_CSWalking_3.gxx>
0077 #include <Blend_CSWalking_4.gxx>