Salome HOME
Add snapping (use existing surface layers as base of the prismatic layer)
[plugins/hybridplugin.git] / src / HYBRIDPlugin / HYBRIDPlugin_Hypothesis_i.cxx
index d4348f519259770e23888a401a0a65509c37a368..662312f3824866549a1aad6c153b44758f9015be 100644 (file)
@@ -143,6 +143,35 @@ SMESH::long_array* HYBRIDPlugin_Hypothesis_i::GetFacesWithImprinting()
   return ids._retn();
 }
 
+//=======================================================================
+//function : SetFacesWithSnapping
+//=======================================================================
+
+void HYBRIDPlugin_Hypothesis_i::SetFacesWithSnapping(const ::SMESH::long_array& theVal)
+{
+  std::vector<int> ids( theVal.length() );
+  for ( size_t i = 0; i < ids.size(); ++i )
+   ids[i] = theVal[i];
+
+  bool valueChanged = this->GetImpl()->SetFacesWithSnapping(ids);
+  if (valueChanged)
+    SMESH::TPythonDump() << _this() << ".SetFacesWithSnapping( "<< theVal << " )";
+}
+
+//=======================================================================
+//function : GetFacesWithSnapping
+//=======================================================================
+
+SMESH::long_array* HYBRIDPlugin_Hypothesis_i::GetFacesWithSnapping()
+{
+  const std::vector<int>& idsVec = this->GetImpl()->GetFacesWithSnapping();
+  SMESH::long_array_var ids = new SMESH::long_array;
+  ids->length( idsVec.size() );
+  for ( size_t i = 0; i < idsVec.size(); ++i )
+    ids[i] = idsVec[i];
+  return ids._retn();
+}
+
 //=======================================================================
 //function : SetToMeshHoles
 //=======================================================================