Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-19 09:27:11

0001 // Created by: Peter Kurnev
0002 // Copyright (c) 2010-2014 OPEN CASCADE SAS
0003 // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
0004 // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
0005 //                         EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
0006 //
0007 // This file is part of Open CASCADE Technology software library.
0008 //
0009 // This library is free software; you can redistribute it and/or modify it under
0010 // the terms of the GNU Lesser General Public License version 2.1 as published
0011 // by the Free Software Foundation, with special exception defined in the file
0012 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0013 // distribution for complete text of the license and disclaimer of any warranty.
0014 //
0015 // Alternatively, this file may be used under the terms of Open CASCADE
0016 // commercial license or contractual agreement.
0017 
0018 #ifndef _BOPAlgo_CheckerSI_HeaderFile
0019 #define _BOPAlgo_CheckerSI_HeaderFile
0020 
0021 #include <Standard.hxx>
0022 #include <Standard_DefineAlloc.hxx>
0023 #include <Standard_Handle.hxx>
0024 
0025 #include <BOPAlgo_PaveFiller.hxx>
0026 
0027 //! Checks the shape on self-interference.
0028 //!
0029 //! The algorithm can set the following errors:
0030 //! - *BOPAlgo_AlertMultipleArguments* - The number of the input arguments is not one;
0031 //! - *BOPALgo_ErrorIntersectionFailed* - The check has been aborted during intersection of
0032 //! sub-shapes. In case the error has occurred during intersection of sub-shapes, i.e. in
0033 //! BOPAlgo_PaveFiller::PerformInternal() method, the errors from this method directly will be
0034 //! returned.
0035 
0036 class BOPAlgo_CheckerSI : public BOPAlgo_PaveFiller
0037 {
0038 public:
0039   DEFINE_STANDARD_ALLOC
0040 
0041   Standard_EXPORT BOPAlgo_CheckerSI();
0042   Standard_EXPORT ~BOPAlgo_CheckerSI() override;
0043 
0044   Standard_EXPORT void Perform(
0045     const Message_ProgressRange& theRange = Message_ProgressRange()) override;
0046 
0047   //! Sets the level of checking shape on self-interference.
0048   //! It defines which interferences will be checked:
0049   //! 0 - only V/V;
0050   //! 1 - V/V and V/E;
0051   //! 2 - V/V, V/E and E/E;
0052   //! 3 - V/V, V/E, E/E and V/F;
0053   //! 4 - V/V, V/E, E/E, V/F and E/F;
0054   //! 5 - V/V, V/E, E/E, V/F, E/F and F/F;
0055   //! 6 - V/V, V/E, E/E, V/F, E/F, F/F and V/S;
0056   //! 7 - V/V, V/E, E/E, V/F, E/F, F/F, V/S and E/S;
0057   //! 8 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S and F/S;
0058   //! 9 - V/V, V/E, E/E, V/F, E/F, F/F, V/S, E/S, F/S and S/S - all interferences (Default value)
0059   Standard_EXPORT void SetLevelOfCheck(const int theLevel);
0060 
0061 protected:
0062   Standard_EXPORT void Init(const Message_ProgressRange& theRange) override;
0063 
0064   //! Treats the intersection results
0065   Standard_EXPORT void PostTreat();
0066 
0067   Standard_EXPORT void CheckFaceSelfIntersection(const Message_ProgressRange& theRange);
0068 
0069   //! Methods for intersection with solids
0070 
0071   //! Vertex/Solid intersection
0072   Standard_EXPORT virtual void PerformVZ(const Message_ProgressRange& theRange);
0073 
0074   //! Edge/Solid intersection
0075   Standard_EXPORT virtual void PerformEZ(const Message_ProgressRange& theRange);
0076 
0077   //! Face/Solid intersection
0078   Standard_EXPORT virtual void PerformFZ(const Message_ProgressRange& theRange);
0079 
0080   //! Solid/Solid intersection
0081   Standard_EXPORT virtual void PerformZZ(const Message_ProgressRange& theRange);
0082 
0083   //! Used for intersection of edges and faces with solids
0084   Standard_EXPORT virtual void PerformSZ(const TopAbs_ShapeEnum       aTS,
0085                                          const Message_ProgressRange& theRange);
0086 
0087   int myLevelOfCheck;
0088 };
0089 
0090 #endif // _BOPAlgo_CheckerSI_HeaderFile