Corrected command dump to show flag Locked for shapes in DRAW.
Test case for issue CR28204
Updated test case.
OS << "\nDump of " << nbShapes << " TShapes";
OS << "\n\n-----------------\n\n";
- OS << "Flags : Free, Modified, Checked, Orientable, Closed, Infinite, Convex";
+ OS << "Flags : Free, Modified, Checked, Orientable, Closed, Infinite, Convex, Locked";
OS << "\n\n";
for (i = nbShapes; i >= 1; i--) {
OS << (S.Closed() ? 1 : 0);
OS << (S.Infinite() ? 1 : 0);
OS << (S.Convex() ? 1 : 0);
+ OS << (S.Locked() ? 1 : 0);
OS << " " << (void*) &(*S.TShape()) <<"\n";
// sub-shapes
puts $x
puts $y
puts $z
-
- set percent_max 0.1
-
- set x [lindex ${DumpList} 37]
- set y [lindex ${DumpList} 38]
- set z [lindex ${DumpList} 39]
-
- set x [string range ${x} 0 end-1]
- set y [string range ${y} 0 end-1]
set good_x -32.3042674857046
set good_y 20.0000000000001
set good_z 0.
- set Percent_x [expr abs(${x} - ${good_x}) / abs(${good_x}) * 100.]
- set Percent_y [expr abs(${y} - ${good_y}) / abs(${good_y}) * 100.]
- if {${z} == 0.} {
- set Percent_z 0.
- } else {
- set Percent_z [expr abs(${good_z} - ${z}) / abs(${z}) * 100.]
- }
-
- if {${Percent_x} > ${percent_max}} {
- puts "Faulty ${BugNumber}: bad value of x = ${x}"
- }
- if {${Percent_y} > ${percent_max}} {
- puts "Faulty ${BugNumber}: bad value of y = ${y}"
- }
- if {${Percent_z} > ${percent_max}} {
- puts "Faulty ${BugNumber}: bad value of z = ${z}"
+ checkreal "x" ${x} ${good_x} 0 0.001
+ checkreal "y" ${y} ${good_y} 0 0.001
+ if { ${z} != 0. } {
+ checkreal "z" ${z} ${good_z} 0 0.001
}
}
--- /dev/null
+puts "============"
+puts "CR28204"
+puts "==========="
+puts ""
+###############################################################################
+# TopoTools_ShapeSet::Dump() does not show flag Locked
+###############################################################################
+
+vertex v 0 0 0
+setflags v locked
+set info [dump v]
+
+if { [regexp {Locked} ${info}] == 1 } {
+ puts "OK: Dump show flag Locked"
+} else {
+ puts "Error: Dump does not show flag Locked"
+}