SMESH_Hypothesis::Hypothesis_Status& aStatus)
{
// check nb of faces in the shape
+/* PAL16229
aStatus = SMESH_Hypothesis::HYP_BAD_GEOMETRY;
int nbFaces = 0;
for (TopExp_Explorer exp(aShape, TopAbs_FACE); exp.More(); exp.Next())
break;
if ( nbFaces != 6 )
return false;
-
+*/
aStatus = SMESH_Hypothesis::HYP_OK;
return true;
}
meshFaces.push_back(aSubMesh);
}
if (meshFaces.size() != 6)
- return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in block");
+ return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in a block");
// 0.2 - is each face meshed with Quadrangle_2D? (so, with a wire of 4 edges)
SMESH_Hypothesis::Hypothesis_Status& aStatus)
{
// Check shape geometry
-
+/* PAL16229
aStatus = SMESH_Hypothesis::HYP_BAD_GEOMETRY;
// find not quadrangle faces
if ( nbFace != nbEdge + 2 )
RETURN_BAD_RESULT("Bad nb of faces: " << nbFace << " but must be " << nbEdge + 2);
}
-
+*/
// no hypothesis
aStatus = SMESH_Hypothesis::HYP_OK;
return true;
paramHint = prevTNode.GetParams();
if ( !myBlock.ComputeParameters( bN.GetCoords(), bN.ChangeParams(),
ID_BOT_FACE, paramHint ))
- return error(TCom("Can't compute normalized parameters ")
- << "for node " << botNode->GetID() << " on the face #"<< botSM->GetId() );
+ return error(TCom("Can't compute normalized parameters for node ")
+ << botNode->GetID() << " on the face #"<< botSM->GetId() );
prevTNode = bN;
}
// create node column
paramHint = prevTNode.GetParams();
if ( !myBlock.ComputeParameters( bN.GetCoords(), bN.ChangeParams(),
ID_BOT_FACE, paramHint ))
- return error(TCom("Can't compute normalized parameters ")
- << "for node " << botNode->GetID() << " on the face #"<< botSM->GetId() );
+ return error(TCom("Can't compute normalized parameters for node ")
+ << botNode->GetID() << " on the face #"<< botSM->GetId() );
prevTNode = bN;
// compute top node coords
gp_XYZ topXYZ; gp_XY topUV;
// detect bad cases
if ( nbNotQuad > 0 && nbNotQuad != 2 )
return error(COMPERR_BAD_SHAPE,
- TCom("More than 2 not quadrilateral faces ")
+ TCom("More than 2 not quadrilateral faces: ")
<<nbNotQuad);
if ( nbNotQuadMeshed > 2 )
return error(COMPERR_BAD_INPUT_MESH,
- TCom("More than 2 faces meshed with not quadrangle elements ")
+ TCom("More than 2 faces with not quadrangle elements: ")
<<nbNotQuadMeshed);
// get found submeshes
SMESH_Hypothesis::Hypothesis_Status& aStatus)
{
// check aShape that must be a 6 faces block
+/* PAL16229
if ( TAssocTool::Count( aShape, TopAbs_SHELL, 1 ) != 1 ||
TAssocTool::Count( aShape, TopAbs_FACE , 1 ) != 6 ||
TAssocTool::Count( aShape, TopAbs_EDGE , 1 ) != 12 ||
aStatus = HYP_BAD_GEOMETRY;
return false;
}
-
+*/
list <const SMESHDS_Hypothesis * >::const_iterator itl;
const list <const SMESHDS_Hypothesis * >&hyps = GetUsedHypothesis(aMesh, aShape);
srcShell = TopoDS::Shell( exp.Current() );
if ( nbShell != 1 )
return error(COMPERR_BAD_SHAPE,
- SMESH_Comment("Shape must have 1 shell but not") << nbShell);
+ SMESH_Comment("Source shape must have 1 shell but not ") << nbShell);
exp.Init( aShape, TopAbs_SHELL );
for ( nbShell = 0; exp.More(); exp.Next(), ++nbShell )
tgtShell = TopoDS::Shell( exp.Current() );
if ( nbShell != 1 )
return error(COMPERR_BAD_SHAPE,
- SMESH_Comment("Shape must have 1 shell but not") << nbShell);
+ SMESH_Comment("Target shape must have 1 shell but not ") << nbShell);
+
+ // Check that shapes are blocks
+ if ( TAssocTool::Count( tgtShell, TopAbs_FACE , 1 ) != 6 ||
+ TAssocTool::Count( tgtShell, TopAbs_EDGE , 1 ) != 12 ||
+ TAssocTool::Count( tgtShell, TopAbs_WIRE , 1 ) != 6 )
+ return error(COMPERR_BAD_SHAPE, "Target shape is not a block");
+ if ( TAssocTool::Count( srcShell, TopAbs_FACE , 1 ) != 6 ||
+ TAssocTool::Count( srcShell, TopAbs_EDGE , 1 ) != 12 ||
+ TAssocTool::Count( srcShell, TopAbs_WIRE , 1 ) != 6 )
+ return error(COMPERR_BAD_SHAPE, "Source shape is not a block");
// Assure that mesh on a source shape is computed
SMESH_Hypothesis::Hypothesis_Status& aStatus)
{
// check aShape that must have 2 shells
+/* PAL16229
if ( TAssocTool::Count( aShape, TopAbs_SOLID, 0 ) != 1 ||
TAssocTool::Count( aShape, TopAbs_SHELL, 0 ) != 2 )
{
aStatus = HYP_BAD_GEOMETRY;
return false;
}
-
+*/
myNbLayerHypo = 0;
myDistributionHypo = 0;
if ( !outerShell.IsSame( It.Value() ))
innerShell = It.Value();
if ( nbShells != 2 )
- return error(COMPERR_BAD_SHAPE, SMESH_Comment("Must be 2 shells but not")<<nbShells);
+ return error(COMPERR_BAD_SHAPE, SMESH_Comment("Must be 2 shells but not ")<<nbShells);
// ----------------------------------
// Associate subshapes of the shells
TopoDS_Edge edge = BRepBuilderAPI_MakeEdge( pIn, pOut );
SMESH_Hypothesis::Hypothesis_Status aStatus;
if ( !StdMeshers_Regular_1D::CheckHypothesis( aMesh, edge, aStatus ))
- return error( "StdMeshers_Regular_1D::CheckHypothesis() failed"
- "with LayerDistribution hypothesis");
+ return error( "StdMeshers_Regular_1D::CheckHypothesis() failed "
+ "with LayerDistribution hypothesis");
BRepAdaptor_Curve C3D(edge);
double f = C3D.FirstParameter(), l = C3D.LastParameter();