0031066: Infinite loop in ShapeUpgrade_UnifySameDomain
authorjgv <jgv@opencascade.com>
Mon, 14 Oct 2019 13:54:13 +0000 (16:54 +0300)
committerapn <apn@opencascade.com>
Tue, 22 Oct 2019 12:15:47 +0000 (15:15 +0300)
Modification in local static method TransformPCurves - compute real U And V bounds of a face and use them in further computations.

src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx
tests/bugs/modalg_7/bug31066 [new file with mode: 0644]

index 010386c..cf9cb3f 100644 (file)
@@ -601,7 +601,7 @@ static void TransformPCurves(const TopoDS_Face& theRefFace,
                              const TopoDS_Face& theFace,
                              TopTools_MapOfShape& theMapEdgesWithTemporaryPCurves)
 {
-  BRepAdaptor_Surface BAsurf(theFace, Standard_False);
+  BRepAdaptor_Surface BAsurf(theFace, Standard_True); //with real bounds of face
 
   Standard_Real Uperiod = 0., Vperiod = 0.;
   Handle(Geom_Surface) RefSurf = BRep_Tool::Surface(theRefFace);
diff --git a/tests/bugs/modalg_7/bug31066 b/tests/bugs/modalg_7/bug31066
new file mode 100644 (file)
index 0000000..8330ff1
--- /dev/null
@@ -0,0 +1,22 @@
+puts "======================================================="
+puts "OCC31066: Infinite loop in ShapeUpgrade_UnifySameDomain"
+puts "======================================================="
+puts ""
+
+pload MODELING DATAEXCHANGE
+
+stepread [locate_data_file bug31066.stp] a *
+
+unifysamedom result a_1
+
+checkshape result
+
+checknbshapes result -solid 1 -shell 1 -face 140 -wire 174 -edge 352 -vertex 208
+
+set tolres [checkmaxtol result]
+
+if { ${tolres} > 0.001} {
+   puts "Error: bad tolerance of result"
+}
+
+checkprops result -v 139105