MantisBT - Open CASCADE
View Issue Details
0028176Open CASCADE[OCCT] OCCT:DRAWpublic2016-11-30 11:432018-06-29 21:19
aml 
apn 
normalminor 
closedfixed 
[OCCT] 7.1.0 
[OCCT] 7.3.0[OCCT] 7.3.0 
Not needed
0028176: Draw Harness - "reshape" command usage is not properly documented
According to the "reshape" command help, it is not defined how to get the modified shape

  theCommands.Add ("reshape",
    "\n Basic utility for topological modification: "
    "\n '-replace what with' Replaces 'what' sub-shape with 'with' sub-shape"
    "\n '-remove what' Removes 'what' sub-shape"
    "\n Requests '-replace' and '-remove' can be repeated many times.",
    __FILE__, reshape, g);

According to the implementation this command should have the following syntax:
reshape resultShape shapeForModifications [-replace what with] [-remove what]

N/A
No tags attached.
Issue History
2016-11-30 11:43amlNew Issue
2016-11-30 11:43amlAssigned To => apn
2016-11-30 11:44amlDescription Updatedbug_revision_view_page.php?rev_id=15464#r15464
2016-11-30 13:24amlAssigned Toapn => ssv
2016-11-30 13:25ssvNote Added: 0060904
2016-11-30 13:25ssvStatusnew => assigned
2017-07-20 11:57msvTarget Version7.2.0 => 7.3.0
2018-01-27 11:08amlAssigned Tossv => aml
2018-01-27 11:08amlSummary"reshape" command usage is not properly documented => Draw Harness - "reshape" command usage is not properly documented
2018-01-27 11:20gitNote Added: 0073625
2018-01-27 11:24gitNote Added: 0073626
2018-01-29 07:12gitNote Added: 0073631
2018-01-29 10:46amlNote Added: 0073639
2018-01-29 10:46amlAssigned Toaml => kgv
2018-01-29 10:46amlStatusassigned => resolved
2018-01-29 10:46amlSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18527#r18527
2018-01-29 12:44kgvNote Added: 0073647
2018-01-29 12:44kgvAssigned Tokgv => aml
2018-01-29 12:44kgvStatusresolved => assigned
2018-01-29 19:02gitNote Added: 0073668
2018-01-29 21:41kgvNote Added: 0073669
2018-01-30 07:04gitNote Added: 0073670
2018-01-30 10:17amlNote Added: 0073671
2018-01-30 10:17amlAssigned Toaml => kgv
2018-01-30 10:17amlStatusassigned => resolved
2018-01-30 10:39amlNote Edited: 0073671bug_revision_view_page.php?bugnote_id=73671#r18536
2018-01-30 10:58kgvNote Added: 0073672
2018-01-30 10:58kgvAssigned Tokgv => bugmaster
2018-01-30 10:58kgvStatusresolved => reviewed
2018-01-30 11:10apnTest case number => Not needed
2018-01-30 11:10apnNote Added: 0073673
2018-01-30 11:10apnStatusreviewed => tested
2018-02-03 18:59apnChangeset attached => occt master 9b1d4e7f
2018-02-03 18:59apnAssigned Tobugmaster => apn
2018-02-03 18:59apnStatustested => verified
2018-02-03 18:59apnResolutionopen => fixed
2018-02-05 11:39gitNote Added: 0073754
2018-06-29 21:15aivFixed in Version => 7.3.0
2018-06-29 21:19aivStatusverified => closed

Notes
(0060904)
ssv   
2016-11-30 13:25   
It is also necessary to check logic of iteration. Seems like iterator starts from wrong index (1 instead of 3).
(0073625)
git   
2018-01-27 11:20   
Branch CR28176 has been created by aml.

SHA-1: 12a6641c819526b0f6b74ce73e2a1d4e673e8d9a


Detailed log of new commits:

Author: aml
Date: Sat Jan 27 11:20:27 2018 +0300

    0028176: Draw Harness - "reshape" command usage is not properly documented
    
    Help message is corrected for "reshape" command. Command implementation is corrected according OCCT coding rules.
(0073626)
git   
2018-01-27 11:24   
Branch CR28176 has been updated by aml.

SHA-1: 4ddbca037a0f86b5bdb16bf0765f53068a687e8c


Detailed log of new commits:

Author: aml
Date: Sat Jan 27 11:24:34 2018 +0300

    # Add "static" keyword before function implementation.

(0073631)
git   
2018-01-29 07:12   
Branch CR28176 has been updated forcibly by aml.

SHA-1: e9adccb58f212e2a4cf21a579432943cb333ac4b
(0073639)
aml   
2018-01-29 10:46   
Dear kgv, could you please take a look at the CR28176 branch?
Testing results: http://jenkins-test-10.nnov.opencascade.com/view/CR28176-master-AML/view/COMPARE/ [^]
(0073647)
kgv   
2018-01-29 12:44   
-        di << "Error: shape to remove ('" << a[i] << "') is null\n";

+        theDI << "Error: shape to remove ('" << theArgv[i] << "') is 
null\n";
         return 1;
...
-    di << "Error: result shape is null\n";
+    theDI << "Error: result shape is null\n";
     return 1;
...
<several occurrences>

no point for theDI due to raising Tcl exception afterwards, std::cout is enough.

+    else if ( anOpt == "-remove" )
     {
...
     }

No warning/error on passing invalid/unknown arguments ("Syntax error" is usually printed + return 1 in such cases).
(0073668)
git   
2018-01-29 19:02   
Branch CR28176 has been updated by aml.

SHA-1: 5a4e976e5aad19350df8edd0e3955d1ef0ddbc1a


Detailed log of new commits:

Author: aml
Date: Mon Jan 29 18:57:49 2018 +0300

    # Remarks correction.

(0073669)
kgv   
2018-01-29 21:41   
+      cout << "Error: invalid syntax" << endl;

This message is not helpful - it should include the argument, where error occurred, e.g.:
> std::cout << "Syntax error at '" << anArg << "'\n";

-    theDI << "Error: result shape is null\n";
+    cout << "Error: result shape is null" << endl;

endl usage is not practical in this context - \n is enough.
(0073670)
git   
2018-01-30 07:04   
Branch CR28176 has been updated by aml.

SHA-1: de2e9db81c9ec0aedf98da0dd16327c7fe53785f


Detailed log of new commits:

Author: aml
Date: Tue Jan 30 07:04:33 2018 +0300

    # Remarks correction.

(0073671)
aml   
2018-01-30 10:17   
(edited on: 2018-01-30 10:39)
Remarks are corrected. Testing results: http://jenkins-test-10.nnov.opencascade.com:8080/view/CR28176-master-AML/view/COMPARE/. [^] Could you please check?

(0073672)
kgv   
2018-01-30 10:58   
Patch looks OK.
(0073673)
apn   
2018-01-30 11:10   
Combination -
OCCT branch : CR28176 SHA - de2e9db81c9ec0aedf98da0dd16327c7fe53785f
Products branch : master SHA - 9d16afb77be76e276e46b7b3fc08eb16a4eea45e
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 18594.219999999652 / 18668.749999999738 [-0.40%]
Products
Total CPU difference: 7496.349999999997 / 7517.660000000007 [-0.28%]
Windows-64-VC10:
OCCT
Total CPU difference: 18082.091510098548 / 18085.75753359851 [-0.02%]
Products
Total CPU difference: 7978.811545899959 / 8002.554898099971 [-0.30%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0073754)
git   
2018-02-05 11:39   
Branch CR28176 has been deleted by kgv.

SHA-1: de2e9db81c9ec0aedf98da0dd16327c7fe53785f