// also we have to fill myNLinkNodeMap
myCreateQuadratic = true;
mySeamShapeIds.clear();
+ myDegenShapeIds.clear();
TopAbs_ShapeEnum subType( aSh.ShapeType()==TopAbs_FACE ? TopAbs_EDGE : TopAbs_FACE );
SMDSAbs_ElementType elemType( subType==TopAbs_FACE ? SMDSAbs_Face : SMDSAbs_Edge );
myShape = aSh;
mySeamShapeIds.clear();
+ myDegenShapeIds.clear();
if ( myShape.IsNull() ) {
myShapeID = -1;
BRepAdaptor_Surface surface( face );
if ( surface.IsUPeriodic() || surface.IsVPeriodic() )
{
- // look for a seam edge
- for ( TopExp_Explorer exp( face, TopAbs_EDGE ); exp.More(); exp.Next()) {
+ for ( TopExp_Explorer exp( face, TopAbs_EDGE ); exp.More(); exp.Next())
+ {
+ // look for a seam edge
const TopoDS_Edge& edge = TopoDS::Edge( exp.Current() );
if ( BRep_Tool::IsClosed( edge, face )) {
// initialize myPar1, myPar2 and myParIndex
}
}
// store shapes indices
- mySeamShapeIds.insert( meshDS->ShapeToIndex( exp.Current() ));
- for ( TopExp_Explorer v( exp.Current(), TopAbs_VERTEX ); v.More(); v.Next() )
+ mySeamShapeIds.insert( meshDS->ShapeToIndex( edge ));
+ for ( TopExp_Explorer v( edge, TopAbs_VERTEX ); v.More(); v.Next() )
mySeamShapeIds.insert( meshDS->ShapeToIndex( v.Current() ));
}
+
+ // look for a degenerated edge
+ if ( BRep_Tool::Degenerated( edge )) {
+ myDegenShapeIds.insert( meshDS->ShapeToIndex( edge ));
+ for ( TopExp_Explorer v( edge, TopAbs_VERTEX ); v.More(); v.Next() )
+ myDegenShapeIds.insert( meshDS->ShapeToIndex( v.Current() ));
+ }
}
}
}
*/
bool GetNodeUVneedInFaceNode(const TopoDS_Face& F = TopoDS_Face()) const;
+ /*!
+ * \brief Check if shape is a degenerated edge or it's vertex
+ * \param subShape - edge or vertex index in SMESHDS
+ * \retval bool - true if subShape is a degenerated shape
+ *
+ * It works only if IsQuadraticSubMesh() or SetSubShape() has been called
+ */
+ bool IsDegenShape(const int subShape) const
+ { return myDegenShapeIds.find( subShape ) != myDegenShapeIds.end(); }
/*!
* \brief Check if shape is a seam edge or it's vertex
* \param subShape - edge or vertex index in SMESHDS
// Forbiden copy constructor
SMESH_MesherHelper (const SMESH_MesherHelper& theOther) {};
- // special map for using during creation quadratic faces
+ // special map for using during creation of quadratic elements
NLinkNodeMap myNLinkNodeMap;
+ std::set< int > myDegenShapeIds;
std::set< int > mySeamShapeIds;
double myPar1, myPar2; // bounds of a closed periodic surface
int myParIndex; // bounds' index (1-U, 2-V)