diff --git a/src/BRepFill/BRepFill_CompatibleWires.cxx b/src/BRepFill/BRepFill_CompatibleWires.cxx index 67ae17f218..bf1c6b2969 100644 --- a/src/BRepFill/BRepFill_CompatibleWires.cxx +++ b/src/BRepFill/BRepFill_CompatibleWires.cxx @@ -1155,7 +1155,24 @@ void BRepFill_CompatibleWires:: // parse candidate edges Standard_Real scal1,scal2; - if ( (V1.IsSame(VVF)&&V2.IsSame(VVL)) || (V2.IsSame(VVF)&&V1.IsSame(VVL)) ) { + + Standard_Boolean isEqual = (V1.IsSame(VVF) && V2.IsSame(VVL)) || (V2.IsSame(VVF) && V1.IsSame(VVL)); + + if (!isEqual) + { + itF = (MapVLV.FindFromKey(VF)); + itL = (MapVLV.FindFromKey(VL)); + rang = ideb - 1; + while (rang < i) { + itF.Next(); + itL.Next(); + rang++; + } + V1 = TopoDS::Vertex(itF.Value()), V2 = TopoDS::Vertex(itL.Value()); + isEqual = (V1.IsSame(VVF) && V2.IsSame(VVL)) || (V2.IsSame(VVF) && V1.IsSame(VVL)); + } + + if (isEqual) { Standard_Real U1param = BRep_Tool::Parameter(VVF,E); Standard_Real U2param = BRep_Tool::Parameter(VVL,E); BRepAdaptor_Curve CurveE(E); diff --git a/tests/bugs/modalg_7/bug24909_2 b/tests/bugs/modalg_7/bug24909_2 index 26bfc46219..fa96f85f34 100644 --- a/tests/bugs/modalg_7/bug24909_2 +++ b/tests/bugs/modalg_7/bug24909_2 @@ -3,8 +3,6 @@ puts "0024909: Modeling Algorithms - SIGSEGV in buildsweep" puts "========" puts "" -puts "REQUIRED All: Standard_ConstructionError: BRepFill :: profiles are inconsistent" - pload MODELING restore [locate_data_file bug24909_BezCurve.brep] BezCurve ttranslate BezCurve 0 -8 0 @@ -24,6 +22,5 @@ wire Circle001 Circle001-edge trotate Circle001 0 0 0 0.577350269189625731 0.577350269189625731 0.577350269189625731 120 ttranslate Circle001 0 -71 203.5 addsweep Circle001 - -catch { buildsweep Sweep001 -C -S } message +buildsweep Sweep001 -C -S