Salome HOME
bos #20256: [CEA 18523] Porting SMESH to int 64 bits
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_Hypothesis.hxx
index 0bc60618041a3368e83fae61d35f4c78dd18a1c1..134a51db1a2b33cd2bd2402ac0323589b2e0f969 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -36,6 +36,7 @@
 #include <cstring>
 #include <sstream>
 #include <utilities.h>
+#include <smIdType.hxx>
 #include "BLSURFPlugin_Attractor.hxx"
 
 //  Parameters for work of MG-CADSurf
@@ -222,11 +223,18 @@ public:
   // Hyper-patches
   typedef std::set< int > THyperPatchTags;
   typedef std::vector< THyperPatchTags > THyperPatchList;
-
-  void SetHyperPatches(const THyperPatchList& hpl);
-  const THyperPatchList& GetHyperPatches() const { return _hyperPatchList; }
+  typedef std::set< std::string > THyperPatchEntries;
+  typedef std::vector< THyperPatchEntries > THyperPatchEntriesList;
+
+  void SetHyperPatches(const THyperPatchList& hpl, bool notifyMesh=true);
+  void SetHyperPatches(const THyperPatchEntriesList& hpl);
+  void SetHyperPatchIDsByEntry( const TopoDS_Shape&                          mainShape,
+                                const std::map< std::string, TopoDS_Shape >& entryToShape);
+  const THyperPatchList&        GetHyperPatches() const { return _hyperPatchList; }
+  const THyperPatchEntriesList& GetHyperPatchEntries() const { return _hyperPatchEntriesList; }
   static int GetHyperPatchTag( int faceTag, const BLSURFPlugin_Hypothesis* hyp, int* iPatch=0 );
 
+
   void SetPreCADMergeEdges(bool theVal);
   bool GetPreCADMergeEdges() const { return _preCADMergeEdges; }
 
@@ -365,7 +373,7 @@ public:
   // Map Vertex entry / Enforced vertex
   typedef std::map< TEntry, TEnfVertex* > TEnfVertexEntryEnfVertexMap;
 
-  typedef std::map< TEnfGroupName, std::set<int> > TGroupNameNodeIDMap;
+  typedef std::map< TEnfGroupName, std::set<smIdType> > TGroupNameNodeIDMap;
   /* TODO GROUPS
   // Map Group Name / List of enforced vertices
   typedef std::map< TEnfGroupName , TEnfVertexList > TGroupNameEnfVertexListMap;
@@ -385,9 +393,9 @@ public:
   TEntryList            GetEnfVertexEntryList (const TEntry& theFaceEntry);
   TEnfVertex*           GetEnfVertex(TEnfVertexCoords coords);
   TEnfVertex*           GetEnfVertex(const TEntry& theEnfVertexEntry);
-  void                  AddEnfVertexNodeID(TEnfGroupName theGroupName,int theNodeID);
-  std::set<int>         GetEnfVertexNodeIDs(TEnfGroupName theGroupName);
-  void                  RemoveEnfVertexNodeID(TEnfGroupName theGroupName,int theNodeID);
+  void                  AddEnfVertexNodeID(TEnfGroupName theGroupName,smIdType theNodeID);
+  std::set<smIdType>    GetEnfVertexNodeIDs(TEnfGroupName theGroupName);
+  void                  RemoveEnfVertexNodeID(TEnfGroupName theGroupName,smIdType theNodeID);
   
   bool ClearEnforcedVertex(const TEntry& theFaceEntry, double x = 0.0, double y = 0.0, double z = 0.0, const TEntry& theVertexEntry="");
   bool ClearEnforcedVertices(const TEntry& theFaceEntry);
@@ -657,11 +665,12 @@ private:
   TPreCadPeriodicityVector _preCadFacesPeriodicityVector;
   TPreCadPeriodicityVector _preCadEdgesPeriodicityVector;
 
-  TFacesPeriodicityVector _facesPeriodicityVector;
-  TEdgesPeriodicityVector _edgesPeriodicityVector;
+  TFacesPeriodicityVector    _facesPeriodicityVector;
+  TEdgesPeriodicityVector    _edgesPeriodicityVector;
   TVerticesPeriodicityVector _verticesPeriodicityVector;
 
-  THyperPatchList _hyperPatchList;
+  THyperPatchList        _hyperPatchList;
+  THyperPatchEntriesList _hyperPatchEntriesList;
 
   // Called by SaveTo to store content of _preCadFacesPeriodicityVector and _preCadEdgesPeriodicityVector
   void SavePreCADPeriodicity(std::ostream & save, const char* shapeType);