bool SMESH_MesherHelper::IsQuadraticSubMesh(const TopoDS_Shape& aSh)
{
SMESHDS_Mesh* meshDS = GetMesh()->GetMeshDS();
- myShapeID = meshDS->ShapeToIndex(aSh);
// we can create quadratic elements only if all elements
// created on subshapes of given shape are quadratic
// also we have to fill myNLinkNodeMap
void SMESH_MesherHelper::SetSubShape(const TopoDS_Shape& aSh)
{
+ SMESHDS_Mesh* meshDS = GetMesh()->GetMeshDS();
+
myShape = aSh;
+ myShapeID = meshDS->ShapeToIndex(aSh);
// treatment of periodic faces
if ( aSh.ShapeType() == TopAbs_FACE )
BRepAdaptor_Surface surface( face );
if ( surface.IsUPeriodic() || surface.IsVPeriodic() )
{
- SMESHDS_Mesh* meshDS = GetMesh()->GetMeshDS();
// look for a seam edge
for ( TopExp_Explorer exp( face, TopAbs_EDGE ); exp.More(); exp.Next()) {
const TopoDS_Edge& edge = TopoDS::Edge( exp.Current() );
TopoDS_Face F;
if( myShape.IsNull() )
F = TopoDS::Face(meshDS->IndexToShape(faceID));
- else
+ else {
F = TopoDS::Face(myShape);
+ faceID = myShapeID;
+ }
gp_XY p1 = GetNodeUV(F,n1,n2);
gp_XY p2 = GetNodeUV(F,n2,n1);
TopoDS_Edge E;
if( myShape.IsNull() )
E = TopoDS::Edge(meshDS->IndexToShape(edgeID));
- else
+ else {
E = TopoDS::Edge(myShape);
+ edgeID = myShapeID;
+ }
double p1 = GetNodeU(E,n1);
double p2 = GetNodeU(E,n2);