- //================================================================================
- /*!
- * \brief Update submeshes state for all edges and internal vertices,
- * make them look computed even if none edge or node is set on them
- */
- //================================================================================
-
- void careOfSubMeshes( StdMeshers_FaceSide& side, EventListener* eListener)
- {
- if ( side.NbEdges() < 2)
- return;
- for ( int iE = 0; iE < side.NbEdges(); ++iE )
- {
- // set listener and its data
- EventListenerData * listenerData = new EventListenerData(true);
- const TopoDS_Edge& edge = side.Edge( iE );
- SMESH_subMesh * sm = side.GetMesh()->GetSubMesh( edge );
- sm->SetEventListener( eListener, listenerData, sm );
- // add edge submesh to the data
- sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
- if ( sm->GetComputeState() != SMESH_subMesh::COMPUTE_OK ) {
- sm->SetIsAlwaysComputed( true );
- listenerData->mySubMeshes.push_back( sm );
- }
- // add internal vertex submesh to the data
- if ( iE )
- {
- TopoDS_Vertex V = side.FirstVertex( iE );
- sm = side.GetMesh()->GetSubMesh( V );
- sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
- if ( sm->GetComputeState() != SMESH_subMesh::COMPUTE_OK )
- sm->SetIsAlwaysComputed( true );
- listenerData->mySubMeshes.push_back( sm );
- }
- }
- }
-