GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertexCoordsValues & theEnforcedVertices)
{
MESSAGE("writeGMFFile w/o geometry");
- int idx, idxRequired, idxSol;
+ int idx, idxRequired = 0, idxSol;
const int dummyint = 0;
GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertexCoordsValues::const_iterator vertexIt;
std::vector<double> enfVertexSizes;
const TopoDS_Shape shapeToMesh = theMeshDS->ShapeToMesh();
int aGhs3dID = 1;
- SMDS_NodeIteratorPtr it = theMeshDS->nodesIterator();
+ SMDS_NodeIteratorPtr nodeIt = theMeshDS->nodesIterator();
const SMDS_MeshNode* node;
-//
+
// Issue 020674: EDF 870 SMESH: Mesh generated by Netgen not usable by GHS3D
// The problem is in nodes on degenerated edges, we need to skip nodes which are free
- // and replace not-free nodes on edges by the node on vertex
+ // and replace not-free nodes on degenerated edges by the node on vertex
TNodeNodeMap n2nDegen; // map a node on degenerated edge to a node on vertex
TNodeNodeMap::iterator n2nDegenIt;
if ( theHelper.HasDegeneratedEdges() )
{
-
set<int> checkedSM;
for (TopExp_Explorer e(theMeshDS->ShapeToMesh(), TopAbs_EDGE ); e.More(); e.Next())
{
}
}
}
+ nbNodes -= n2nDegen.size();
}
-
+
const bool isQuadMesh =
theHelper.GetMesh()->NbEdges( ORDER_QUADRATIC ) ||
theHelper.GetMesh()->NbFaces( ORDER_QUADRATIC ) ||
theHelper.GetMesh()->NbVolumes( ORDER_QUADRATIC );
+ if ( isQuadMesh )
+ {
+ // descrease nbNodes by nb of medium nodes
+ while ( nodeIt->more() )
+ {
+ node = nodeIt->next();
+ if ( !theHelper.IsDegenShape( node->getshapeId() ))
+ nbNodes -= int( theHelper.IsMedium( node ));
+ }
+ nodeIt = theMeshDS->nodesIterator();
+ }
-
const char* space = " ";
const int dummyint = 0;
std::cout << " " << nbEnforcedNodes << " enforced nodes" << std::endl;
std::cout << std::endl;
std::cout << "Start writing in 'points' file ..." << std::endl;
+
theFile << nbNodes << std::endl;
// Loop from 1 to NB_NODES
- while ( it->more() )
+ while ( nodeIt->more() )
{
- node = it->next();
+ node = nodeIt->next();
if ( isQuadMesh && theHelper.IsMedium( node )) // Issue 0021238
continue;
if ( n2nDegen.count( node ) ) // Issue 0020674