Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:27

0001 // Created on: 1994-05-26
0002 // Created by: Jean Yves LEBEY
0003 // Copyright (c) 1994-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 _TopOpeBRepDS_Transition_HeaderFile
0018 #define _TopOpeBRepDS_Transition_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopAbs_State.hxx>
0024 #include <TopAbs_ShapeEnum.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TopAbs_Orientation.hxx>
0027 
0028 
0029 class TopOpeBRepDS_Transition 
0030 {
0031 public:
0032 
0033   DEFINE_STANDARD_ALLOC
0034 
0035   
0036   Standard_EXPORT TopOpeBRepDS_Transition();
0037   
0038   Standard_EXPORT TopOpeBRepDS_Transition(const TopAbs_State StateBefore, const TopAbs_State StateAfter, const TopAbs_ShapeEnum ShapeBefore = TopAbs_FACE, const TopAbs_ShapeEnum ShapeAfter = TopAbs_FACE);
0039   
0040   Standard_EXPORT TopOpeBRepDS_Transition(const TopAbs_Orientation O);
0041   
0042   Standard_EXPORT void Set (const TopAbs_State StateBefore, const TopAbs_State StateAfter, const TopAbs_ShapeEnum ShapeBefore = TopAbs_FACE, const TopAbs_ShapeEnum ShapeAfter = TopAbs_FACE);
0043   
0044   Standard_EXPORT void StateBefore (const TopAbs_State S);
0045   
0046   Standard_EXPORT void StateAfter (const TopAbs_State S);
0047   
0048   Standard_EXPORT void ShapeBefore (const TopAbs_ShapeEnum SE);
0049   
0050   Standard_EXPORT void ShapeAfter (const TopAbs_ShapeEnum SE);
0051   
0052   Standard_EXPORT void Before (const TopAbs_State S, const TopAbs_ShapeEnum ShapeBefore = TopAbs_FACE);
0053   
0054   Standard_EXPORT void After (const TopAbs_State S, const TopAbs_ShapeEnum ShapeAfter = TopAbs_FACE);
0055   
0056   Standard_EXPORT void Index (const Standard_Integer I);
0057   
0058   Standard_EXPORT void IndexBefore (const Standard_Integer I);
0059   
0060   Standard_EXPORT void IndexAfter (const Standard_Integer I);
0061   
0062   Standard_EXPORT TopAbs_State Before() const;
0063   
0064   Standard_EXPORT TopAbs_ShapeEnum ONBefore() const;
0065   
0066   Standard_EXPORT TopAbs_State After() const;
0067   
0068   Standard_EXPORT TopAbs_ShapeEnum ONAfter() const;
0069   
0070   Standard_EXPORT TopAbs_ShapeEnum ShapeBefore() const;
0071   
0072   Standard_EXPORT TopAbs_ShapeEnum ShapeAfter() const;
0073   
0074   Standard_EXPORT Standard_Integer Index() const;
0075   
0076   Standard_EXPORT Standard_Integer IndexBefore() const;
0077   
0078   Standard_EXPORT Standard_Integer IndexAfter() const;
0079   
0080   //! set the transition corresponding to orientation <O>
0081   //!
0082   //! O       Before  After
0083   //!
0084   //! FORWARD       OUT    IN
0085   //! REVERSED      IN     OUT
0086   //! INTERNAL      IN     IN
0087   //! EXTERNAL      OUT    OUT
0088   Standard_EXPORT void Set (const TopAbs_Orientation O);
0089   
0090   //! returns the orientation corresponding to state <S>
0091   //!
0092   //! Before and After not equal TopAbs_ON :
0093   //! --------------------------------------
0094   //! Before  After   Computed orientation
0095   //!
0096   //! S      not S   REVERSED (we leave state S)
0097   //! not S  S       FORWARD  (we enter state S)
0098   //! S      S       INTERNAL (we stay in state S)
0099   //! not S  not S   EXTERNAL (we stay outside state S)
0100   Standard_EXPORT TopAbs_Orientation Orientation (const TopAbs_State S, const TopAbs_ShapeEnum T = TopAbs_FACE) const;
0101   
0102   Standard_EXPORT TopOpeBRepDS_Transition Complement() const;
0103   
0104   //! returns True if both states are UNKNOWN
0105   Standard_EXPORT Standard_Boolean IsUnknown() const;
0106 
0107 
0108 
0109 
0110 
0111 protected:
0112 
0113 
0114 
0115 
0116 
0117 private:
0118 
0119   
0120   //! returns the orientation corresponding to state <S>
0121   //! (if one at least of the internal states is ON)
0122   Standard_EXPORT TopAbs_Orientation OrientationON (const TopAbs_State S, const TopAbs_ShapeEnum T) const;
0123 
0124 
0125   TopAbs_State myStateBefore;
0126   TopAbs_State myStateAfter;
0127   TopAbs_ShapeEnum myShapeBefore;
0128   TopAbs_ShapeEnum myShapeAfter;
0129   Standard_Integer myIndexBefore;
0130   Standard_Integer myIndexAfter;
0131 
0132 
0133 };
0134 
0135 
0136 
0137 
0138 
0139 
0140 
0141 #endif // _TopOpeBRepDS_Transition_HeaderFile