MantisBT - Open CASCADE
View Issue Details
0028403Open CASCADE[OCCT] OCCT:Codingpublic2017-01-29 22:342017-09-29 16:28
abv 
apn 
lowminor 
closedfixed 
 
[OCCT] 7.2.0[OCCT] 7.2.0 
Not needed
0028403: Avoid useless calls to BRepTools::Write()
There are several places where BRepTools::Write is called without any need -- either debug dumps to hard-coded paths, or just unused code. This is to be cleaned.
N/A
No tags attached.
related to 0028362closed bugmaster Documentation - Doxygen warnings 
Issue History
2017-01-29 22:34abvNew Issue
2017-01-29 22:34abvAssigned To => kgv
2017-01-29 23:29gitNote Added: 0063167
2017-01-29 23:29abvNote Added: 0063168
2017-01-29 23:29abvStatusnew => resolved
2017-01-29 23:29abvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15954#r15954
2017-01-30 10:25kgvNote Added: 0063175
2017-01-30 10:25kgvAssigned Tokgv => abv
2017-01-30 10:25kgvStatusresolved => assigned
2017-01-30 22:06gitNote Added: 0063232
2017-01-30 22:22abvNote Added: 0063233
2017-01-30 22:22abvAssigned Toabv => kgv
2017-01-30 22:22abvStatusassigned => resolved
2017-01-30 22:34kgvNote Added: 0063234
2017-01-30 22:34kgvAssigned Tokgv => bugmaster
2017-01-30 22:34kgvPrioritynormal => low
2017-01-30 22:34kgvStatusresolved => reviewed
2017-01-31 11:45mkvAssigned Tobugmaster => mkv
2017-02-01 14:48mkvNote Added: 0063294
2017-02-01 14:49mkvNote Added: 0063295
2017-02-01 14:49mkvAssigned Tomkv => abv
2017-02-01 14:49mkvStatusreviewed => assigned
2017-02-01 14:49mkvTest case number => Not needed
2017-02-01 16:50gitNote Added: 0063304
2017-02-01 16:50abvNote Added: 0063305
2017-02-01 16:50abvAssigned Toabv => kgv
2017-02-01 16:50abvStatusassigned => resolved
2017-02-01 16:51abvAssigned Tokgv => mkv
2017-02-01 16:51abvStatusresolved => reviewed
2017-02-02 11:45mkvNote Added: 0063341
2017-02-02 11:45mkvNote Added: 0063342
2017-02-02 11:45mkvAssigned Tomkv => bugmaster
2017-02-02 11:45mkvStatusreviewed => tested
2017-02-03 16:52apnChangeset attached => occt master b0d96eb7
2017-02-03 16:52apnAssigned Tobugmaster => apn
2017-02-03 16:52apnStatustested => verified
2017-02-03 16:52apnResolutionopen => fixed
2017-02-08 11:36gitNote Added: 0063632
2017-06-20 23:32abvRelationship addedrelated to 0028362
2017-09-29 16:18aivFixed in Version => 7.2.0
2017-09-29 16:28aivStatusverified => closed

Notes
(0063167)
git   
2017-01-29 23:29   
Branch CR28403 has been created by abv.

SHA-1: c38f2b7e41371f451cad487068a15e6213d805c0


Detailed log of new commits:

Author: abv
Date: Sat Jan 28 12:27:16 2017 +0300

    0028403: Avoid useless calls to BRepTools::Write()
    
    Useless writes of intermediate shapes to hardcoded paths are removed in samples\mfc\standard\02_Modeling\src\ModelingDoc.cpp
    
    Methods IGESBRep::WriteShape(), XSControl_Utils::WriteShape() are deleted; BRepTools::Write() can be used instead.
    Method TopOpeBRepBuild_Tools::DumpMapOfShapeWithState() is moved to where it is used -- TopOpeBRepBuild_Builder1_1.cxx as static function (commented out).
    
    Unused DRAW command OCC18612 is removed.
    
    Upgrade Guide is corrected to avoid Doxygen warnings.
(0063168)
abv   
2017-01-29 23:29   
Fix pushed to CR28403, please review
(0063175)
kgv   
2017-01-30 10:25   
-       BRepTools::Write(R,"E:\\temp\\R");
+//     BRepTools::Write(R,"E:\\temp\\R");

> Useless writes of intermediate shapes to hardcoded paths
> are removed in samples\mfc\standard\02_Modeling\src\ModelingDoc.cpp
The commit description is incorrect - please remove these debug shape dumps completely.

> Upgrade Guide is corrected to avoid Doxygen warnings.
Please quote doxygen warnings within bug description.
(0063232)
git   
2017-01-30 22:06   
Branch CR28403 has been updated forcibly by abv.

SHA-1: a1c93ac5be929de4e36f216bc0d06e2fc3f3f248
(0063233)
abv   
2017-01-30 22:22   
> please remove these debug shape dumps completely.

Here you are

> Please quote doxygen warnings within bug description.

I wounder why do you need it? But no problem:

\\D:/ABV/OCCT/occt/dox/dev_guides/upgrade/upgrade.md:\967:\warning: explicit link request to 'SelectionMode()' could not be resolved\
\\D:/ABV/OCCT/occt/dox/dev_guides/upgrade/upgrade.md:\1143:\warning: explicit link request to 'DefaultColor()' could not be resolved\
\\D:/ABV/OCCT/occt/dox/dev_guides/upgrade/upgrade.md:\1143:\warning: explicit link request to 'WasCurrentTouched()' could not be resolved\
\\D:/ABV/OCCT/occt/dox/dev_guides/upgrade/upgrade.md:\1143:\warning: explicit link request to 'ZDetection()' could not be resolved\
\\D:/ABV/OCCT/occt/dox/dev_guides/upgrade/upgrade.md:\1193:\warning: explicit link request to 'DynamicHilightAttributes()' could not be resolved\
\\D:/ABV/OCCT/occt/dox/dev_guides/upgrade/upgrade.md:\1193:\warning: explicit link request to 'HilightAttributes()' could not be resolved\
(0063234)
kgv   
2017-01-30 22:34   
Please test the patch.
(0063294)
mkv   
2017-02-01 14:48   
Dear BugMaster,
Branch CR28403 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: a1c93ac5be929de4e36f216bc0d06e2fc3f3f248

Number of compiler warnings:

occt component :
Linux: 2 (0 on master)
Windows: 1 (0 on master)
MacOS : 2 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1143

There are new additional compilation warnings on Linux, Windows and MacOS platforms:

http://jenkins-test-07.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_13912/job/CR28403-master-OCCT-Debian70-64-opt-compile/1/warnings17Result/ [^]
TopOpeBRepBuild_Builder1_1.cxx:206, GNU C Compiler 4 (gcc), Priority: Normal
"/*" within comment [-Wcomment]
XSDRAW_Commands.hxx:16, GNU C Compiler 4 (gcc), Priority: Normal
'TCollection_AsciiString XSDRAW_CommandPart(Standard_Integer, const char**, Standard_Integer)' defined but not used [-Wunused-function]

http://jenkins-test-07.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_13912/job/CR28403-master-OCCT-MacOS-opt-compile/1/warnings7Result/ [^]
TopOpeBRepBuild_Builder1_1.cxx:206, Clang (LLVM based), Priority: Normal
'/*' within block comment
XSDRAW_Commands.hxx:16, Clang (LLVM based), Priority: Normal
unused function 'XSDRAW_CommandPart'

http://jenkins-test-07.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_13912/job/CR28403-master-OCCT-Windows-64-VC10-opt-compile/1/warnings34Result/ [^]
XSDRAW_Commands.hxx:17, MSBuild, Priority: Normal
'XSDRAW_CommandPart' : unreferenced local function has been removed

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 92293097 / 92311719 [-0.02%]
Total CPU difference: 19945.92000000015 / 19914.260000000217 [+0.16%]
products component :
Total MEMORY difference: 31521251 / 31477908 [+0.14%]
Total CPU difference: 5602.299999999991 / 5544.959999999981 [+1.03%]

Testing on Windows:
occt component :
Total MEMORY difference: 57586818 / 57618048 [-0.05%]
Total CPU difference: 18726.56284129856 / 18683.178963198647 [+0.23%]
products component :
Total MEMORY difference: 22659004 / 22621210 [+0.17%]
Total CPU difference: 5613.4775835999835 / 5570.546108399986 [+0.77%]

There are no differences in images found by testdiff.
(0063295)
mkv   
2017-02-01 14:49   
Dear abv,
Branch CR28403 has been rejected due to:
- additional warnings
(0063304)
git   
2017-02-01 16:50   
Branch CR28403 has been updated by abv.

SHA-1: 4a7dba5789d56d8fad20794034c0c7111695c8eb


Detailed log of new commits:

Author: abv
Date: Wed Feb 1 16:50:11 2017 +0300

    // avoid compiler warnings

(0063305)
abv   
2017-02-01 16:50   
Warnings are fixed, please check compilation only
(0063341)
mkv   
2017-02-02 11:45   
Dear BugMaster,
Branch CR28403 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 4a7dba5789d56d8fad20794034c0c7111695c8eb

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1131
(0063342)
mkv   
2017-02-02 11:45   
Dear BugMaster,
Branch CR28403 is TESTED.
(0063632)
git   
2017-02-08 11:36   
Branch CR28403 has been deleted by kgv.

SHA-1: 4a7dba5789d56d8fad20794034c0c7111695c8eb