Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:13

0001 // Created on: 1993-10-07
0002 // Created by: Yves FRICAUD
0003 // Copyright (c) 1993-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 _MAT2d_Connexion_HeaderFile
0018 #define _MAT2d_Connexion_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <gp_Pnt2d.hxx>
0025 #include <Standard_Transient.hxx>
0026 
0027 
0028 class MAT2d_Connexion;
0029 DEFINE_STANDARD_HANDLE(MAT2d_Connexion, Standard_Transient)
0030 
0031 //! A Connexion links two lines of items  in a set
0032 //! of  lines. It s contains two  points and their paramatric
0033 //! definitions on the lines.
0034 //! The items can be points or curves.
0035 class MAT2d_Connexion : public Standard_Transient
0036 {
0037 
0038 public:
0039 
0040   
0041   Standard_EXPORT MAT2d_Connexion();
0042   
0043   Standard_EXPORT MAT2d_Connexion(const Standard_Integer LineA, const Standard_Integer LineB, const Standard_Integer ItemA, const Standard_Integer ItemB, const Standard_Real Distance, const Standard_Real ParameterOnA, const Standard_Real ParameterOnB, const gp_Pnt2d& PointA, const gp_Pnt2d& PointB);
0044   
0045   //! Returns the Index on the first line.
0046   Standard_EXPORT Standard_Integer IndexFirstLine() const;
0047   
0048   //! Returns the Index on the Second line.
0049   Standard_EXPORT Standard_Integer IndexSecondLine() const;
0050   
0051   //! Returns the Index of the item on the first line.
0052   Standard_EXPORT Standard_Integer IndexItemOnFirst() const;
0053   
0054   //! Returns the Index of the item on the second line.
0055   Standard_EXPORT Standard_Integer IndexItemOnSecond() const;
0056   
0057   //! Returns the parameter of the point on the firstline.
0058   Standard_EXPORT Standard_Real ParameterOnFirst() const;
0059   
0060   //! Returns the parameter of the point on the secondline.
0061   Standard_EXPORT Standard_Real ParameterOnSecond() const;
0062   
0063   //! Returns the point on the firstline.
0064   Standard_EXPORT gp_Pnt2d PointOnFirst() const;
0065   
0066   //! Returns the point on the secondline.
0067   Standard_EXPORT gp_Pnt2d PointOnSecond() const;
0068   
0069   //! Returns the distance between the two points.
0070   Standard_EXPORT Standard_Real Distance() const;
0071   
0072   Standard_EXPORT void IndexFirstLine (const Standard_Integer anIndex);
0073   
0074   Standard_EXPORT void IndexSecondLine (const Standard_Integer anIndex);
0075   
0076   Standard_EXPORT void IndexItemOnFirst (const Standard_Integer anIndex);
0077   
0078   Standard_EXPORT void IndexItemOnSecond (const Standard_Integer anIndex);
0079   
0080   Standard_EXPORT void ParameterOnFirst (const Standard_Real aParameter);
0081   
0082   Standard_EXPORT void ParameterOnSecond (const Standard_Real aParameter);
0083   
0084   Standard_EXPORT void PointOnFirst (const gp_Pnt2d& aPoint);
0085   
0086   Standard_EXPORT void PointOnSecond (const gp_Pnt2d& aPoint);
0087   
0088   Standard_EXPORT void Distance (const Standard_Real aDistance);
0089   
0090   //! Returns the reverse connexion of <me>.
0091   //! the firstpoint  is the secondpoint.
0092   //! the secondpoint is the firstpoint.
0093   Standard_EXPORT Handle(MAT2d_Connexion) Reverse() const;
0094   
0095   //! Returns <True> if my firstPoint is on the same line
0096   //! than the firstpoint of <aConnexion> and my firstpoint
0097   //! is after the firstpoint of <aConnexion> on the line.
0098   //! <aSense> = 1 if <aConnexion> is on the Left of its
0099   //! firstline, else <aSense> = -1.
0100   Standard_EXPORT Standard_Boolean IsAfter (const Handle(MAT2d_Connexion)& aConnexion, const Standard_Real aSense) const;
0101   
0102   //! Print <me>.
0103   Standard_EXPORT void Dump (const Standard_Integer Deep = 0, const Standard_Integer Offset = 0) const;
0104 
0105 
0106 
0107 
0108   DEFINE_STANDARD_RTTIEXT(MAT2d_Connexion,Standard_Transient)
0109 
0110 protected:
0111 
0112 
0113 
0114 
0115 private:
0116 
0117 
0118   Standard_Integer lineA;
0119   Standard_Integer lineB;
0120   Standard_Integer itemA;
0121   Standard_Integer itemB;
0122   Standard_Real distance;
0123   Standard_Real parameterOnA;
0124   Standard_Real parameterOnB;
0125   gp_Pnt2d pointA;
0126   gp_Pnt2d pointB;
0127 
0128 
0129 };
0130 
0131 
0132 
0133 
0134 
0135 
0136 
0137 #endif // _MAT2d_Connexion_HeaderFile