Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-15 10:23:55

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 <StepRepr_RepresentationItem.hxx>
0024 #include <TopoDS_Shape.hxx>
0025 #include <NCollection_DataMap.hxx>
0026 #include <TCollection_AsciiString.hxx>
0027 #include <NCollection_List.hxx>
0028 #include <Standard_Boolean.hxx>
0029 class StepRepr_RepresentationItem;
0030 class TCollection_AsciiString;
0031 class TopoDS_Shape;
0032 
0033 //! Provides data to process non-manifold topology when
0034 //! reading from STEP.
0035 class StepToTopoDS_NMTool
0036 {
0037 public:
0038   DEFINE_STANDARD_ALLOC
0039 
0040   Standard_EXPORT StepToTopoDS_NMTool();
0041 
0042   Standard_EXPORT StepToTopoDS_NMTool(
0043     const NCollection_DataMap<occ::handle<StepRepr_RepresentationItem>, TopoDS_Shape>& MapOfRI,
0044     const NCollection_DataMap<TCollection_AsciiString, TopoDS_Shape>& MapOfRINames);
0045 
0046   Standard_EXPORT void Init(
0047     const NCollection_DataMap<occ::handle<StepRepr_RepresentationItem>, TopoDS_Shape>& MapOfRI,
0048     const NCollection_DataMap<TCollection_AsciiString, TopoDS_Shape>& MapOfRINames);
0049 
0050   Standard_EXPORT void SetActive(const bool isActive);
0051 
0052   Standard_EXPORT bool IsActive();
0053 
0054   Standard_EXPORT void CleanUp();
0055 
0056   Standard_EXPORT bool IsBound(const occ::handle<StepRepr_RepresentationItem>& RI);
0057 
0058   Standard_EXPORT bool IsBound(const TCollection_AsciiString& RIName);
0059 
0060   Standard_EXPORT void Bind(const occ::handle<StepRepr_RepresentationItem>& RI,
0061                             const TopoDS_Shape&                             S);
0062 
0063   Standard_EXPORT void Bind(const TCollection_AsciiString& RIName, const TopoDS_Shape& S);
0064 
0065   Standard_EXPORT const TopoDS_Shape& Find(const occ::handle<StepRepr_RepresentationItem>& RI);
0066 
0067   Standard_EXPORT const TopoDS_Shape& Find(const TCollection_AsciiString& RIName);
0068 
0069   Standard_EXPORT void RegisterNMEdge(const TopoDS_Shape& Edge);
0070 
0071   Standard_EXPORT bool IsSuspectedAsClosing(const TopoDS_Shape& BaseShell,
0072                                             const TopoDS_Shape& SuspectedShell);
0073 
0074   Standard_EXPORT bool IsPureNMShell(const TopoDS_Shape& Shell);
0075 
0076   Standard_EXPORT void SetIDEASCase(const bool IDEASCase);
0077 
0078   Standard_EXPORT bool IsIDEASCase();
0079 
0080 private:
0081   Standard_EXPORT bool isEdgeRegisteredAsNM(const TopoDS_Shape& Edge);
0082 
0083   Standard_EXPORT bool isAdjacentShell(const TopoDS_Shape& ShellA, const TopoDS_Shape& ShellB);
0084 
0085   NCollection_DataMap<occ::handle<StepRepr_RepresentationItem>, TopoDS_Shape> myRIMap;
0086   NCollection_DataMap<TCollection_AsciiString, TopoDS_Shape>                  myRINamesMap;
0087   NCollection_List<TopoDS_Shape>                                              myNMEdges;
0088   bool                                                                        myIDEASCase;
0089   bool                                                                        myActiveFlag;
0090 };
0091 
0092 #endif // _StepToTopoDS_NMTool_HeaderFile