Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1993-11-18
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_Circuit_HeaderFile
0018 #define _MAT2d_Circuit_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <MAT2d_DataMapOfIntegerConnexion.hxx>
0024 #include <MAT2d_DataMapOfBiIntSequenceOfInteger.hxx>
0025 #include <TColStd_SequenceOfInteger.hxx>
0026 #include <GeomAbs_JoinType.hxx>
0027 #include <Standard_Transient.hxx>
0028 #include <MAT2d_SequenceOfSequenceOfGeometry.hxx>
0029 #include <TColStd_SequenceOfBoolean.hxx>
0030 #include <Standard_Integer.hxx>
0031 #include <MAT2d_SequenceOfConnexion.hxx>
0032 class Geom2d_Geometry;
0033 class MAT2d_Connexion;
0034 class MAT2d_BiInt;
0035 class MAT2d_MiniPath;
0036 
0037 
0038 class MAT2d_Circuit;
0039 DEFINE_STANDARD_HANDLE(MAT2d_Circuit, Standard_Transient)
0040 
0041 //! Constructs a circuit on a set of lines.
0042 //! EquiCircuit gives a Circuit passing by all the lines
0043 //! in a set and all the connexions of the minipath associated.
0044 class MAT2d_Circuit : public Standard_Transient
0045 {
0046 
0047 public:
0048 
0049   
0050   Standard_EXPORT MAT2d_Circuit(const GeomAbs_JoinType aJoinType = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False);
0051   
0052   Standard_EXPORT void Perform (MAT2d_SequenceOfSequenceOfGeometry& aFigure, const TColStd_SequenceOfBoolean& IsClosed, const Standard_Integer IndRefLine, const Standard_Boolean Trigo);
0053   
0054   //! Returns the Number of Items .
0055   Standard_EXPORT Standard_Integer NumberOfItems() const;
0056   
0057   //! Returns the item at position <Index> in <me>.
0058   Standard_EXPORT Handle(Geom2d_Geometry) Value (const Standard_Integer Index) const;
0059   
0060   //! Returns the number of items on the line <IndexLine>.
0061   Standard_EXPORT Standard_Integer LineLength (const Standard_Integer IndexLine) const;
0062   
0063   //! Returns the set of index of the items in <me>corresponding
0064   //! to the curve <IndCurve> on the line <IndLine> from the
0065   //! initial figure.
0066   Standard_EXPORT const TColStd_SequenceOfInteger& RefToEqui (const Standard_Integer IndLine, const Standard_Integer IndCurve) const;
0067   
0068   //! Returns the Connexion on the item <Index> in me.
0069   Standard_EXPORT Handle(MAT2d_Connexion) Connexion (const Standard_Integer Index) const;
0070   
0071   //! Returns <True> is there is a connexion on the item <Index>
0072   //! in <me>.
0073   Standard_EXPORT Standard_Boolean ConnexionOn (const Standard_Integer Index) const;
0074 
0075 
0076 
0077 
0078   DEFINE_STANDARD_RTTIEXT(MAT2d_Circuit,Standard_Transient)
0079 
0080 protected:
0081 
0082 
0083 
0084 
0085 private:
0086 
0087   
0088   Standard_EXPORT Standard_Boolean IsSharpCorner (const Handle(Geom2d_Geometry)& Geom1, const Handle(Geom2d_Geometry)& Geom2, const Standard_Real Direction) const;
0089   
0090   Standard_EXPORT Standard_Boolean PassByLast (const Handle(MAT2d_Connexion)& C1, const Handle(MAT2d_Connexion)& C2) const;
0091   
0092   Standard_EXPORT Standard_Real Side (const Handle(MAT2d_Connexion)& C, const TColGeom2d_SequenceOfGeometry& Line) const;
0093   
0094   Standard_EXPORT void UpDateLink (const Standard_Integer IFirst, const Standard_Integer ILine, const Standard_Integer ICurveFirst, const Standard_Integer ICurveLast);
0095   
0096   Standard_EXPORT void SortRefToEqui (const MAT2d_BiInt& aBiInt);
0097   
0098   Standard_EXPORT void InitOpen (TColGeom2d_SequenceOfGeometry& Line) const;
0099   
0100   Standard_EXPORT void InsertCorner (TColGeom2d_SequenceOfGeometry& Line) const;
0101   
0102   Standard_EXPORT void DoubleLine (TColGeom2d_SequenceOfGeometry& Line, MAT2d_SequenceOfConnexion& Connexions, const Handle(MAT2d_Connexion)& Father, const Standard_Real Side) const;
0103   
0104   Standard_EXPORT void ConstructCircuit (const MAT2d_SequenceOfSequenceOfGeometry& aFigure, const Standard_Integer IndRefLine, const MAT2d_MiniPath& aPath);
0105 
0106   Standard_Real direction;
0107   TColGeom2d_SequenceOfGeometry geomElements;
0108   MAT2d_DataMapOfIntegerConnexion connexionMap;
0109   MAT2d_DataMapOfBiIntSequenceOfInteger linkRefEqui;
0110   TColStd_SequenceOfInteger linesLength;
0111   GeomAbs_JoinType myJoinType;
0112   Standard_Boolean myIsOpenResult;
0113 
0114 
0115 };
0116 
0117 
0118 
0119 
0120 
0121 
0122 
0123 #endif // _MAT2d_Circuit_HeaderFile