mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-30 02:10:32 +05:00
PR: debug split into tetras
This commit is contained in:
parent
43a4d0b5c1
commit
7013eafe2d
@ -1717,10 +1717,10 @@ void SMESH_MeshEditor::SplitVolumesIntoTetra (const TIDSortedElemSet & theElems,
|
|||||||
}
|
}
|
||||||
for ( int i = 0; i < triangles.size(); ++i )
|
for ( int i = 0; i < triangles.size(); ++i )
|
||||||
{
|
{
|
||||||
if ( !triangles.back() ) continue;
|
if ( !triangles[i] ) continue;
|
||||||
if ( fSubMesh )
|
if ( fSubMesh )
|
||||||
fSubMesh->AddElement( triangles.back());
|
fSubMesh->AddElement( triangles[i]);
|
||||||
newElems.Append( triangles.back() );
|
newElems.Append( triangles[i] );
|
||||||
}
|
}
|
||||||
ReplaceElemInGroups( face, triangles, GetMeshDS() );
|
ReplaceElemInGroups( face, triangles, GetMeshDS() );
|
||||||
GetMeshDS()->RemoveFreeElement( face, fSubMesh, /*fromGroups=*/false );
|
GetMeshDS()->RemoveFreeElement( face, fSubMesh, /*fromGroups=*/false );
|
||||||
|
@ -55,13 +55,34 @@ void SMESHDS_SubMesh::AddElement(const SMDS_MeshElement * ME)
|
|||||||
if (!IsComplexSubmesh())
|
if (!IsComplexSubmesh())
|
||||||
{
|
{
|
||||||
//MESSAGE("in " << myIndex << " AddElement "<< ME->GetID());
|
//MESSAGE("in " << myIndex << " AddElement "<< ME->GetID());
|
||||||
int idInSubShape = ME->getIdInShape();
|
int oldShapeId = ME->getshapeId();
|
||||||
if (idInSubShape != -1)
|
if ( oldShapeId > 0 )
|
||||||
{
|
{
|
||||||
MESSAGE("add element in subshape already belonging to a subshape "
|
if (oldShapeId != myIndex)
|
||||||
<< ME->GetID() << " " << ME->getIdInShape() << " " << ME->getshapeId());
|
{
|
||||||
throw SALOME_Exception(LOCALIZED("add element in subshape already belonging to a subshape"));
|
MESSAGE("add element in subshape already belonging to another subshape "
|
||||||
|
<< ME->GetID() << " " << oldShapeId << " " << myIndex);
|
||||||
|
throw SALOME_Exception(LOCALIZED("add element in subshape already belonging to a subshape"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int idInSubShape = ME->getIdInShape();
|
||||||
|
MESSAGE("add element in subshape already belonging to that subshape "
|
||||||
|
<< ME->GetID() << " " << oldShapeId << " " << idInSubShape);
|
||||||
|
// check if ok: do nothing if ok
|
||||||
|
if ((idInSubShape == -1) || (idInSubShape >= myElements.size()))
|
||||||
|
{
|
||||||
|
MESSAGE("out of bounds");
|
||||||
|
throw SALOME_Exception(LOCALIZED("out of bounds"));
|
||||||
|
}
|
||||||
|
if (ME != myElements[idInSubShape])
|
||||||
|
{
|
||||||
|
MESSAGE("not the same element");
|
||||||
|
throw SALOME_Exception(LOCALIZED("not the same element"));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SMDS_MeshElement* elem = (SMDS_MeshElement*) (ME);
|
SMDS_MeshElement* elem = (SMDS_MeshElement*) (ME);
|
||||||
elem->setShapeId(myIndex);
|
elem->setShapeId(myIndex);
|
||||||
elem->setIdInShape(myElements.size());
|
elem->setIdInShape(myElements.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user