0028442: Incorrect result of 3D offset operation in mode Complete, Join type - Inters...
[occt.git] / tests / offset / shape_type_i_c / YB3
diff --git a/tests/offset/shape_type_i_c/YB3 b/tests/offset/shape_type_i_c/YB3
new file mode 100644 (file)
index 0000000..d0b3cfe
--- /dev/null
@@ -0,0 +1,28 @@
+restore [locate_data_file bug28442_simple.brep] s
+
+offsetparameter 1e-7 c i r
+offsetload s 0
+
+foreach f [explode s f] {
+  mksurface surf $f
+  set found [regexp {Axis   :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]
+  if {$found == 0} {
+    continue
+  }
+  # reverse normal direction for faces with orientation REVERSED  
+  if {[regexp {REVERSED} [whatis $f]]} {
+    set z [expr -1*$z]
+  }
+  # set offset value for top faces only
+  if {abs($z - 1) < 1.e-7 } {
+    offsetonface $f 1.3
+  }
+}
+offsetperform result
+
+checkprops result -v 524.605 -s 649.688
+
+unifysamedom result_unif result
+checknbshapes result_unif -face 17 -shell 1
+
+checkview -display result_unif -2d -path ${imagedir}/${test_image}.png