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