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
9 // under the terms of the GNU Lesser General Public 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.
17 #include <CSLib_NormalPolyDef.ixx>
20 //=============================================================================
21 CSLib_NormalPolyDef::CSLib_NormalPolyDef(const Standard_Integer k0,
22 const TColStd_Array1OfReal& li)
23 //=============================================================================
27 for(Standard_Integer i=0;i<=k0;i++)
31 //=============================================================================
32 Standard_Boolean CSLib_NormalPolyDef::Value(const Standard_Real X,
34 //=============================================================================
41 for(Standard_Integer i=0;i<=myK0;i++){
42 F=F+PLib::Bin(myK0,i)*pow(co,i)*pow(si,(myK0-i))*myTABli(i);
47 //=============================================================================
48 Standard_Boolean CSLib_NormalPolyDef::Derivative(const Standard_Real X,
50 //=============================================================================
56 for(Standard_Integer i=0;i<=myK0;i++){
57 D=D+PLib::Bin(myK0,i)*pow(co,(i-1))*pow(si,(myK0-i-1))*(myK0*co*co-i);
62 //=============================================================================
63 Standard_Boolean CSLib_NormalPolyDef::Values(const Standard_Real X,
66 //=============================================================================
73 for(Standard_Integer i=0;i<=myK0;i++){
74 F=F+PLib::Bin(myK0,i)*pow(co,i)*pow(si,(myK0-i))*myTABli(i);
75 D=D+PLib::Bin(myK0,i)*pow(co,(i-1))*
76 pow(si,(myK0-i-1))*(myK0*co*co-i)*myTABli(i);