MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025374Community[OCCT] OCCT:Foundation Classespublic2014-10-14 21:512014-11-12 09:53
ReporterRoman Lygin 
Assigned Tobugmaster 
PrioritynormalSeveritymajor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.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
Attached Files

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

-  Notes
(0033092)
Roman Lygin (developer)
2014-10-15 08:18

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.
(0033176)
Roman Lygin (developer)
2014-10-15 21:41

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.
(0033180)
git (administrator)
2014-10-16 10:28

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.
(0033181)
nbv (developer)
2014-10-16 10:30

Dear Andrey!

Please review branch CR25374.
(0033223)
git (administrator)
2014-10-16 16:32

Branch CR25374 has been updated forcibly by nbv.

SHA-1: fbf9de586e9b248c9304d657493f26fd35ed6722
(0033224)
nbv (developer)
2014-10-16 16:34

Dear Andrey!

Please review CR25374 branch again.
(0033228)
abv (manager)
2014-10-16 17:15

No remarks, please test
(0033294)
git (administrator)
2014-10-17 20:04

Branch CR25374 has been updated forcibly by apv.

SHA-1: fb4e986b46699e6d82043890ba66be89dd1bc60d
(0033590)
apv (tester)
2014-10-22 18:46
edited on: 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)

(0033609)
nbv (developer)
2014-10-23 11:11
edited on: 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.

(0033654)
git (administrator)
2014-10-23 17:19

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

(0033655)
apv (tester)
2014-10-23 17:20

Test-cases are updated.
(0033659)
abv (manager)
2014-10-23 18:30

Note that update of DE test cases for this issue mostly reverts changes made in 0025194
(0033666)
nbv (developer)
2014-10-24 09:20
edited on: 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).

(0034322)
git (administrator)
2014-11-12 09:53

Branch CR25374 has been deleted by inv.

SHA-1: ab19adad9d45d5d5047a2ede5a2f77d9c31189d1

- Related Changesets
occt: master 9256a43d
Timestamp: 2014-10-23 14:02:23
Author: 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
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 View Revisions
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 View Revisions
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 View Revisions
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 user533 Fixed in Version => 6.8.0
2014-11-11 13:02 user533 Status verified => closed
2014-11-12 09:53 git Note Added: 0034322


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker