BRepBuilderAPI_MakePolygon wire;
const size_t i0 = tmpVertex.size();
- for ( size_t iN = 1; iN < wirePoints.size(); ++iN )
+ for ( size_t iN = 0; iN < wirePoints.size(); ++iN )
{
wire.Add( SMESH_TNodeXYZ( wirePoints[ iN ].node ));
origNodes.push_back( wirePoints[ iN ].node );
SMESH_MesherHelper tmpHelper( *this );
tmpHelper.SetSubShape( _proxyFace );
+ // remove the faces made by the mesher
+ {
+ SMESHDS_Mesh* meshDS = helper.GetMeshDS();
+ SMESH_subMesh* sm = origMesh.GetSubMesh( origFace );
+ if ( SMESHDS_SubMesh* smDS = sm->GetSubMeshDS() )
+ {
+ SMDS_ElemIteratorPtr eIt = smDS->GetElements();
+ while ( eIt->more() ) meshDS->RemoveFreeElement( eIt->next(), smDS );
+ SMDS_NodeIteratorPtr nIt = smDS->GetNodes();
+ while ( nIt->more() ) meshDS->RemoveFreeNode( nIt->next(), smDS );
+ }
+ }
+
// iterate over tmp faces and copy them in origMesh
const SMDS_MeshNode* nodes[27];
const SMDS_MeshNode* nullNode = 0;
for ( ; nIt->more(); ++nbN )
{
const SMDS_MeshNode* n = static_cast<const SMDS_MeshNode*>( nIt->next() );
- TN2NMap::iterator n2nIt =
+ TN2NMap::iterator n2nIt =
_tmp2origNN.insert( _tmp2origNN.end(), make_pair( n, nullNode ));
if ( !n2nIt->second ) {
n->GetXYZ( xyz );
}
switch( nbN ) {
case 3: helper.AddFace( nodes[0], nodes[1], nodes[2] ); break;
- // case 6: helper.AddFace( nodes[0], nodes[1], nodes[2],
- // nodes[3], nodes[4], nodes[5]); break;
+ // case 6: helper.AddFace( nodes[0], nodes[1], nodes[2],
+ // nodes[3], nodes[4], nodes[5]); break;
case 4: helper.AddFace( nodes[0], nodes[1], nodes[2], nodes[3] ); break;
// case 9: helper.AddFace( nodes[0], nodes[1], nodes[2], nodes[3],
// nodes[4], nodes[5], nodes[6], nodes[7], nodes[8]); break;
double * _progress;
};
-
} // namespace
status_t curv_fun(real t, real *uv, real *dt, real *dtt, void *user_data);
this->SMESH_Algo::_progress = 1e-3; // prevent progress advancment while computing attractors
- if ( !compute( aMesh, aShape, /*allowSubMeshClearing=*/true ))
- return false;
+ bool viscousLayersMade =
+ ( aShape.ShapeType() == TopAbs_FACE &&
+ StdMeshers_ViscousLayers2D::HasProxyMesh( TopoDS::Face( aShape ), aMesh ));
+
+ if ( !viscousLayersMade )
+ if ( !compute( aMesh, aShape, /*allowSubMeshClearing=*/true ))
+ return false;
- if ( _haveViscousLayers )
+ if ( _haveViscousLayers || viscousLayersMade )
{
// Compute viscous layers