mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-11 16:19:16 +05:00
IPAL53073: Hexotic Mesh is not compute
This commit is contained in:
parent
18dade91d0
commit
dbf226547f
@ -68,30 +68,30 @@ The following dialog will appear:
|
||||
the \ref filtering_elements "Selection filters" page.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>If the <b>Extrusion to Distance</b> radio button is selected
|
||||
- specify the translation vector by which the elements will be extruded.
|
||||
</li>
|
||||
<p><br></p>
|
||||
|
||||
\image html extrusionalongaline2.png
|
||||
<li>If the <b>Extrusion to Distance</b> radio button is selected
|
||||
<ul>
|
||||
<li> specify the translation vector by which the elements will
|
||||
be extruded.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>If the <b>Extrusion Along Vector</b> radio button is selected
|
||||
\image html extrusionalongaline2.png
|
||||
<ul>
|
||||
<li>specify the coordinates of the \b Vector along which the elements
|
||||
<li>specify the components of the \b Vector along which the elements
|
||||
will be extruded, either directly or by selecting the mesh face (the
|
||||
normal to the face will define the vector),</li>
|
||||
<li>specify the \b Distance of extrusion along the vector (it can
|
||||
be negative).</li>
|
||||
</ul>
|
||||
</li>
|
||||
<p><br></p>
|
||||
|
||||
\image html extrusionalongaline3.png
|
||||
|
||||
<li>If the <b>Extrusion By Normal</b> radio button is selected,
|
||||
every node of the selected faces is extruded along the \a average
|
||||
of the \a normal vectors to the faces sharing the node. (Nodes and
|
||||
edges cannot be extruded in this mode.)
|
||||
\image html extrusionalongaline3.png
|
||||
<ul>
|
||||
<li>Specify the \b Distance of extrusion (it can be negative),</li>
|
||||
<li>Use <b>Along average normal</b> check-box to specify along
|
||||
|
@ -134,9 +134,11 @@ The following dialog will appear:
|
||||
<li>If the path of extrusion is curvilinear, at each iteration the
|
||||
extruded elements are rotated to keep its initial angularity to the
|
||||
curve. By default, the <b>Base Point</b> around which the elements
|
||||
are rotated is the mass center of the elements, however, you can
|
||||
specify any point as the <b>Base Point</b> and the elements will be
|
||||
rotated with respect to this point.<br>
|
||||
are rotated is the mass center of the elements (note that it can
|
||||
differ from the gravity center computed by \a Geometry module for the
|
||||
underlying shape), however, you can specify any point as the <b>Base
|
||||
Point</b> and the elements will be rotated with respect to this
|
||||
point.<br>
|
||||
Note that only the displacement of the <b>Base Point</b> exactly
|
||||
equals to the path, and all other extruded elements simply keep
|
||||
their position relatively to the <b>Base Point</b> at each
|
||||
|
@ -3301,12 +3301,12 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement * elem,
|
||||
}
|
||||
removedElems.push_back((*it));
|
||||
myElementIDFactory->ReleaseID(IdToRemove, vtkid);
|
||||
if (const SMDS_VtkEdge* vtkElem = dynamic_cast<const SMDS_VtkEdge*>(*it)) {
|
||||
if (const SMDS_VtkEdge* vtkElem = dynamic_cast<const SMDS_VtkEdge*>(*it))
|
||||
myEdgePool->destroy((SMDS_VtkEdge*) vtkElem);
|
||||
else {
|
||||
((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse
|
||||
}
|
||||
else
|
||||
delete (*it);
|
||||
}
|
||||
break;
|
||||
case SMDSAbs_Face:
|
||||
if (IdToRemove >= 0)
|
||||
@ -3316,12 +3316,12 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement * elem,
|
||||
}
|
||||
removedElems.push_back((*it));
|
||||
myElementIDFactory->ReleaseID(IdToRemove, vtkid);
|
||||
if (const SMDS_VtkFace* vtkElem = dynamic_cast<const SMDS_VtkFace*>(*it)) {
|
||||
if (const SMDS_VtkFace* vtkElem = dynamic_cast<const SMDS_VtkFace*>(*it))
|
||||
myFacePool->destroy((SMDS_VtkFace*) vtkElem);
|
||||
else {
|
||||
((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse
|
||||
}
|
||||
else
|
||||
delete (*it);
|
||||
}
|
||||
break;
|
||||
case SMDSAbs_Volume:
|
||||
if (IdToRemove >= 0)
|
||||
@ -3331,12 +3331,12 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement * elem,
|
||||
}
|
||||
removedElems.push_back((*it));
|
||||
myElementIDFactory->ReleaseID(IdToRemove, vtkid);
|
||||
if (const SMDS_VtkVolume* vtkElem = dynamic_cast<const SMDS_VtkVolume*>(*it)) {
|
||||
if (const SMDS_VtkVolume* vtkElem = dynamic_cast<const SMDS_VtkVolume*>(*it))
|
||||
myVolumePool->destroy((SMDS_VtkVolume*) vtkElem);
|
||||
else {
|
||||
((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse
|
||||
}
|
||||
else
|
||||
delete (*it);
|
||||
}
|
||||
break;
|
||||
case SMDSAbs_Ball:
|
||||
if (IdToRemove >= 0)
|
||||
@ -3346,48 +3346,48 @@ void SMDS_Mesh::RemoveElement(const SMDS_MeshElement * elem,
|
||||
}
|
||||
removedElems.push_back((*it));
|
||||
myElementIDFactory->ReleaseID(IdToRemove, vtkid);
|
||||
if (const SMDS_BallElement* vtkElem = dynamic_cast<const SMDS_BallElement*>(*it)) {
|
||||
if (const SMDS_BallElement* vtkElem = dynamic_cast<const SMDS_BallElement*>(*it))
|
||||
myBallPool->destroy(const_cast<SMDS_BallElement*>( vtkElem ));
|
||||
else {
|
||||
((SMDS_MeshElement*) *it)->init( -1, -1, -1 ); // avoid reuse
|
||||
}
|
||||
else
|
||||
delete (*it);
|
||||
}
|
||||
break;
|
||||
|
||||
case SMDSAbs_All: // avoid compilation warning
|
||||
case SMDSAbs_NbElementTypes: break;
|
||||
}
|
||||
if (vtkid >= 0)
|
||||
{
|
||||
this->myGrid->GetCellTypesArray()->SetValue(vtkid, VTK_EMPTY_CELL);
|
||||
}
|
||||
{
|
||||
this->myGrid->GetCellTypesArray()->SetValue(vtkid, VTK_EMPTY_CELL);
|
||||
}
|
||||
it++;
|
||||
}
|
||||
|
||||
// remove exclusive (free) nodes
|
||||
if (removenodes)
|
||||
{
|
||||
it = s2->begin();
|
||||
while (it != s2->end())
|
||||
{
|
||||
it = s2->begin();
|
||||
while (it != s2->end())
|
||||
{
|
||||
int IdToRemove = (*it)->GetID();
|
||||
if (IdToRemove >= 0)
|
||||
{
|
||||
myNodes[IdToRemove] = 0;
|
||||
myInfo.myNbNodes--;
|
||||
}
|
||||
myNodeIDFactory->ReleaseID((*it)->GetID(), (*it)->getVtkId());
|
||||
removedNodes.push_back((*it));
|
||||
if (const SMDS_MeshNode* vtkElem = dynamic_cast<const SMDS_MeshNode*>(*it))
|
||||
{
|
||||
((SMDS_MeshNode*)vtkElem)->SetPosition(SMDS_SpacePosition::originSpacePosition());
|
||||
myNodePool->destroy((SMDS_MeshNode*) vtkElem);
|
||||
}
|
||||
else
|
||||
delete (*it);
|
||||
it++;
|
||||
}
|
||||
int IdToRemove = (*it)->GetID();
|
||||
if (IdToRemove >= 0)
|
||||
{
|
||||
myNodes[IdToRemove] = 0;
|
||||
myInfo.myNbNodes--;
|
||||
}
|
||||
myNodeIDFactory->ReleaseID((*it)->GetID(), (*it)->getVtkId());
|
||||
removedNodes.push_back((*it));
|
||||
if (const SMDS_MeshNode* vtkElem = dynamic_cast<const SMDS_MeshNode*>(*it))
|
||||
{
|
||||
((SMDS_MeshNode*)vtkElem)->SetPosition(SMDS_SpacePosition::originSpacePosition());
|
||||
myNodePool->destroy((SMDS_MeshNode*) vtkElem);
|
||||
}
|
||||
else
|
||||
delete (*it);
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
delete s2;
|
||||
delete s1;
|
||||
|
@ -894,16 +894,7 @@ void SMESHDS_Mesh::RemoveNode(const SMDS_MeshNode * n)
|
||||
{
|
||||
if ( n->NbInverseElements() == 0 && !(hasConstructionEdges() || hasConstructionFaces()))
|
||||
{
|
||||
SMESHDS_SubMesh* subMesh = MeshElements( n->getshapeId() );
|
||||
SMESHDS_SubMeshIteratorPtr subIt;
|
||||
if ( !subMesh )
|
||||
subIt = SubMeshes();
|
||||
for ( ; !subMesh && subIt->more(); ) {
|
||||
subMesh = const_cast< SMESHDS_SubMesh* >( subIt->next() );
|
||||
if ( subMesh->IsComplexSubmesh() || !subMesh->Contains( n ))
|
||||
subMesh = 0;
|
||||
}
|
||||
RemoveFreeNode( n, subMesh, true);
|
||||
RemoveFreeNode( n, 0, true );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -117,13 +117,22 @@ bool SMESHDS_SubMesh::RemoveElement(const SMDS_MeshElement * ME, bool isElemDele
|
||||
{
|
||||
if (!ME)
|
||||
{
|
||||
MESSAGE("-----------------> Remove Null Element " << isElemDeleted);
|
||||
return false;
|
||||
}
|
||||
if (!IsComplexSubmesh())
|
||||
{
|
||||
if ( ME->getshapeId() != myIndex )
|
||||
if ( ME->getshapeId() != myIndex ) // elem not in a pool can loose it's data already
|
||||
{
|
||||
if ( isElemDeleted )
|
||||
for ( size_t i = 0; i < myElements.size(); ++i )
|
||||
if ( myElements[i] == ME )
|
||||
{
|
||||
myElements[i] = 0;
|
||||
++myUnusedIdElements;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
int idInSubShape = ME->getIdInShape();
|
||||
SMDS_MeshElement* elem = (SMDS_MeshElement*) (ME);
|
||||
elem->setShapeId(0);
|
||||
@ -140,7 +149,6 @@ bool SMESHDS_SubMesh::RemoveElement(const SMDS_MeshElement * ME, bool isElemDele
|
||||
}
|
||||
return false;
|
||||
}
|
||||
MESSAGE("Try to remove an element from a complex submesh ");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -182,7 +190,17 @@ bool SMESHDS_SubMesh::RemoveNode(const SMDS_MeshNode * N, bool isNodeDeleted)
|
||||
if (!IsComplexSubmesh())
|
||||
{
|
||||
if ( N->getshapeId() != myIndex )
|
||||
{
|
||||
if ( isNodeDeleted )
|
||||
for ( size_t i = 0; i < myNodes.size(); ++i )
|
||||
if ( myNodes[i] == N )
|
||||
{
|
||||
myNodes[i] = 0;
|
||||
++myUnusedIdNodes;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
int idInSubShape = N->getIdInShape();
|
||||
SMDS_MeshNode* node = (SMDS_MeshNode*) (N);
|
||||
node->setShapeId(0);
|
||||
@ -199,13 +217,12 @@ bool SMESHDS_SubMesh::RemoveNode(const SMDS_MeshNode * N, bool isNodeDeleted)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
MESSAGE("Try to remove a node from a complex submesh");
|
||||
return false;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NbElements
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
int SMESHDS_SubMesh::NbElements() const
|
||||
|
Loading…
Reference in New Issue
Block a user