52548: Set filter on standalone group of edges does't work

2) Allow passing a geom group as faces arg of ViscousLayers()
3) Prevent crash of Adaptive hyp when only degenerated EDGEs leave not meshed
This commit is contained in:
eap 2014-10-23 12:21:14 +04:00
parent 5b6af39e27
commit 3ba242025d
3 changed files with 11 additions and 2 deletions

View File

@ -3020,7 +3020,8 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
SMESH::Predicate_ptr aPrevPredicate = SMESH::Predicate::_nil();
int aPrevBinary = SMESH::FT_Undefined;
aBinaries.back() = SMESH::FT_Undefined;
if ( !aBinaries.empty() )
aBinaries.back() = SMESH::FT_Undefined;
for ( aPredIter = aPredicates.begin(), aBinaryIter = aBinaries.begin();
aPredIter != aPredicates.end() && aBinaryIter != aBinaries.end();

View File

@ -274,7 +274,14 @@ class Mesh_Algorithm:
if not "ViscousLayers" in self.GetCompatibleHypothesis():
raise TypeError, "ViscousLayers are not supported by %s"%self.algo.GetName()
if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ):
faces = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f) for f in faces ]
import GEOM
faceIDs = []
for f in faces:
if self.mesh.geompyD.ShapeIdToType( f.GetType() ) == "GROUP":
faceIDs += f.GetSubShapeIndices()
else:
faceIDs += [self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f)]
faces = faceIDs
hyp = self.Hypothesis("ViscousLayers",
[thickness, numberOfLayers, stretchFactor, faces, isFacesToIgnore],
toAdd=False)

View File

@ -1179,6 +1179,7 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh,
eData.AddPoint( eData.myPoints.end(), eData.myC3d.LastParameter() );
}
}
if ( myEdges.empty() ) return true;
if ( _computeCanceled ) return false;
// Take into account size of already existing segments