Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-19 08:17:42

0001 // Created on: 2010-11-15
0002 // Created by: Sergey SLYADNEV
0003 // Copyright (c) 2010-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _StepToTopoDS_NMTool_HeaderFile
0017 #define _StepToTopoDS_NMTool_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022 
0023 #include <StepToTopoDS_DataMapOfRI.hxx>
0024 #include <StepToTopoDS_DataMapOfRINames.hxx>
0025 #include <TopTools_ListOfShape.hxx>
0026 #include <Standard_Boolean.hxx>
0027 class StepRepr_RepresentationItem;
0028 class TCollection_AsciiString;
0029 class TopoDS_Shape;
0030 
0031 //! Provides data to process non-manifold topology when
0032 //! reading from STEP.
0033 class StepToTopoDS_NMTool
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   Standard_EXPORT StepToTopoDS_NMTool();
0039 
0040   Standard_EXPORT StepToTopoDS_NMTool(const StepToTopoDS_DataMapOfRI&      MapOfRI,
0041                                       const StepToTopoDS_DataMapOfRINames& MapOfRINames);
0042 
0043   Standard_EXPORT void Init(const StepToTopoDS_DataMapOfRI&      MapOfRI,
0044                             const StepToTopoDS_DataMapOfRINames& MapOfRINames);
0045 
0046   Standard_EXPORT void SetActive(const Standard_Boolean isActive);
0047 
0048   Standard_EXPORT Standard_Boolean IsActive();
0049 
0050   Standard_EXPORT void CleanUp();
0051 
0052   Standard_EXPORT Standard_Boolean IsBound(const Handle(StepRepr_RepresentationItem)& RI);
0053 
0054   Standard_EXPORT Standard_Boolean IsBound(const TCollection_AsciiString& RIName);
0055 
0056   Standard_EXPORT void Bind(const Handle(StepRepr_RepresentationItem)& RI, const TopoDS_Shape& S);
0057 
0058   Standard_EXPORT void Bind(const TCollection_AsciiString& RIName, const TopoDS_Shape& S);
0059 
0060   Standard_EXPORT const TopoDS_Shape& Find(const Handle(StepRepr_RepresentationItem)& RI);
0061 
0062   Standard_EXPORT const TopoDS_Shape& Find(const TCollection_AsciiString& RIName);
0063 
0064   Standard_EXPORT void RegisterNMEdge(const TopoDS_Shape& Edge);
0065 
0066   Standard_EXPORT Standard_Boolean IsSuspectedAsClosing(const TopoDS_Shape& BaseShell,
0067                                                         const TopoDS_Shape& SuspectedShell);
0068 
0069   Standard_EXPORT Standard_Boolean IsPureNMShell(const TopoDS_Shape& Shell);
0070 
0071   Standard_EXPORT void SetIDEASCase(const Standard_Boolean IDEASCase);
0072 
0073   Standard_EXPORT Standard_Boolean IsIDEASCase();
0074 
0075 protected:
0076 private:
0077   Standard_EXPORT Standard_Boolean isEdgeRegisteredAsNM(const TopoDS_Shape& Edge);
0078 
0079   Standard_EXPORT Standard_Boolean isAdjacentShell(const TopoDS_Shape& ShellA,
0080                                                    const TopoDS_Shape& ShellB);
0081 
0082   StepToTopoDS_DataMapOfRI      myRIMap;
0083   StepToTopoDS_DataMapOfRINames myRINamesMap;
0084   TopTools_ListOfShape          myNMEdges;
0085   Standard_Boolean              myIDEASCase;
0086   Standard_Boolean              myActiveFlag;
0087 };
0088 
0089 #endif // _StepToTopoDS_NMTool_HeaderFile