1 // Created on: 1996-04-09
2 // Created by: Joelle CHAUVET
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.
17 #ifndef _AdvApp2Var_Node_HeaderFile
18 #define _AdvApp2Var_Node_HeaderFile
21 #include <Standard.hxx>
22 #include <Standard_Handle.hxx>
23 #include <Standard_Type.hxx>
24 #include <TColgp_Array2OfPnt.hxx>
25 #include <TColStd_Array2OfReal.hxx>
27 //! used to store constraints on a (Ui,Vj) point
28 class AdvApp2Var_Node : public Standard_Transient
30 DEFINE_STANDARD_RTTIEXT(AdvApp2Var_Node, Standard_Transient)
33 Standard_EXPORT AdvApp2Var_Node();
35 Standard_EXPORT AdvApp2Var_Node(const Standard_Integer iu, const Standard_Integer iv);
37 Standard_EXPORT AdvApp2Var_Node(const gp_XY& UV, const Standard_Integer iu, const Standard_Integer iv);
39 //! Returns the coordinates (U,V) of the node
40 const gp_XY& Coord() const { return myCoord; }
42 //! changes the coordinates (U,V) to (x1,x2)
43 void SetCoord (const Standard_Real x1, const Standard_Real x2)
49 //! returns the continuity order in U of the node
50 Standard_Integer UOrder() const { return myOrdInU; }
52 //! returns the continuity order in V of the node
53 Standard_Integer VOrder() const { return myOrdInV; }
55 //! affects the value F(U,V) or its derivates on the node (U,V)
56 void SetPoint (const Standard_Integer iu, const Standard_Integer iv, const gp_Pnt& Pt)
58 myTruePoints.SetValue(iu, iv, Pt);
61 //! returns the value F(U,V) or its derivates on the node (U,V)
62 const gp_Pnt& Point (const Standard_Integer iu, const Standard_Integer iv) const
64 return myTruePoints.Value(iu, iv);
67 //! affects the error between F(U,V) and its approximation
68 void SetError (const Standard_Integer iu, const Standard_Integer iv, const Standard_Real error)
70 myErrors.SetValue(iu, iv, error);
73 //! returns the error between F(U,V) and its approximation
74 Standard_Real Error (const Standard_Integer iu, const Standard_Integer iv) const { return myErrors.Value(iu, iv); }
77 AdvApp2Var_Node& operator= (const AdvApp2Var_Node& theOther)
79 myTruePoints = theOther.myTruePoints;
80 myErrors = theOther.myErrors;
81 myCoord = theOther.myCoord;
82 myOrdInU = theOther.myOrdInU;
83 myOrdInV = theOther.myOrdInV;
89 AdvApp2Var_Node (const AdvApp2Var_Node& theOther);
93 TColgp_Array2OfPnt myTruePoints;
94 TColStd_Array2OfReal myErrors;
96 Standard_Integer myOrdInU;
97 Standard_Integer myOrdInV;
101 #endif // _AdvApp2Var_Node_HeaderFile