-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <gp_Ax1.hxx>
#include <gp_Vec.hxx>
#include <gp_XY.hxx>
+#include <smIdType.hxx>
#include <list>
#include <string>
{
_EdgeSubMesh(const SMDS_Mesh* mesh, int index=0): SubMesh(mesh,index) {}
//virtual int NbElements() const { return _elements.size()+1; }
- virtual int NbNodes() const { return Max( 0, _uvPtStructVec.size()-2 ); }
+ virtual smIdType NbNodes() const { return Max( 0, _uvPtStructVec.size()-2 ); }
void SetUVPtStructVec(UVPtStructVec& vec) { _uvPtStructVec.swap( vec ); }
UVPtStructVec& GetUVPtStructVec() { return _uvPtStructVec; }
};
// Treat events
void ProcessEvent(const int event,
const int eventType,
- SMESH_subMesh* subMesh,
+ SMESH_subMesh* /*subMesh*/,
EventListenerData* data,
const SMESH_Hypothesis* /*hyp*/)
{
_param_algo_dim = -2; // auxiliary hyp used by 2D algos
}
// --------------------------------------------------------------------------------
-bool StdMeshers_ViscousLayers2D::SetParametersByMesh(const SMESH_Mesh* theMesh,
- const TopoDS_Shape& theShape)
+bool StdMeshers_ViscousLayers2D::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/,
+ const TopoDS_Shape& /*theShape*/)
{
// TODO ???
return false;
outerNodes.swap( innerNodes );
}
+ // Add faces to a group
+ SMDS_MeshGroup* group = StdMeshers_ViscousLayers::CreateGroup( hyp->GetGroupName(),
+ *_helper.GetMesh(),
+ SMDSAbs_Face );
+ if ( group )
+ {
+ TIDSortedElemSet::iterator fIt = L._newFaces.begin();
+ for ( ; fIt != L._newFaces.end(); ++fIt )
+ group->Add( *fIt );
+ }
+
// faces between not shared _LayerEdge's (at concave VERTEX)
for ( int isR = 0; isR < 2; ++isR )
{
if ( lNodes.empty() || rNodes.empty() || lNodes.size() != rNodes.size() )
continue;
+ const SMDS_MeshElement* face = 0;
for ( size_t i = 1; i < lNodes.size(); ++i )
- _helper.AddFace( lNodes[ i+prev ], rNodes[ i+prev ],
- rNodes[ i+cur ], lNodes[ i+cur ]);
+ {
+ face = _helper.AddFace( lNodes[ i+prev ], rNodes[ i+prev ],
+ rNodes[ i+cur ], lNodes[ i+cur ]);
+ if ( group )
+ group->Add( face );
+ }
const UVPtStruct& ptOnVertex = points[ isR ? L._lastPntInd : L._firstPntInd ];
if ( isReverse )
- _helper.AddFace( ptOnVertex.node, lNodes[ 0 ], rNodes[ 0 ]);
+ face = _helper.AddFace( ptOnVertex.node, lNodes[ 0 ], rNodes[ 0 ]);
else
- _helper.AddFace( ptOnVertex.node, rNodes[ 0 ], lNodes[ 0 ]);
+ face = _helper.AddFace( ptOnVertex.node, rNodes[ 0 ], lNodes[ 0 ]);
+ if ( group )
+ group->Add( face );
}
// Fill the _ProxyMeshOfFace