+ // nb of present nodes must be different in cases of 1 and 2 straight edges
+
+ TopoDS_Vertex VV[2];
+ TopExp::Vertices( linEdge, VV[0], VV[1]);
+ const gp_Pnt* points[] = { &p1, &p2 };
+ gp_Pnt vPoints[] = { BRep_Tool::Pnt(VV[0]), BRep_Tool::Pnt(VV[1]) };
+ const double tol[] = { BRep_Tool::Tolerance(VV[0]), BRep_Tool::Tolerance(VV[1]) };
+ bool pointsAreOnVertices = true;
+ for ( int iP = 0; iP < 2 && pointsAreOnVertices; ++iP )
+ pointsAreOnVertices = ( points[iP]->Distance( vPoints[0] ) < tol[0] ||
+ points[iP]->Distance( vPoints[1] ) < tol[1] );
+
+ int nbNodes = nodeParams.size() - 2; // 2 straight edges
+ if ( !pointsAreOnVertices )
+ nbNodes = ( nodeParams.size() - 3 ) / 2; // 1 straight edge
+