1. Fixed tests bugs caf bug350 and bug352 failing in Debug mode due to errors in QA code (removing items from the map during iteration).
2. Debug output messages are ignored in parse.rules in heal and bugs group to avoid false failures in Debug mode after changes made for #23609 and last integration of new tests.
3. Test bugs moddata buc60654 removed as duplicate of bug143.
4. Test bugs moddata bug143 fixed to compare real values properly. New command checkreal added for comparing reals with tolerance.
6. Test bugs caf bug114 is fixed to avoid use of OS-specific commands (command meminfo is used instead). Command checktrend is used to check for possible memory leak.
Standard_Boolean aC0 = Standard_False;
TopoDS_Shape anEdge1 = anEx.Current();
if (edgeNaborFaces.IsBound(anEdge1)) {
+ TopTools_ListOfShape aEdgesToRemove; // record items to be removed from the map (should be done after iteration)
+ aEdgesToRemove.Append (anEdge1);
const TopTools_ListOfShape& aList1 = edgeNaborFaces.Find(anEdge1);
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itr(edgeNaborFaces);
for (; itr.More(); itr.Next()) {
aC0=Standard_True;
TNaming_Builder bC0Edge(Tagger->NewChild());
bC0Edge.Generated(anEdge2);
- edgeNaborFaces.UnBind(anEdge2);
+ aEdgesToRemove.Append (anEdge2);
}
}
}
- edgeNaborFaces.UnBind(anEdge1);
+ // remove items from the data map
+ for(TopTools_ListIteratorOfListOfShape anIt(aEdgesToRemove); anIt.More(); anIt.Next())
+ edgeNaborFaces.UnBind(anIt.Value());
}
if (aC0) {
TNaming_Builder bC0Edge(Tagger->NewChild());
}
}
- anIter.Initialize(myMapModif);
TopTools_MapOfShape aComVerMap;
TopTools_MapOfShape aLocVerMap;
anExp1.Init(myS2, TopAbs_VERTEX);
for(; anExp1.More(); anExp1.Next()) aComVerMap.Add(anExp1.Current());
+ TopTools_ListOfShape aShapesToRemove; // record items to be removed from the map (should be done after iteration)
+ anIter.Initialize(myMapModif);
for(; anIter.More(); anIter.Next()) {
const TopoDS_Shape& aS = anIter.Key();
if(aS.ShapeType() == TopAbs_EDGE) {
myMapModif(aS).Remove(anI1);
}
else {
- myMapModif.UnBind(aS);
+ aShapesToRemove.Append (aS);
}
}
}
if(!anI1.More()) break;
}
}
-
-// if(anIter.Value().Extent() == 0) myMapModif.UnBind(aS);
-
}
+ // remove items from the data map
+ for(TopTools_ListIteratorOfListOfShape anIt(aShapesToRemove); anIt.More(); anIt.Next())
+ myMapModif.UnBind(anIt.Value());
+
// Deleted vertices
anExp1.Init(myShape, TopAbs_VERTEX);
for(; anExp1.More(); anExp1.Next()) {
set test_image photo
}
+# Procedure to check equality of two reals with tolerance (relative and absolute)
+proc checkreal {name value expected tol_abs tol_rel} {
+ if { abs ($value - $expected) > $tol_abs + $tol_rel * abs ($expected) } {
+ puts "Error: $name = $value is not equal to expected $expected"
+ } else {
+ puts "Check of $name OK: value = $value, expected = $expected"
+ }
+ return
+}
+
# Procedure to check if sequence of values in listval follows linear trend
# adding the same delta on each step.
#
puts "OCC114"
puts "==========="
-#--------------------------------------------------------------------
-####### Setting value of memory leakage in percents of memory allocated by shape
-set percent_max 10
-puts "Max memory leakage is $percent_max%"
-####### Setting amount of iterations for computing leackage
+# Max number of iterations for computing memory leackage
set i_max 20
puts "Amount of iterations is $i_max"
-#--------------------------------------------------------------------
-
-if ![string compare $tcl_platform(platform) "windows"] {
- proc VMem { memory } {
- upvar $memory mem
- regsub "^.*PeakVirtualSize: *\(\[0-9\]*\) KB.*$" \
- [exec tlist [pid]] "\\1" mem
- }
-} else {
- proc VMem { memory } {
- upvar $memory mem
- set mem [lindex [exec ps -o vsz -p [pid]] 1]
- }
-}
NewDocument D MDTV-Standard
UndoLimit D 10
-VMem Mem0
restore [locate_data_file OCC114.brep] s
-VMem Mem1
-#puts "... The peak memory consumed: [expr $Mem1 - $Mem0] KB"
-
-set MemoryLeakage 0
+set listmem {}
for {set i 1} {${i} <= ${i_max}} {incr i} {
- OpenCommand D
- SetShape D 0:1 s
- AbortCommand D
-
- VMem Mem2
- set Delta [expr $Mem2 - $Mem1]
- set MemoryLeakage [expr $MemoryLeakage + $Delta]
-# puts " $i delta memory consumed: $Delta KB"
-}
+ OpenCommand D
+ SetShape D 0:1 s
+ AbortCommand D
-
-if { $MemoryLeakage != 0 } then {
- set percent [expr ${MemoryLeakage} / (double(${i_max}) * (${Mem1} - ${Mem0})) * 100.]
-} else {
- set percent 0
-}
-puts "Current memory leakage in percents = ${percent}"
-
-if {${percent} > ${percent_max}} {
- puts "OCC114: Error"
-} else {
- puts "OCC114: OK"
+ # check memory usage (with tolerance equal to half page size)
+ lappend listmem [expr [meminfo w] / 1024]
+ if { [checktrend $listmem 0 1 "Memory leak detected"] } {
+ puts "No memory leak, $i iterations"
+ break
+ }
}
-
-
+++ /dev/null
-puts "=================================="
-puts "BUC60654"
-puts "=================================="
-puts ""
-##########################################################
-## Raises exception in GCPnts_AbscissaPoint on a Geom2d_OffsetCurve
-##########################################################
-
-set len_ch 4.0000000000000001e+100
-
-line line_2d 0 0 1 1
-
-offset result line_2d 10 1 0
-
-set info [length $result]
-regexp {The length result is +([-0-9.+eE]+)} $info full len
-
-if { ${len} != ${len_ch} } {
- puts "Error : length is invalid"
-}
-
## Raises exception "Standard_NotImplemented3" in GCPnts_AbscissaPoint on a Geom2d_OffsetCurve
######################################################################
-set len_ch 4.0000000000000001e+100
+set len_expected 4.e100
line line_2d 0 0 1 1
offset result line_2d 10 1 0
set info [length $result]
regexp {The length result is +([-0-9.+eE]+)} $info full len
-if { ${len} != ${len_ch} } {
- puts "Error : Length is invalid"
-}
+checkreal "Length" $len $len_expected 0. 1e-10
FAILED /\bFaulty\b/ bad shape
+IGNORE /^Error [23]d = [\d.-]+/ debug output of blend command
FAILED /\bFaulty\b/ bad shape
IGNORE /Error: Number of intervals are not equal for 2d 3d. Ignored./ Debug mode message from DT_ShapeDivide
IGNORE /Warning: GeomConvert_ApproxSurface Exception: try to decrease continuity/ DEbug mode message from DT_ToBspl
-IGNORE /Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can[']t dispatch wires/ Debug mode output
\ No newline at end of file
+IGNORE /Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can[']t dispatch wires/ Debug mode output
+IGNORE /Warning: ShapeFix_WireSegment::DefineI[UV]M[ia][nx]: indexation error/ debug mode output on bad geometries
+IGNORE /error = [0-9eE.+-]+\s+spans = [0-9]+/ debug output of surface approximator
\ No newline at end of file