_onlyUnaryInput = true;
// check propagation in a redefined GetUsedHypothesis()
- const list <const SMESHDS_Hypothesis * > hyps =
+ const list <const SMESHDS_Hypothesis * > & hyps =
GetUsedHypothesis(aMesh, aShape, /*ignoreAuxiliaryHyps=*/false);
+
const SMESH_HypoFilter & propagFilter = StdMeshers_Propagation::GetFilter();
// find non-auxiliary hypothesis
const SMESHDS_Hypothesis *theHyp = 0;
set< string > propagTypes;
- //std::cout << "For shape " << aShape.HashCode(1) << " of type "<< aShape.ShapeType() <<
- // "CheckHypothesis" << std::endl;
- // for(auto hyp:hyps){
- // SMESH_Comment hypStr;
- // hypStr << hyp << " " << hyp->GetName() << " ";
- // ((SMESHDS_Hypothesis*)hyp)->SaveTo( hypStr.Stream() );
- // hypStr << " ";
- // std::cout << hypStr << std::endl;
- // }
list <const SMESHDS_Hypothesis * >::const_iterator h = hyps.begin();
for ( ; h != hyps.end(); ++h ) {
if ( static_cast<const SMESH_Hypothesis*>(*h)->IsAuxiliary() ) {
{
// Number Of Segments hypothesis
nbSegments = _ivalue[ NB_SEGMENTS_IND ];
- if ( nbSegments < 1 ) {
- return false;
- }
- if ( nbSegments == 1 ) {
- return true;
- }
+ if ( nbSegments < 1 ) return false;
+ if ( nbSegments == 1 ) return true;
switch (_ivalue[ DISTR_TYPE_IND ])
{
bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & theShape)
{
- SMESH_Hypothesis::Hypothesis_Status hyp_status;
- theMesh.Lock();
- bool ret = this->CheckHypothesis(theMesh, theShape, hyp_status);
- int hypType = _hypType;
- theMesh.Unlock();
-
- if ( hypType == NONE )
- return false;
+ if ( _hypType == NONE )
+ return false;
- if ( hypType == ADAPTIVE )
+ if ( _hypType == ADAPTIVE )
{
_adaptiveHyp->GetAlgo()->InitComputeError();
_adaptiveHyp->GetAlgo()->Compute( theMesh, theShape );
SMESHDS_Mesh * meshDS = theMesh.GetMeshDS();
- theMesh.Lock();
-
const TopoDS_Edge & EE = TopoDS::Edge(theShape);
TopoDS_Edge E = TopoDS::Edge(EE.Oriented(TopAbs_FORWARD));
int shapeID = meshDS->ShapeToIndex( E );
ASSERT(!VLast.IsNull());
const SMDS_MeshNode * nFirst = SMESH_Algo::VertexNode( VFirst, meshDS );
const SMDS_MeshNode * nLast = SMESH_Algo::VertexNode( VLast, meshDS );
- if ( !nFirst || !nLast ){
- theMesh.Unlock();
- //std::cout << "exit no node" << std::endl;
+ if ( !nFirst || !nLast )
return error( COMPERR_BAD_INPUT_MESH, "No node on vertex");
- }
+
// remove elements created by e.g. pattern mapping (PAL21999)
// CLEAN event is incorrectly ptopagated seemingly due to Propagation hyp
// so TEMPORARY solution is to clean the submesh manually
// take into account reversing the edge the hypothesis is propagated from
// (_mainEdge.Orientation() marks mutual orientation of EDGEs in propagation chain)
reversed = ( _mainEdge.Orientation() == TopAbs_REVERSED );
- if ( hypType != DISTRIB_PROPAGATION ) {
+ if ( _hypType != DISTRIB_PROPAGATION ) {
int mainID = meshDS->ShapeToIndex(_mainEdge);
if ( std::find( _revEdgesIDs.begin(), _revEdgesIDs.end(), mainID) != _revEdgesIDs.end())
reversed = !reversed;
BRepAdaptor_Curve C3d( E );
if ( ! computeInternalParameters( theMesh, C3d, length, f, l, params, reversed, true )) {
- theMesh.Unlock();
- //std::cout << "exit Compute internal failed" << std::endl;
-
return false;
}
redistributeNearVertices( theMesh, C3d, length, params, VFirst, VLast );
meshDS->SetMeshElementOnShape(edge, shapeID);
}
}
- theMesh.Unlock();
- //std::cout << "exit normal" << std::endl;
-
return true;
}