1 // Created on: 1996-08-23
2 // Created by: Benoit TANNIOU
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
18 #include <CSLib_NormalPolyDef.hxx>
21 //=============================================================================
22 CSLib_NormalPolyDef::CSLib_NormalPolyDef(const Standard_Integer k0,
23 const TColStd_Array1OfReal& li)
24 //=============================================================================
28 for(Standard_Integer i=0;i<=k0;i++)
32 //=============================================================================
33 Standard_Boolean CSLib_NormalPolyDef::Value(const Standard_Real X,
35 //=============================================================================
42 for(Standard_Integer i=0;i<=myK0;i++){
43 F=F+PLib::Bin(myK0,i)*pow(co,i)*pow(si,(myK0-i))*myTABli(i);
48 //=============================================================================
49 Standard_Boolean CSLib_NormalPolyDef::Derivative(const Standard_Real X,
51 //=============================================================================
57 for(Standard_Integer i=0;i<=myK0;i++){
58 D=D+PLib::Bin(myK0,i)*pow(co,(i-1))*pow(si,(myK0-i-1))*(myK0*co*co-i);
63 //=============================================================================
64 Standard_Boolean CSLib_NormalPolyDef::Values(const Standard_Real X,
67 //=============================================================================
74 for(Standard_Integer i=0;i<=myK0;i++){
75 F=F+PLib::Bin(myK0,i)*pow(co,i)*pow(si,(myK0-i))*myTABli(i);
76 D=D+PLib::Bin(myK0,i)*pow(co,(i-1))*
77 pow(si,(myK0-i-1))*(myK0*co*co-i)*myTABli(i);