Salome HOME
23586: [EDF] HYDRO: Copy mesh to new geometry
[plugins/blsurfplugin.git] / src / GUI / BLSURFPluginGUI_HypothesisCreator.cxx
index 48cf60ceebea38686428e74f9649e8dbc6826bd3..cec18e4022184901081372d0a27cd42957f9b438 100644 (file)
@@ -1451,8 +1451,6 @@ This method is called when a item is added into the enforced vertices tree widge
 */
 void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices()
 {
-  BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
-
   getGeomSelectionTool()->selectionMgr()->clearFilters();
   myEnfVertexWdg->deactivateSelection();
 
@@ -1488,7 +1486,7 @@ void BLSURFPluginGUI_HypothesisCreator::onAddEnforcedVertices()
       if ( CORBA::is_nil(getGeomEngine()))
         return;
 
-      GEOM::GEOM_IMeasureOperations_var measureOp = getGeomEngine()->GetIMeasureOperations( that->getGeomSelectionTool()->getMyStudy()->StudyId() );
+      GEOM::GEOM_IMeasureOperations_var measureOp = getGeomEngine()->GetIMeasureOperations( getGeomSelectionTool()->getMyStudy()->StudyId() );
       if (CORBA::is_nil(measureOp))
         return;
 
@@ -2196,14 +2194,16 @@ void BLSURFPluginGUI_HypothesisCreator::AddPreCadSequenceToVector(BlsurfHypothes
         {
           periodicity_i[PERIODICITY_P1_SOURCE_COLUMN] = sourceVertices[0].in();
           periodicity_i[PERIODICITY_P2_SOURCE_COLUMN] = sourceVertices[1].in();
-          periodicity_i[PERIODICITY_P3_SOURCE_COLUMN] = sourceVertices[2].in();
+          if ( onFace )
+            periodicity_i[PERIODICITY_P3_SOURCE_COLUMN] = sourceVertices[2].in();
         }
 
       if (targetVertices.length()!=0)
         {
           periodicity_i[PERIODICITY_P1_TARGET_COLUMN] = targetVertices[0].in();
           periodicity_i[PERIODICITY_P2_TARGET_COLUMN] = targetVertices[1].in();
-          periodicity_i[PERIODICITY_P3_TARGET_COLUMN] = targetVertices[2].in();
+          if ( onFace )
+            periodicity_i[PERIODICITY_P3_TARGET_COLUMN] = targetVertices[2].in();
         }
 
       if (onFace)