Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:18:33

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