:SMESH_3D_Algo(hypId, studyId, gen)
{
_name = "Projection_3D";
- _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID); // 1 bit per shape type
+ _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID); // 1 bit per shape type
_compatibleHypothesis.push_back("ProjectionSource3D");
_sourceHypo = 0;
TopoDS_Shape edge = TAssocTool::GetEdgeByVertices
( srcMesh, _sourceHypo->GetSourceVertex(1), _sourceHypo->GetSourceVertex(2) );
if ( edge.IsNull() ||
- !TAssocTool::IsSubShape( edge, srcMesh ) ||
- !TAssocTool::IsSubShape( edge, _sourceHypo->GetSource3DShape() ))
+ !SMESH_MesherHelper::IsSubShape( edge, srcMesh ) ||
+ !SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSource3DShape() ))
{
SCRUTE((edge.IsNull()));
- SCRUTE((TAssocTool::IsSubShape( edge, srcMesh )));
- SCRUTE((TAssocTool::IsSubShape( edge, _sourceHypo->GetSource3DShape() )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, srcMesh )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSource3DShape() )));
aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
}
else
edge = TAssocTool::GetEdgeByVertices
( tgtMesh, _sourceHypo->GetTargetVertex(1), _sourceHypo->GetTargetVertex(2) );
if ( edge.IsNull() ||
- !TAssocTool::IsSubShape( edge, tgtMesh ) ||
- !TAssocTool::IsSubShape( edge, aShape ))
+ !SMESH_MesherHelper::IsSubShape( edge, tgtMesh ) ||
+ !SMESH_MesherHelper::IsSubShape( edge, aShape ))
{
SCRUTE((edge.IsNull()));
- SCRUTE((TAssocTool::IsSubShape( edge, tgtMesh )));
- SCRUTE((TAssocTool::IsSubShape( edge, aShape )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, tgtMesh )));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( edge, aShape )));
aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
}
}
}
// check a source shape
- if ( !TAssocTool::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh ) ||
+ if ( !SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh ) ||
( srcMesh == tgtMesh && aShape == _sourceHypo->GetSource3DShape()))
{
- SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh)));
+ SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSource3DShape(), srcMesh)));
SCRUTE((srcMesh == tgtMesh));
SCRUTE((aShape == _sourceHypo->GetSource3DShape()));
aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
return error("Association of subshapes failed" );
srcV000 = TopoDS::Vertex( shape2ShapeMap( tgtV000 ));
srcV100 = TopoDS::Vertex( shape2ShapeMap( tgtV100 ));
- if ( !TAssocTool::IsSubShape( srcV000, srcShell ) ||
- !TAssocTool::IsSubShape( srcV100, srcShell ))
+ if ( !SMESH_MesherHelper::IsSubShape( srcV000, srcShell ) ||
+ !SMESH_MesherHelper::IsSubShape( srcV100, srcShell ))
return error("Incorrect association of subshapes" );
}
TNodeNodeMap faceMatchingNodes;
if ( ! TAssocTool::FindMatchingNodesOnFaces( srcFace, srcMesh, tgtFace, tgtMesh,
shape2ShapeMap, faceMatchingNodes ))
- return error(COMPERR_BAD_INPUT_MESH,SMESH_Comment("Mesh on faces #")
- << srcMeshDS->ShapeToIndex( srcFace ) << " and "
- << tgtMeshDS->ShapeToIndex( tgtFace ) << " seems different" );
+ return error(COMPERR_BAD_INPUT_MESH,SMESH_Comment("Mesh on faces #")
+ << srcMeshDS->ShapeToIndex( srcFace ) << " and "
+ << tgtMeshDS->ShapeToIndex( tgtFace ) << " seems different" );
// put found matching nodes of 2 faces to the global map
src2tgtNodeMap.insert( faceMatchingNodes.begin(), faceMatchingNodes.end() );
//=======================================================================
bool StdMeshers_Projection_3D::Evaluate(SMESH_Mesh& aMesh,
- const TopoDS_Shape& aShape,
- MapShapeNbElems& aResMap)
+ const TopoDS_Shape& aShape,
+ MapShapeNbElems& aResMap)
{
if ( !_sourceHypo )
return false;
return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed");
- std::vector<int> aVec(17);
- for(int i=0; i<17; i++) aVec[i] = 0;
+ std::vector<int> aVec(SMDSEntity_Last);
+ for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i] = 0;
- aVec[0] = srcSubMesh->GetSubMeshDS()->NbNodes();
+ aVec[SMDSEntity_Node] = srcSubMesh->GetSubMeshDS()->NbNodes();
//bool quadratic = false;
SMDS_ElemIteratorPtr elemIt = srcSubMesh->GetSubMeshDS()->GetElements();
while ( elemIt->more() ) {
const SMDS_MeshElement* E = elemIt->next();
if( E->NbNodes()==4 ) {
- aVec[8]++;
+ aVec[SMDSEntity_Tetra]++;
}
else if( E->NbNodes()==5 ) {
- aVec[10]++;
+ aVec[SMDSEntity_Pyramid]++;
}
else if( E->NbNodes()==6 ) {
- aVec[12]++;
+ aVec[SMDSEntity_Penta]++;
}
else if( E->NbNodes()==8 ) {
- aVec[14]++;
+ aVec[SMDSEntity_Hexa]++;
}
else if( E->NbNodes()==10 && E->IsQuadratic() ) {
- aVec[9]++;
+ aVec[SMDSEntity_Quad_Tetra]++;
}
else if( E->NbNodes()==13 && E->IsQuadratic() ) {
- aVec[11]++;
+ aVec[SMDSEntity_Quad_Pyramid]++;
}
else if( E->NbNodes()==15 && E->IsQuadratic() ) {
- aVec[13]++;
+ aVec[SMDSEntity_Quad_Penta]++;
}
else if( E->NbNodes()==20 && E->IsQuadratic() ) {
- aVec[15]++;
+ aVec[SMDSEntity_Quad_Hexa]++;
}
else {
- aVec[16]++;
+ aVec[SMDSEntity_Polyhedra]++;
}
}