Warning, /include/opencascade/Blend_Walking.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 <TColgp_Array2OfVec.hxx>
0019
0020 #include <IntSurf.hxx>
0021 #include <Adaptor2d_Curve2d.hxx>
0022 #include <CSLib.hxx>
0023 #include <CSLib_NormalStatus.hxx>
0024 #include <Precision.hxx>
0025
0026 #ifdef OCCT_DEBUG
0027 #include <TColStd_Array1OfInteger.hxx>
0028 #include <TColStd_Array1OfReal.hxx>
0029 #include <TColgp_Array1OfPnt2d.hxx>
0030 #include <Geom_BSplineCurve.hxx>
0031 #ifdef DRAW
0032 #include <Draw.hxx>
0033 #include <DrawTrSurf_BSplineCurve.hxx>
0034 #endif
0035 //POP pour NT
0036 #include <stdio.h>
0037
0038 static Standard_Boolean sectioncalculee;
0039 static Standard_Integer IndexOfSection = 0;
0040 static Standard_Integer IndexOfRejection = 0;
0041 static Standard_Integer nbcomputedsection;
0042 extern Standard_Boolean Blend_GettraceDRAWSECT();
0043 extern Standard_Boolean Blend_GetcontextNOTESTDEFL();
0044
0045 // Pour debug : visualisation de la section
0046 static void Drawsect(const TheSurface& surf1,
0047 const TheSurface& surf2,
0048 const math_Vector& sol,
0049 const Standard_Real param,
0050 Blend_Function& Func,
0051 const Blend_Status State)
0052 {
0053 // if(!sectioncalculee) return;
0054 Blend_Point BP(TheSurfaceTool::Value(surf1,sol(1),sol(2)),
0055 TheSurfaceTool::Value(surf2,sol(3),sol(4)),
0056 param,sol(1),sol(2),sol(3),sol(4));
0057 Standard_Integer hp,hk,hd,hp2d;
0058 Func.GetShape(hp,hk,hd,hp2d);
0059 TColStd_Array1OfReal TK(1,hk);
0060 Func.Knots(TK);
0061 TColStd_Array1OfInteger TMul(1,hk);
0062 Func.Mults(TMul);
0063 TColgp_Array1OfPnt TP(1,hp);
0064 TColgp_Array1OfPnt2d TP2d(1,hp2d);
0065 TColStd_Array1OfReal TW(1,hp);
0066 Func.Section(BP,TP,TP2d,TW);
0067 Handle(Geom_BSplineCurve) sect = new Geom_BSplineCurve
0068 (TP,TW,TK,TMul,hd);
0069
0070 //POP pour NT
0071 //char name[100];
0072 char* name = new char[100];
0073 if ((State==Blend_StepTooLarge) ||(State==Blend_SamePoints)) {
0074 IndexOfRejection ++;
0075 sprintf(name,"%s_%d","Rejection",IndexOfRejection);
0076 }
0077 else {
0078 IndexOfSection++;
0079 sprintf(name,"%s_%d","Section",IndexOfSection);
0080 }
0081 #ifdef DRAW
0082 Handle(DrawTrSurf_BSplineCurve) BS
0083 = new (DrawTrSurf_BSplineCurve)(sect);
0084 BS->ClearPoles();
0085 BS->ClearKnots();
0086 if (State==Blend_StepTooLarge) BS->SetColor(Draw_violet);
0087 if (State==Blend_SamePoints) BS->SetColor(Draw_rose);
0088 Draw::Set(name,BS);
0089 #endif
0090 }
0091
0092 static void Drawsect(const TheSurface& surf1,
0093 const TheSurface& surf2,
0094 const math_Vector& sol,
0095 const Standard_Real param,
0096 Blend_Function& Func)
0097 {
0098 Drawsect(surf1, surf2, sol, param, Func, Blend_OK);
0099 }
0100 #endif
0101
0102 #include <Blend_Walking_1.gxx>
0103 #include <Blend_Walking_2.gxx>
0104 #include <Blend_Walking_3.gxx>
0105 #include <Blend_Walking_4.gxx>
0106
0107
0108