DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0025954

GeomPlate_Surface::SetBounds formatting/logic mismatch

CommunityOCCT:Modeling Algorithmsclosed9 public notes

Search issues

Description

I suggest to convert the following lines

if ((Umin>Umax) || (Vmin>Vmax)) Standard_Failure::Raise("Bounds haven't the good sense");
  else
    myUmin=Umin;myUmax=Umax;myVmin=Vmin;myVmax=Vmax;
if ((Umin==Umax) || (Vmin==Vmax)) Standard_Failure::Raise("Bounds are equal");

into

if ((Umin>Umax) || (Vmin>Vmax)) Standard_Failure::Raise("Bounds haven't the good sense");
if ((Umin==Umax) || (Vmin==Vmax)) Standard_Failure::Raise("Bounds are equal");
myUmin=Umin;myUmax=Umax;myVmin=Vmin;myVmax=Vmax;

to avoid confusion.

The condition
else
   myUmin=Umin;myUmax=Umax;myVmin...

might be misleading because only the first assignment is performed in else-case.

Steps to reproduce

Not required.

Public activity

9 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Tue Mar 17 17:43:21 2015 +0100

    Corrected logic/formatting discrepancy.
02Author
Branch CR25954 pushed. Please review.
03Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
04Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
05Commenter 5
Reviewed.
I have corrected the commit message and rebased the branch on current master.
06Commenter 6
Dear BugMaster,
Branch CR25954 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]

Number of compiler warnings:

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

products component :
Linux: 11 (11 on master)
Windows: 4 (4 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 88536122 / 88602162 [-0.07%]
Total CPU difference: 53804.150000000016 / 53186.30000000024 [+1.16%]
products component :
Total MEMORY difference: 23123802 / 23198252 [-0.32%]
Total CPU difference: 15102.849999999991 / 16301.109999999973 [-7.35%]

Testing on Windows:
occt component :
Total MEMORY difference: 57427344 / 56676403 [+1.32%]
Total CPU difference: 45886.984375 / 15129.694584599707 [+203.29%]
products component :
Total MEMORY difference: 15078169 / 15023928 [+0.36%]
Total CPU difference: 15809.578125 / 5841.473045099963 [+170.64%]

There are following differences in images found by testdiff.
http://occt-tests/CR25954-master-occt-64/Windows-64-VC10/diff-Windows-64-VC10.html
IMAGE caf presentation K1: K1.png differs
IMAGE caf presentation H1: H1.png differs
IMAGE caf presentation I1: I1.png differs
IMAGE caf presentation G1: G1.png differs
IMAGE caf presentation J1: J1.png differs
07Commenter 7
Dear mkv, the changes in the pictures could not be caused by this fix, because the changed code is not called at all in these test cases. On my PC these tests give the same picture as on master.
08Commenter 8
OK.
Branch CR25954 is TESTED.
09Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]