1// Created on: 1995-10-21 2// Created by: Andre LIEUTIER 3// Copyright (c) 1995-1999 Matra Datavision 4// Copyright (c) 1999-2014 OPEN CASCADE SAS 5// 6// This file is part of Open CASCADE Technology software library. 7// 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. 13// 14// Alternatively, this file may be used under the terms of Open CASCADE 15// commercial license or contractual agreement. 16 17#include <gp_XY.hxx> 18#include <gp_XYZ.hxx> 19 20inline Standard_Real Plate_Plate::Polm(const gp_XY& point2d, const Standard_Integer iu, const Standard_Integer iv, 21 const Standard_Integer idu, const Standard_Integer idv) const 22{ 23 if(idu>iu) return 0; 24 if(idv>iv) return 0; 25 Standard_Real u = point2d.X(); 26 Standard_Real v = point2d.Y(); 27 28 Standard_Real value = 1; 29 30 Standard_Integer degu = iu - idu; 31 Standard_Integer i ; 32 for( i=0;i<degu;i++) value *= u; 33 for(i=iu;i>degu;i--) value *= i; 34 35 36 Standard_Integer degv = iv - idv; 37 for(i=0;i<degv;i++) value *= v; 38 for(i=iv;i>degv;i--) value *= i; 39 40 41 // le produit par ddu[iu]*ddv[iv] n'est pas indispensable !! (il change 42 // les valeurs claculles pour la partie coef polynomiaux de Sol 43 // de telle facon que les methodes Evaluate et EvaluateDerivative donnent 44 //en theorie les memes valeurs. Toutefois, il nous semble que ce produit 45 // ameliore le conditionnmenet de la matrice 46 return value*ddu[iu]*ddv[iv]; 47 //return value; 48} 49 50 inline Standard_Integer& Plate_Plate::Deru(const Standard_Integer index) const 51{ 52 return ((Standard_Integer *)deru)[index]; 53} 54 55 inline Standard_Integer& Plate_Plate::Derv(const Standard_Integer index) const 56{ 57 return ((Standard_Integer *)derv)[index]; 58} 59 60 inline gp_XYZ& Plate_Plate::Solution(const Standard_Integer index) const 61{ 62 return ((gp_XYZ *)solution)[index]; 63} 64 65 inline gp_XY& Plate_Plate::Points(const Standard_Integer index) const 66{ 67 return ((gp_XY *)points)[index]; 68} 69 70 71