mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
#17336 [CEA 17333] Mesh offset generates a segmentation violation
This commit is contained in:
parent
9de03403fe
commit
2954414714
@ -6367,7 +6367,7 @@ SMESH_MeshEditor::Transform (TIDSortedElemSet & theElems,
|
|||||||
* \param [in] theValue - offset value
|
* \param [in] theValue - offset value
|
||||||
* \param [out] theTgtMesh - a mesh to add offset elements to
|
* \param [out] theTgtMesh - a mesh to add offset elements to
|
||||||
* \param [in] theMakeGroups - to generate groups
|
* \param [in] theMakeGroups - to generate groups
|
||||||
* \return PGroupIDs - IDs of created groups
|
* \return PGroupIDs - IDs of created groups. NULL means failure
|
||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
@ -6454,6 +6454,8 @@ SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::Offset( TIDSortedElemSet & theElem
|
|||||||
PGroupIDs newGroupIDs;
|
PGroupIDs newGroupIDs;
|
||||||
if ( theMakeGroups )
|
if ( theMakeGroups )
|
||||||
newGroupIDs = generateGroups( srcNodes, srcElems, "offset", theTgtMesh, false );
|
newGroupIDs = generateGroups( srcNodes, srcElems, "offset", theTgtMesh, false );
|
||||||
|
else
|
||||||
|
newGroupIDs.reset( new std::list< int > );
|
||||||
|
|
||||||
return newGroupIDs;
|
return newGroupIDs;
|
||||||
}
|
}
|
||||||
|
@ -4115,8 +4115,6 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::Offset( SMESH::SMESH_IDSource_ptr theO
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
theGroups = theCopyGroups ? getGroups( groupIds.get() ) : new SMESH::ListOfGroups;
|
|
||||||
|
|
||||||
if ( *theMeshName && mesh_var->NbFaces() == 0 )
|
if ( *theMeshName && mesh_var->NbFaces() == 0 )
|
||||||
{
|
{
|
||||||
// new mesh empty, remove it
|
// new mesh empty, remove it
|
||||||
@ -4126,6 +4124,10 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::Offset( SMESH::SMESH_IDSource_ptr theO
|
|||||||
builder->RemoveObjectWithChildren( meshSO );
|
builder->RemoveObjectWithChildren( meshSO );
|
||||||
THROW_SALOME_CORBA_EXCEPTION("Offset failed", SALOME::INTERNAL_ERROR);
|
THROW_SALOME_CORBA_EXCEPTION("Offset failed", SALOME::INTERNAL_ERROR);
|
||||||
}
|
}
|
||||||
|
if ( !groupIds ) // nothing changed in the current mesh
|
||||||
|
THROW_SALOME_CORBA_EXCEPTION("Offset failed", SALOME::INTERNAL_ERROR);
|
||||||
|
|
||||||
|
theGroups = theCopyGroups ? getGroups( groupIds.get() ) : new SMESH::ListOfGroups;
|
||||||
|
|
||||||
// result of Offset() is a tuple (mesh, groups)
|
// result of Offset() is a tuple (mesh, groups)
|
||||||
if ( mesh_var->_is_nil() ) pyDump << myMesh_i->_this() << ", ";
|
if ( mesh_var->_is_nil() ) pyDump << myMesh_i->_this() << ", ";
|
||||||
|
Loading…
Reference in New Issue
Block a user