Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:53

0001 // Created on: 1996-04-09
0002 // Created by: Joelle CHAUVET
0003 // Copyright (c) 1996-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _AdvApp2Var_Node_HeaderFile
0018 #define _AdvApp2Var_Node_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Handle.hxx>
0022 #include <Standard_Type.hxx>
0023 #include <TColgp_Array2OfPnt.hxx>
0024 #include <TColStd_Array2OfReal.hxx>
0025 
0026 //! used to store constraints on a (Ui,Vj) point
0027 class AdvApp2Var_Node : public Standard_Transient
0028 {
0029   DEFINE_STANDARD_RTTIEXT(AdvApp2Var_Node, Standard_Transient)
0030 public:
0031 
0032   Standard_EXPORT AdvApp2Var_Node();
0033   
0034   Standard_EXPORT AdvApp2Var_Node(const Standard_Integer iu, const Standard_Integer iv);
0035   
0036   Standard_EXPORT AdvApp2Var_Node(const gp_XY& UV, const Standard_Integer iu, const Standard_Integer iv);
0037 
0038   //! Returns the coordinates (U,V) of the node
0039   const gp_XY& Coord() const { return myCoord; }
0040 
0041   //! changes the coordinates (U,V) to (x1,x2)
0042   void SetCoord (const Standard_Real x1, const Standard_Real x2)
0043   {
0044     myCoord.SetX(x1);
0045     myCoord.SetY(x2);
0046   }
0047 
0048   //! returns the continuity order in U of the node
0049   Standard_Integer UOrder() const { return myOrdInU; }
0050 
0051   //! returns the continuity order in V of the node
0052   Standard_Integer VOrder() const { return myOrdInV; }
0053 
0054   //! affects the value F(U,V) or its derivates on the node (U,V)
0055   void SetPoint (const Standard_Integer iu, const Standard_Integer iv, const gp_Pnt& Pt)
0056   {
0057     myTruePoints.SetValue(iu, iv, Pt);
0058   }
0059 
0060   //! returns the value F(U,V) or its derivates on the node (U,V)
0061   const gp_Pnt& Point (const Standard_Integer iu, const Standard_Integer iv) const
0062   {
0063     return myTruePoints.Value(iu, iv);
0064   }
0065 
0066   //! affects the error between F(U,V) and its approximation
0067   void SetError (const Standard_Integer iu, const Standard_Integer iv, const Standard_Real error)
0068   {
0069     myErrors.SetValue(iu, iv, error);
0070   }
0071 
0072   //! returns the error between F(U,V) and its approximation
0073   Standard_Real Error (const Standard_Integer iu, const Standard_Integer iv) const { return myErrors.Value(iu, iv); }
0074 
0075   //! Assign operator.
0076   AdvApp2Var_Node& operator= (const AdvApp2Var_Node& theOther)
0077   {
0078     myTruePoints = theOther.myTruePoints;
0079     myErrors = theOther.myErrors;
0080     myCoord  = theOther.myCoord;
0081     myOrdInU = theOther.myOrdInU;
0082     myOrdInV = theOther.myOrdInV;
0083     return *this;
0084   }
0085 
0086 private:
0087 
0088   AdvApp2Var_Node (const AdvApp2Var_Node& theOther);
0089 
0090 private:
0091 
0092   TColgp_Array2OfPnt myTruePoints;
0093   TColStd_Array2OfReal myErrors;
0094   gp_XY myCoord;
0095   Standard_Integer myOrdInU;
0096   Standard_Integer myOrdInV;
0097 
0098 };
0099 
0100 #endif // _AdvApp2Var_Node_HeaderFile