+//================================================================================
+/*!
+ * \brief Set positions of enforced nodes
+ */
+//================================================================================
+
+void StdMeshers_QuadrangleParams_i::SetEnforcedNodes(const GEOM::ListOfGO& theVertices,
+ const SMESH::nodes_array& thePoints)
+ throw ( SALOME::SALOME_Exception )
+{
+ try {
+ std::vector< TopoDS_Shape > shapes;
+ std::vector< gp_Pnt > points;
+ shapes.reserve( theVertices.length() );
+ points.reserve( thePoints.length() );
+
+ myShapeEntries.clear();
+
+ for ( size_t i = 0; i < theVertices.length(); ++i )
+ {
+ if ( CORBA::is_nil( theVertices[i] ))
+ continue;
+ CORBA::String_var entry = theVertices[i]->GetStudyEntry();
+ if ( !entry.in() || !entry.in()[0] )
+ THROW_SALOME_CORBA_EXCEPTION( "Not published enforced vertex shape", SALOME::BAD_PARAM );
+
+ shapes.push_back( StdMeshers_ObjRefUlils::GeomObjectToShape( theVertices[i].in() ));
+ myShapeEntries.push_back( entry.in() );
+ }
+ for ( size_t i = 0; i < thePoints.length(); ++i )
+ {
+ points.push_back( gp_Pnt( thePoints[i].x, thePoints[i].y, thePoints[i].z ));
+ }
+ this->GetImpl()->SetEnforcedNodes( shapes, points );
+ }
+ catch ( SALOME_Exception& S_ex ) {
+ THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
+ }
+ // Update Python script
+ SMESH::TPythonDump() << _this() << ".SetEnforcedNodes( "
+ << theVertices << ", " << thePoints << " )";
+}
+
+//================================================================================
+/*!
+ * \brief Returns positions of enforced nodes
+ */
+//================================================================================
+
+void StdMeshers_QuadrangleParams_i::GetEnforcedNodes(GEOM::ListOfGO_out theVertices,
+ SMESH::nodes_array_out thePoints)
+{
+ SMESH_TRY;
+
+ std::vector< TopoDS_Shape > shapes;
+ std::vector< gp_Pnt > points;
+ this->GetImpl()->GetEnforcedNodes( shapes, points );
+
+ theVertices = new GEOM::ListOfGO;
+ thePoints = new SMESH::nodes_array;
+
+ size_t i = 0;
+ theVertices->length( myShapeEntries.size() );
+ for ( i = 0; i < myShapeEntries.size(); ++i )
+ theVertices[i] =
+ StdMeshers_ObjRefUlils::EntryOrShapeToGeomObject( myShapeEntries[i], shapes[i] );
+
+ thePoints->length( points.size() );
+ for ( i = 0; i < points.size(); ++i )
+ {
+ thePoints[i].x = points[i].X();
+ thePoints[i].y = points[i].Y();
+ thePoints[i].z = points[i].Z();
+ }
+ SMESH_CATCH( SMESH::doNothing );
+}
+
+//================================================================================
+/*!
+ * \brief Returns study entries of shapes defining enforced nodes
+ */
+//================================================================================
+
+SMESH::string_array* StdMeshers_QuadrangleParams_i::GetEnfVertices()
+{
+ SMESH::string_array_var arr = new SMESH::string_array;
+ arr->length( myShapeEntries.size() );
+
+ for ( size_t i = 0; i < myShapeEntries.size(); ++i )
+ arr[ i ] = myShapeEntries[ i ].c_str();
+
+ return arr._retn();
+}
+