Salome HOME
22625: [CEA 1195] Several attractors per face
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_Hypothesis_i.hxx
index 62cb6570edf6779f6b89b5ac3480f164f0427cb9..7832e7fedc43fbbf7d96814c6e099a957a8314fe 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014  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
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -168,8 +168,10 @@ public:
   
   void SetAttractorGeom(GEOM::GEOM_Object_ptr GeomObj, GEOM::GEOM_Object_ptr Attractor, CORBA::Double StartSize, CORBA::Double EndSize, CORBA::Double ActionRadius, CORBA::Double ConstantRadius );
 
-  void UnsetAttractorGeom(GEOM::GEOM_Object_ptr GeomObj);
+  void UnsetAttractorGeom(GEOM::GEOM_Object_ptr GeomObj,
+                          GEOM::GEOM_Object_ptr theAttractor);
 
+  void UnsetAttractorEntry(const char* entry, const char* attractor);
   void SetClassAttractorEntry(const char* entry, const char* att_entry, CORBA::Double StartSize, CORBA::Double EndSize, CORBA::Double ActionRadius, CORBA::Double ConstantRadius)  throw (SALOME::SALOME_Exception);
 
   BLSURFPlugin::TAttParamsMap* GetAttractorParams();
@@ -254,6 +256,62 @@ public:
 //  CORBA::Boolean GetInternalEnforcedVertex(GEOM::GEOM_Object_ptr theFace) throw (SALOME::SALOME_Exception);
 //  CORBA::Boolean GetInternalEnforcedVertexEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception);
   
+  ///////////////////////
+  // PERIODICITY       //
+  ///////////////////////
+
+  void ClearPreCadPeriodicityVectors();
+
+  BLSURFPlugin::TPeriodicityList* GetPreCadFacesPeriodicityVector();
+  BLSURFPlugin::TPeriodicityList* GetPreCadEdgesPeriodicityVector();
+
+  BLSURFPlugin::TPeriodicityList* PreCadVectorToSequence(const ::BLSURFPlugin_Hypothesis::TPreCadPeriodicityVector& preCadPeriodicityVector);
+
+  void AddPreCadFacesPeriodicity(GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theFace2)
+      throw (SALOME::SALOME_Exception);
+
+  void AddPreCadFacesPeriodicityWithVertices(GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theFace2,
+      const GEOM::ListOfGO& theSourceVertices, const GEOM::ListOfGO& theTargetVertices)
+      throw (SALOME::SALOME_Exception);
+
+  void AddPreCadFacesPeriodicityEntry(const char* theFace1Entry, const char* theFace2Entry,
+      const BLSURFPlugin::TEntryList& theSourceVerticesEntries, const BLSURFPlugin::TEntryList& theTargetVerticesEntries)
+      throw (SALOME::SALOME_Exception);
+
+  void AddPreCadEdgesPeriodicity(GEOM::GEOM_Object_ptr theEdge1, GEOM::GEOM_Object_ptr theEdge2)
+      throw (SALOME::SALOME_Exception);
+
+  void AddPreCadEdgesPeriodicityWithVertices(GEOM::GEOM_Object_ptr theEdge1, GEOM::GEOM_Object_ptr theEdge2,
+      const GEOM::ListOfGO& theSourceVertices, const GEOM::ListOfGO& theTargetVertices)
+      throw (SALOME::SALOME_Exception);
+
+  void AddPreCadEdgesPeriodicityEntry(const char* theEdge1Entry, const char* theEdge2Entry,
+      const BLSURFPlugin::TEntryList& theSourceVerticesEntries, const BLSURFPlugin::TEntryList& theTargetVerticesEntries)
+      throw (SALOME::SALOME_Exception);
+
+  void AddFacePeriodicity(GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theFace2)
+      throw (SALOME::SALOME_Exception);
+
+  void AddFacePeriodicityEntry(const char* theFace1Entry, const char* theFace2Entry)
+    throw (SALOME::SALOME_Exception);
+
+  void AddEdgePeriodicity(GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theEdge1,
+                          GEOM::GEOM_Object_ptr theFace2, GEOM::GEOM_Object_ptr theEdge2, CORBA::Long edge_orientation = 0)
+      throw (SALOME::SALOME_Exception);
+
+  void AddEdgePeriodicityWithoutFaces(GEOM::GEOM_Object_ptr theEdge1, GEOM::GEOM_Object_ptr theEdge2, CORBA::Long edge_orientation = 0)
+      throw (SALOME::SALOME_Exception);
+
+  void AddEdgePeriodicityEntry(const char* theFace1Entry, const char* theEdge1Entry, const char* theFace2Entry, const char* theEdge2Entry, const long edge_orientation = 0)
+    throw (SALOME::SALOME_Exception);
+
+  void AddVertexPeriodicity(GEOM::GEOM_Object_ptr theEdge1, GEOM::GEOM_Object_ptr theVertex1,
+      GEOM::GEOM_Object_ptr theEdge2, GEOM::GEOM_Object_ptr theVertex2)
+      throw (SALOME::SALOME_Exception);
+
+  void AddVertexPeriodicityEntry(const char* theEdge1Entry, const char* theVertex1Entry, const char* theEdge2Entry, const char* theVertex2Entry)
+    throw (SALOME::SALOME_Exception);
+
   ///////////////////////
   
   /*!
@@ -292,6 +350,17 @@ public:
   CORBA::Boolean GetPreCADRemoveNanoEdges();
   void SetPreCADEpsNano(CORBA::Double epsNano);
   CORBA::Double GetPreCADEpsNano();
+
+private:
+  ///////////////////////
+  // PERIODICITY       //
+  ///////////////////////
+  std::string ShapeTypeToString(GEOM::shape_type theShapeType);
+  void CheckShapeType(GEOM::GEOM_Object_ptr shape, GEOM::shape_type theShapeType);
+  void CheckShapeTypes(GEOM::GEOM_Object_ptr shape, std::vector<GEOM::shape_type> theShapeTypes);
+  std::string PublishIfNeeded(GEOM::GEOM_Object_ptr shape, GEOM::shape_type theShapeType, std::string prefix);
+  std::string FormatVerticesEntries(vector<string> &theSourceVerticesEntries, vector<string> &theTargetVerticesEntries);
+
 };
 
 #endif