Fix for bug NPAL18491(EDF 630 SMESH : group of face appears with one hole in SMESH but not in VISU).

This commit is contained in:
mzn 2008-01-16 07:17:07 +00:00
parent 21651539bb
commit 881539145f
2 changed files with 4 additions and 2 deletions

View File

@ -795,7 +795,7 @@ void DriverMED_R_SMESHDS_Mesh::GetGroup(SMESHDS_Group* theGroup)
theGroup->SMDSGroup().Add(element);
}
if ( element )
theGroup->SetType( element->GetType() );
theGroup->SetType( theGroup->SMDSGroup().GetType() );
}
}
}

View File

@ -124,8 +124,10 @@ void SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem)
{
// the type of the group is determined by the first element added
if (myElements.empty()) myType = theElem->GetType();
else if (theElem->GetType() != myType)
else if (theElem->GetType() != myType) {
MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
return;
}
myElements.insert(theElem);
}