Standard_Real Crossed = Xd.X()*Yd.Y()-Xd.Y()*Yd.X();
Standard_Real Signe = ( Crossed > 0.) ? 1. : -1.;
- if (anOffset*Signe < AC.Circle().Radius()) {
+ if (anOffset*Signe < AC.Circle().Radius() - Precision::Confusion()) {
Handle(Geom2dAdaptor_HCurve) AHC =
new Geom2dAdaptor_HCurve(G2d);
-puts "TODO ?OCC23748 ALL: An exception was caught"
-puts "TODO ?OCC23748 ALL: \\*\\* Exception "
-puts "TODO ?OCC23748 ALL: Error: Offset is not done."
-puts "TODO ?OCC23748 ALL: Faulty OCC745"
-puts "TODO ?OCC12345 ALL: Exception: result is not a topological shape!!!"
-puts "TODO ?OCC12345 ALL: TEST INCOMPLETE"
-
-pload QAcommands
-
puts "========"
puts "OCC745"
puts "========"
# Exception Standard_NullValue while performing the offset:
###########################################
+pload QAcommands
+
restore [locate_data_file OCC745_pocket1.brep] a
checkshape a
}
}
-set length 0
+set length 511.416
set 2dviewer 0
-
--- /dev/null
+puts "============"
+puts "OCC25225"
+puts "============"
+puts ""
+#######################################################################
+# Failure of 2d offset algorithm on two wires with arc
+#######################################################################
+
+restore [locate_data_file bug25225_2869_open.brep] a
+
+if [catch { mkoffset resoffset a 1 10} ] {
+ puts "Error : mkoffset is wrong"
+} else {
+ renamevar resoffset_1 result
+
+ set length 416.777
+
+ set nb_v_good 7
+ set nb_e_good 7
+ set nb_w_good 1
+ set nb_f_good 0
+ set nb_sh_good 0
+ set nb_sol_good 0
+ set nb_compsol_good 0
+ set nb_compound_good 0
+ set nb_shape_good 15
+}
+
+set 2dviewer 1
--- /dev/null
+puts "============"
+puts "OCC25225"
+puts "============"
+puts ""
+#######################################################################
+# Failure of 2d offset algorithm on two wires with arc
+#######################################################################
+
+restore [locate_data_file bug25225_2869_open.brep] a
+
+if [catch { mkoffset resoffset a 1 -10} ] {
+ puts "Error : mkoffset is wrong"
+} else {
+ renamevar resoffset_1 result
+
+ set length 416.777
+
+ set nb_v_good 7
+ set nb_e_good 7
+ set nb_w_good 1
+ set nb_f_good 0
+ set nb_sh_good 0
+ set nb_sol_good 0
+ set nb_compsol_good 0
+ set nb_compound_good 0
+ set nb_shape_good 15
+}
+
+set 2dviewer 1
--- /dev/null
+puts "============"
+puts "OCC25225"
+puts "============"
+puts ""
+#######################################################################
+# Failure of 2d offset algorithm on two wires with arc
+#######################################################################
+
+restore [locate_data_file bug25225_2869_closed.brep] a
+
+if [catch { mkoffset resoffset a 1 -10} ] {
+ puts "Error : mkoffset is wrong"
+} else {
+ renamevar resoffset_1 result
+
+ set length 192.023
+
+ set nb_v_good 3
+ set nb_e_good 3
+ set nb_w_good 1
+ set nb_f_good 0
+ set nb_sh_good 0
+ set nb_sol_good 0
+ set nb_compsol_good 0
+ set nb_compound_good 0
+ set nb_shape_good 7
+}
+
+set 2dviewer 1