eNext = nextC1Edge( eNext, aMesh, forward );
}
}
- return new StdMeshers_FaceSide( aFace, edges, &aMesh, true );
+ return new StdMeshers_FaceSide( aFace, edges, &aMesh, true, false );
}
//=============================================================================
StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
const TopoDS_Edge& theEdge,
SMESH_Mesh* theMesh,
- const bool theIsForward)
+ const bool theIsForward,
+ const bool theIgnoreMediumNodes)
{
list<TopoDS_Edge> edges(1,theEdge);
- *this = StdMeshers_FaceSide( theFace, edges, theMesh, theIsForward );
+ *this = StdMeshers_FaceSide( theFace, edges, theMesh, theIsForward, theIgnoreMediumNodes );
}
//================================================================================
StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
list<TopoDS_Edge>& theEdges,
SMESH_Mesh* theMesh,
- const bool theIsForward)
+ const bool theIsForward,
+ const bool theIgnoreMediumNodes)
{
int nbEdges = theEdges.size();
myEdge.resize( nbEdges );
myNbPonits = myNbSegments = 0;
myMesh = theMesh;
myMissingVertexNodes = false;
+ myIgnoreMediumNodes = theIgnoreMediumNodes;
if ( nbEdges == 0 ) return;
SMESHDS_Mesh* meshDS = theMesh->GetMeshDS();
if ( SMESHDS_SubMesh* sm = meshDS->MeshElements( *edge )) {
int nbN = sm->NbNodes();
- SMDS_ElemIteratorPtr elemIt = sm->GetElements();
- if ( elemIt->more() && elemIt->next()->IsQuadratic() )
- nbN -= sm->NbElements();
+ if ( theIgnoreMediumNodes ) {
+ SMDS_ElemIteratorPtr elemIt = sm->GetElements();
+ if ( elemIt->more() && elemIt->next()->IsQuadratic() )
+ nbN -= sm->NbElements();
+ }
myNbPonits += nbN;
myNbSegments += sm->NbElements();
}
double paramSize = myLast[i] - myFirst[i], r = myNormPar[i] - prevNormPar;
while ( nItr->more() ) {
const SMDS_MeshNode* node = nItr->next();
- if ( SMESH_MeshEditor::IsMedium( node, SMDSAbs_Edge ))
+ if ( myIgnoreMediumNodes && SMESH_MeshEditor::IsMedium( node, SMDSAbs_Edge ))
continue;
const SMDS_EdgePosition* epos =
static_cast<const SMDS_EdgePosition*>(node->GetPosition().get());
StdMeshers_FaceSide(const TopoDS_Face& theFace,
const TopoDS_Edge& theEdge,
SMESH_Mesh* theMesh,
- const bool theIsForward);
+ const bool theIsForward,
+ const bool theIgnoreMediumNodes);
/*!
* \brief Wrap several edges. Edges must be properly ordered and oriented.
*/
StdMeshers_FaceSide(const TopoDS_Face& theFace,
list<TopoDS_Edge>& theEdges,
SMESH_Mesh* theMesh,
- const bool theIsForward);
+ const bool theIsForward,
+ const bool theIgnoreMediumNodes);
/*!
* \brief Change orientation of side geometry
*/
vector<uvPtStruct> myPoints, myFalsePoints;
vector<TopoDS_Edge> myEdge;
vector<Handle(Geom2d_Curve)> myC2d;
- vector<double> myFirst;
- vector<double> myLast;
+ vector<double> myFirst, myLast;
vector<double> myNormPar;
double myLength;
int myNbPonits, myNbSegments;
SMESH_Mesh* myMesh;
- bool myMissingVertexNodes;
+ bool myMissingVertexNodes, myIgnoreMediumNodes;
};
MESSAGE("StdMeshers_MEFISTO_2D::Compute");
TopoDS_Face F = TopoDS::Face(aShape.Oriented(TopAbs_FORWARD));
+ const bool ignoreMediumNodes = _quadraticMesh;
// get all edges of a face
TopoDS_Vertex V1;
return false;
}
}
- StdMeshers_FaceSide* wire = new StdMeshers_FaceSide( F, wireEdges, &aMesh, true );
+ StdMeshers_FaceSide* wire = new StdMeshers_FaceSide( F, wireEdges, &aMesh,
+ true, ignoreMediumNodes);
wires[ iW ] = StdMeshers_FaceSidePtr( wire );
if (_hypLengthFromEdges && wire->NbSegments() )
_edgeLength += wire->Length() / wire->NbSegments();
Unexpect aCatch(SalomeException);
const TopoDS_Face & F = TopoDS::Face(aShape);
+ const bool ignoreMediumNodes = _quadraticMesh;
// verify 1 wire only, with 4 edges
TopoDS_Vertex V;
list< TopoDS_Edge >::iterator edgeIt = edges.begin();
if ( nbEdgesInWire.front() == 4 ) { // exactly 4 edges
for ( ; edgeIt != edges.end(); ++edgeIt, nbSides++ )
- quad->side[nbSides] = new StdMeshers_FaceSide(F,*edgeIt,&aMesh,nbSides<TOP_SIDE);
+ quad->side[nbSides] = new StdMeshers_FaceSide(F, *edgeIt, &aMesh,
+ nbSides<TOP_SIDE, ignoreMediumNodes);
}
- else if ( nbEdgesInWire.front() > 4 ) { // more than 4 edges - try to unite
+ else if ( nbEdgesInWire.front() > 4 ) { // more than 4 edges - try to unite some
list< TopoDS_Edge > sideEdges;
while ( edgeIt != edges.end()) {
sideEdges.clear();
if ( sameSide )
sideEdges.push_back( *edgeIt++ );
}
- quad->side[nbSides] = new StdMeshers_FaceSide(F,sideEdges,&aMesh,nbSides<TOP_SIDE);
+ quad->side[nbSides] = new StdMeshers_FaceSide(F, sideEdges, &aMesh,
+ nbSides<TOP_SIDE, ignoreMediumNodes);
++nbSides;
}
}