This commit is contained in:
eap 2011-10-06 12:10:14 +00:00
parent e30e0260ae
commit bc5760bd4e

View File

@ -4885,40 +4885,40 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet & theElements,
nIt = currentElem->nodesIterator(); nIt = currentElem->nodesIterator();
currentNode = static_cast<const SMDS_MeshNode*>(nIt->next()); currentNode = static_cast<const SMDS_MeshNode*>(nIt->next());
if(currentNode == prevNode) if(currentNode == prevNode)
currentNode = static_cast<const SMDS_MeshNode*>(nIt->next()); currentNode = static_cast<const SMDS_MeshNode*>(nIt->next());
aNodesList.push_back(currentNode); aNodesList.push_back(currentNode);
} else { } else {
nIt = currentElem->nodesIterator(); nIt = currentElem->nodesIterator();
while( nIt->more() ) { while( nIt->more() ) {
currentNode = static_cast<const SMDS_MeshNode*>(nIt->next()); currentNode = static_cast<const SMDS_MeshNode*>(nIt->next());
if(currentNode == prevNode) if(currentNode == prevNode)
currentNode = static_cast<const SMDS_MeshNode*>(nIt->next()); currentNode = static_cast<const SMDS_MeshNode*>(nIt->next());
aNodesList.push_back(currentNode); aNodesList.push_back(currentNode);
//case of the closed mesh //case of the closed mesh
if(currentNode == theN1) { if(currentNode == theN1) {
nbEdges++; nbEdges++;
isClosed = true; isClosed = true;
break; break;
} }
conn = nbEdgeConnectivity(currentNode); conn = nbEdgeConnectivity(currentNode);
if(conn > 2) { if(conn > 2) {
return EXTR_PATH_NOT_EDGE; return EXTR_PATH_NOT_EDGE;
}else if( conn == 1 && nbEdges > 0 ) { }else if( conn == 1 && nbEdges > 0 ) {
//End of the path //End of the path
nbEdges++; nbEdges++;
break; break;
}else { }else {
prevNode = currentNode; prevNode = currentNode;
aItE = currentNode->GetInverseElementIterator(); aItE = currentNode->GetInverseElementIterator();
currentElem = aItE->next(); currentElem = aItE->next();
if( currentElem == prevElem) if( currentElem == prevElem)
currentElem = aItE->next(); currentElem = aItE->next();
nIt = currentElem->nodesIterator(); nIt = currentElem->nodesIterator();
prevElem = currentElem; prevElem = currentElem;
nbEdges++; nbEdges++;
} }
} }
} }