View Issue Details

IDProjectCategoryView StatusLast Update
0025374CommunityOCCT:Foundation Classespublic2014-11-12 09:53
ReporterRoman Lygin Assigned Tobugmaster  
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
Product Version6.8.0 
Target Version6.8.0Fixed in Version6.8.0 
Summary0025374: [6.8.0beta regression] gp_Trsf2d::SetMirror() looses transformation form
Descriptiongp_Trsf2d::SetMirror(gp_Ax2d) stopped retaining gp_Ax1Mirror form and started reporting gp_CompoundTrsf.

This has severe hit for us at CAD Exchanger as many algorithms rely on gp_Ax1Mirror form correctly returned.
Steps To Reproducevoid gp_Trsf2dTest::SetMirror()
{
    gp_Trsf2d aTrsf2d;
    aTrsf2d.SetMirror (gp_Ax2d (gp::Origin2d(), gp_Dir2d (1., 1.)));
    QCOMPARE(static_cast<int> (aTrsf2d.Form()), static_cast<int> (gp_Ax1Mirror));
}

TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0025194 closedbugmaster Open CASCADE It is necessary to orthogonalize transformation matrix in gp_Trsf and gp_Trsf2d classes 
related to 0025389 closedbugmaster Open CASCADE It is necessary to revise conformity between real transformation and status of gp_TrsfForm 

Activities

Roman Lygin

2014-10-15 08:18

developer   ~0033092

The regression is due to some recent commits in master. Most likely - 0025194, where SetValues() is called at the end of SetMirror() and sets the form to gp_CompoundTrsf.

Please double-check all the methods where SetValue() is now called, both in gp_Trsf2d and gp_Trsf. Adding unit tests for all those methods (e.g. as simple as the reproducer above) would be useful.

Roman Lygin

2014-10-15 21:41

developer   ~0033176

A quick fix to set shape form after calling SetValues() did the trick and restored previous behavior:

void gp_Trsf2d::SetMirror (const gp_Ax2d& A)
{
// shape = gp_Ax1Mirror; //RLN
  const gp_Dir2d& V = A.Direction ();
  const gp_Pnt2d& P = A.Location ();
  Standard_Real VX = V.X();
  Standard_Real VY = V.Y();
  Standard_Real X0 = P.X();
  Standard_Real Y0 = P.Y();

  SetValues(1.0-2.0*VX*VX, -2.0*VX*VY, -2.0*((VX * VX - 1.0)*X0 + (VX*VY*Y0)),
            -2.0*VX*VY, 1.0-2.0*VY*VY, -2.0*((VX*VY*X0)+(VY*VY-1.0)*Y0));

  shape = gp_Ax1Mirror; //RLN
  scale = - 1.0;
}

To make sure the fix is complete in other places I will refrain from pushing the fix. Instead I'd rather suggest the author of 0025194 to make another review and another commit to address this regression.

git

2014-10-16 10:28

administrator   ~0033180

Branch CR25374 has been created by nbv.

SHA-1: c8116f7ab9812fd058a9508892b42c08e070e618


Detailed log of new commits:

Author: nbv
Date: Thu Oct 16 10:27:53 2014 +0400

    0025374: [6.8.0beta regression] gp_Trsf2d::SetMirror() looses transformation form
    
    1. Method Orthogonalize is called in case of transform matrix change.
    2. gp_TrsfForms are set after SetValues(...) method calling from methods of gp_Trsf2d class.

nbv

2014-10-16 10:30

developer   ~0033181

Dear Andrey!

Please review branch CR25374.

git

2014-10-16 16:32

administrator   ~0033223

Branch CR25374 has been updated forcibly by nbv.

SHA-1: fbf9de586e9b248c9304d657493f26fd35ed6722

nbv

2014-10-16 16:34

developer   ~0033224

Dear Andrey!

Please review CR25374 branch again.

abv

2014-10-16 17:15

manager   ~0033228

No remarks, please test

git

2014-10-17 20:04

administrator   ~0033294

Branch CR25374 has been updated forcibly by apv.

SHA-1: fb4e986b46699e6d82043890ba66be89dd1bc60d

apv

2014-10-22 18:46

tester   ~0033590

Last edited: 2014-10-22 19:16

Dear BugMaster,

Branch CR25374 (and products from GIT master) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: fb4e986b46699e6d82043890ba66be89dd1bc60d

Number of compiler warnings:
occt component:
   Linux: 15 (15 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 11 (11 on master)
   Windows: 1 (1 on master)

Regressions/Differences:
http://occt-tests/CR25374-master-occt/Debian60-64/summary.html
http://occt-tests/CR25374-master-occt/Windows-32-VC10/summary.html
de iges_1(001) J9,K3
de iges_2(002) B8, E6, G1

Testing cases:
Not needed
However, necessity to create test-cases will be defined in frame of 0025389

Testing on Linux:
Total MEMORY difference: 367272704 / 367465072
Total CPU difference: 47379.94999999994 / 44339.100000000006

Testing on Windows:
Total MEMORY difference: 255002692 / 252142604
Total CPU difference: 32317.875 / 34651.0625

There are differences in images found by testdiff:
http://occt-tests/CR25374-master-occt/Debian60-64/diff-Debian60-64.html
http://occt-tests/CR25374-master-occt/Windows-32-VC10/diff-Windows-32-VC10.html
Pay attention to bugs iges bug13627 (on Windows only)

nbv

2014-10-23 11:11

developer   ~0033609

Last edited: 2014-10-23 11:12

Dear Alexei!

Please update regression tests according to their new behavior.

The bug should be TESTED.

P.S.
The solution about test case will be applied after the fix of bug 0025389 related.

git

2014-10-23 17:19

administrator   ~0033654

Branch CR25374 has been updated by apv.

SHA-1: ab19adad9d45d5d5047a2ede5a2f77d9c31189d1


Detailed log of new commits:

Author: apv
Date: Thu Oct 23 17:19:21 2014 +0400

    Update of test-cases

apv

2014-10-23 17:20

tester   ~0033655

Test-cases are updated.

abv

2014-10-23 18:30

manager   ~0033659

Note that update of DE test cases for this issue mostly reverts changes made in 0025194

nbv

2014-10-24 09:20

developer   ~0033666

Last edited: 2014-10-24 09:20

The reason of these changes was in forceful orthogonalize of transformation matrix for corresponding transformations (mirror, translation etc.).

Now these matrix are not orthogonalized because they are considered to be orthogonal. However, this condition is satisfied with some error, which are decreased after forceful orthogonalize.

P.S.

The error even in ~ 1.0e-16 results in changing in shape (it will get another structure).

git

2014-11-12 09:53

administrator   ~0034322

Branch CR25374 has been deleted by inv.

SHA-1: ab19adad9d45d5d5047a2ede5a2f77d9c31189d1

Related Changesets

occt: master 9256a43d

2014-10-23 14:02:23

nbv


Committer: bugmaster Details Diff
0025374: [6.8.0beta regression] gp_Trsf2d::SetMirror() looses transformation form

1. Elements of gp_TrsfForm have been documented
2. gp_Trsf2d class has been reverted to non-regression case.

Update of test-cases
Affected Issues
0025374
mod - src/gp/gp.cdl Diff File
mod - src/gp/gp_Trsf.cxx Diff File
mod - src/gp/gp_Trsf2d.cxx Diff File
mod - tests/de/iges_1/J9 Diff File
mod - tests/de/iges_1/K3 Diff File
mod - tests/de/iges_2/B8 Diff File
mod - tests/de/iges_2/E6 Diff File
mod - tests/de/iges_2/G1 Diff File

Issue History

Date Modified Username Field Change
2014-10-14 21:51 Roman Lygin New Issue
2014-10-14 21:51 Roman Lygin Assigned To => abv
2014-10-15 08:18 Roman Lygin Note Added: 0033092
2014-10-15 21:41 Roman Lygin Note Added: 0033176
2014-10-15 21:51 abv Assigned To abv => nbv
2014-10-15 21:51 abv Status new => assigned
2014-10-16 10:28 git Note Added: 0033180
2014-10-16 10:30 nbv Note Added: 0033181
2014-10-16 10:30 nbv Assigned To nbv => abv
2014-10-16 10:30 nbv Status assigned => resolved
2014-10-16 11:34 nbv Assigned To abv => nbv
2014-10-16 11:34 nbv Status resolved => assigned
2014-10-16 16:32 git Note Added: 0033223
2014-10-16 16:34 nbv Note Added: 0033224
2014-10-16 16:34 nbv Assigned To nbv => abv
2014-10-16 16:34 nbv Status assigned => resolved
2014-10-16 17:12 nbv Relationship added related to 0025389
2014-10-16 17:15 abv Note Added: 0033228
2014-10-16 17:15 abv Assigned To abv => bugmaster
2014-10-16 17:15 abv Status resolved => reviewed
2014-10-17 15:28 apv Assigned To bugmaster => apv
2014-10-17 20:04 git Note Added: 0033294
2014-10-22 17:50 apv Test case number => Not needed
2014-10-22 18:46 apv Note Added: 0033590
2014-10-22 18:46 apv Assigned To apv => nbv
2014-10-22 18:46 apv Status reviewed => assigned
2014-10-22 19:16 apv Note Edited: 0033590
2014-10-23 11:11 nbv Note Added: 0033609
2014-10-23 11:11 nbv Assigned To nbv => apv
2014-10-23 11:11 nbv Status assigned => feedback
2014-10-23 11:12 nbv Note Edited: 0033609
2014-10-23 17:19 git Note Added: 0033654
2014-10-23 17:20 apv Note Added: 0033655
2014-10-23 17:20 apv Assigned To apv => bugmaster
2014-10-23 17:20 apv Status feedback => tested
2014-10-23 17:57 abv Relationship added related to 0025194
2014-10-23 18:30 abv Note Added: 0033659
2014-10-24 09:20 nbv Note Added: 0033666
2014-10-24 09:20 nbv Note Edited: 0033666
2014-10-24 15:38 bugmaster Changeset attached => occt master 9256a43d
2014-10-24 15:38 bugmaster Status tested => verified
2014-10-24 15:38 bugmaster Resolution open => fixed
2014-11-11 12:43 aiv Fixed in Version => 6.8.0
2014-11-11 13:02 aiv Status verified => closed
2014-11-12 09:53 git Note Added: 0034322