View Issue Details

IDProjectCategoryView StatusLast Update
0027595Open CASCADEOCCT:Meshpublic2016-12-09 16:40
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2013 
Product Version7.1.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027595: Mesh - faces without triangulations due to gp_VectorWithNullMagnitude exception
Description38 faces in attached compound (extracted from BLERIOT model) are no more triangulated by BRepMesh_FastDiscretFace in DEBUG mode (without No_Exception) due to unhanded gp_VectorWithNullMagnitude exception after #0027384 improvement.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • bad_faces.7z (255,698 bytes)

Activities

kgv

2016-06-12 16:23

developer  

bad_faces.7z (255,698 bytes)

git

2016-06-12 16:33

administrator   ~0054928

Branch CR27595 has been created by kgv.

SHA-1: cfe938a887e6ff6452d454be6ee45e0ee883f8e7


Detailed log of new commits:

Author: kgv
Date: Sun Jun 12 16:33:01 2016 +0300

    0027595: Mesh - faces without triangulations due to gp_VectorWithNullMagnitude exception
    
    Zero magnitude check has been added before gp::Vec::Angle() usage
    in BRepMesh_FastDiscretFace::insertInternalVerticesOther().

kgv

2016-06-12 16:34

developer   ~0054929

I have pushed a patch adding zero-magnitude check, but I'm not sure if it is a proper fix.

msv

2016-06-15 23:33

developer   ~0055050

I think it is better to allow to remove a point if a derivative is null, so the proposed correction is:

              if (aTmpVec.Magnitude() < gp::Resolution()
               || aPrevVec2.Magnitude() < gp::Resolution()
               || aPrevVec2.Angle (aTmpVec) < myAngle)

git

2016-06-16 15:17

administrator   ~0055080

Branch CR27595 has been updated forcibly by kgv.

SHA-1: 1ed4a18a8e013ae5470afd52d6209367f6c0dbe3

kgv

2016-06-16 15:18

developer   ~0055081

Patch has been updated following remarks.

oan

2016-06-16 16:37

developer   ~0055094

DC,

I suggest to use SquareMagnitude() in both checks to avoid computation of square root. I also propose to move check of "aPrevVec2" for null magnitude to if statement at line 953 in order to avoid redundant computations at all. For the same reasons I suggest to move check for "aTmpVec" to line 962 in order to avoid redundant call to "aIso.Value()".

git

2016-06-17 11:24

administrator   ~0055126

Branch CR27595_1 has been created by kgv.

SHA-1: df865cda50cc546979f1fe7b7eadf3d2e3015139


Detailed log of new commits:

Author: kgv
Date: Fri Jun 17 11:24:30 2016 +0300

    0027595: Mesh - faces without triangulations due to gp_VectorWithNullMagnitude exception
    
    Zero magnitude check has been added before gp::Vec::Angle() usage
    in BRepMesh_FastDiscretFace::insertInternalVerticesOther().

kgv

2016-06-17 11:25

developer   ~0055127

> For the same reasons I suggest to move check for "aTmpVec" to line 962 in order to avoid redundant call to "aIso.Value()"
I don't get this comment.

oan

2016-06-17 14:39

developer   ~0055174

Excuse me if I confused you, I have just mentioned that it is also possible to move check "aTmpVec.SquareMagnitude() < gp::Resolution()" from line 973 to line 963. This is to avoid redundant computation of point on iso line at line 965 that can also take some time.

git

2016-06-17 19:00

administrator   ~0055198

Branch CR27595_1 has been updated by oan.

SHA-1: 4fe83a9605dd8800e0cee213d42b25d084d46ffb


Detailed log of new commits:

Author: oan
Date: Fri Jun 17 19:00:02 2016 +0300

    Check of aTmpVec for null magnitude has been moved in order to avoid redundant computations.

kgv

2016-06-21 09:09

developer   ~0055276

Please test the patch.
Test case is not needed.

git

2016-06-21 18:40

administrator   ~0055319

Branch CR27595_1 has been updated forcibly by apv.

SHA-1: 3437df85e9474a8d865713f7585fec95f50917bb

apv

2016-06-21 18:40

tester   ~0055320

Branch CR27595_1 has been rebased on the current master

apv

2016-06-22 16:32

tester   ~0055346

Dear BugMaster,

Branch CR27595_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 3437df85e9474a8d865713f7585fec95f50917bb

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 68
   Windows: 0
   MacOS: 1122

Regressions/Differences:
http://occt-tests/CR27595_1-master-OCCT/Debian70-64/summary.html
http://occt-tests/CR27595_1-master-OCCT/Windows-64-VC10/summary.html
bugs moddata_1 bug22759
http://occt-tests/CR27595_1-master-Products/Debian70-64/summary.html
http://occt-tests/CR27595_1-master-Products/Windows-64-VC10/summary.html
omf advanced_meshcut Z5

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 88736313 / 89124942 [-0.44%]
Total CPU difference: 19357.73999999996 / 19406.559999999947 [-0.25%]

Testing on Windows:
Total MEMORY difference: 55856386 / 55867730 [-0.02%]
Total CPU difference: 17959.864726598862 / 18468.271985598964 [-2.75%]

apv

2016-06-22 16:33

tester   ~0055347

Dear Oleg,

Branch CR27595_1 has been rejected due to:
- regressions/differences/improvements

git

2016-06-22 18:24

administrator   ~0055352

Branch CR27595_1 has been updated forcibly by oan.

SHA-1: b3340156c4f60eb29b53a3a98a556a0f1ba32fad

oan

2016-06-22 18:24

developer   ~0055353

Please review.

msv

2016-06-23 09:55

developer   ~0055359

In your new version, there remains possibility of exception, as Angle() can be called with null vector.
Looking at regressions, I would think about updating test reference data, as the result in those tests seems to be quite good.

git

2016-06-23 14:21

administrator   ~0055377

Branch CR27595_1 has been updated forcibly by oan.

SHA-1: cd93fdd6f5ea1c77f90a465b6e55fb6e30628dc4

oan

2016-06-23 14:22

developer   ~0055378

Dear Mikhail,

yes, you are right, please review.

git

2016-06-23 14:27

administrator   ~0055379

Branch CR27595_1 has been updated forcibly by oan.

SHA-1: cc41ee19583e407dcc820a55504ed1877df1deae

msv

2016-06-23 16:40

developer   ~0055386

Reviewed.

git

2016-06-23 17:52

administrator   ~0055391

Branch CR27595_1 has been updated forcibly by mkv.

SHA-1: 97edb51d48c3bb2ab9430e2e9e2b878170c8d526

apv

2016-06-24 15:11

tester   ~0055445

Dear BugMaster,

Branch CR27595_1 from occt git-repository (and IR-2016-06-23 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 97edb51d48c3bb2ab9430e2e9e2b878170c8d526

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 1
   MacOS: 1129

Regressions/Differences:
http://occt-tests/CR27595_1-master-Products/Debian70-64/summary.html
http://occt-tests/CR27595_1-master-Products/Windows-64-VC10/summary.html
omf advanced_meshcut Z5

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 88677674 / 88670673 [+0.01%]
Total CPU difference: 19392.779999999897 / 19559.74999999992 [-0.85%]

Testing on Windows:
Total MEMORY difference: 55873684 / 55895183 [-0.04%]
Total CPU difference: 18143.056700898862 / 17842.068371498677 [+1.69%]

apv

2016-06-24 15:11

tester   ~0055446

Dear Oleg,

Branch CR27595_1 has been rejected due to:
- regressions/differences/improvements

msv

2016-06-24 15:21

developer   ~0055447

The test omf advanced_meshcut Z5 compares properties with too small tolerance. I propose to change 4e-9 to 4e-6:

check_mesh result 15682.325756334887 384.31340440240052 4e-6

oan

2016-06-24 16:46

developer   ~0055453

Dear Alexey,

could you please modify "omf advanced_meshcut Z5" according to remark given above.

TIA

apv

2016-06-24 17:47

tester   ~0055468

Branch CR27595 has been created in products git-repository

apv

2016-06-24 17:48

tester   ~0055469

Dear Sergey,

Please, validate modification of test case in branch CR27595 from products git-repository.

szv

2016-06-28 10:13

manager   ~0055520

The modification of tests in the branch CR27595 is acceptable, please proceed.

mkv

2016-06-28 17:25

tester   ~0055552

Dear BugMaster,
following test case was retested
omf advanced_meshcut Z5
Now it is OK.

mkv

2016-06-28 17:25

tester   ~0055553

Dear BugMaster,
Branches CR27595_1 and CR27595 are TESTED.

git

2016-07-22 10:45

administrator   ~0056131

Branch CR27595_1 has been deleted by inv.

SHA-1: 97edb51d48c3bb2ab9430e2e9e2b878170c8d526

git

2016-07-22 10:45

administrator   ~0056136

Branch CR27595 has been deleted by inv.

SHA-1: 1ed4a18a8e013ae5470afd52d6209367f6c0dbe3

Related Changesets

occt: master 782467fd

2016-06-22 15:20:15

oan


Committer: bugmaster Details Diff
0027595: Mesh - faces without triangulations due to gp_VectorWithNullMagnitude exception

Zero magnitude check has been added before gp::Vec::Angle() usage
Affected Issues
0027595
mod - src/BRepMesh/BRepMesh_FastDiscretFace.cxx Diff File
mod - tests/bugs/moddata_1/bug22759 Diff File

Issue History

Date Modified Username Field Change
2016-06-12 16:23 kgv New Issue
2016-06-12 16:23 kgv Assigned To => oan
2016-06-12 16:23 kgv File Added: bad_faces.7z
2016-06-12 16:33 git Note Added: 0054928
2016-06-12 16:34 kgv Note Added: 0054929
2016-06-12 16:34 kgv Assigned To oan => msv
2016-06-12 16:34 kgv Status new => assigned
2016-06-12 16:48 kgv Description Updated
2016-06-14 08:48 kgv Assigned To msv => oan
2016-06-15 23:33 msv Note Added: 0055050
2016-06-16 15:17 git Note Added: 0055080
2016-06-16 15:18 kgv Note Added: 0055081
2016-06-16 15:18 kgv Status assigned => resolved
2016-06-16 16:37 oan Note Added: 0055094
2016-06-16 16:37 oan Assigned To oan => kgv
2016-06-16 16:37 oan Status resolved => assigned
2016-06-17 11:24 git Note Added: 0055126
2016-06-17 11:25 kgv Note Added: 0055127
2016-06-17 11:25 kgv Assigned To kgv => oan
2016-06-17 14:39 oan Note Added: 0055174
2016-06-17 14:39 oan Assigned To oan => kgv
2016-06-17 14:39 oan Status assigned => feedback
2016-06-17 14:50 kgv Assigned To kgv => oan
2016-06-17 14:50 kgv Status feedback => assigned
2016-06-17 19:00 git Note Added: 0055198
2016-06-17 19:00 oan Assigned To oan => kgv
2016-06-17 19:00 oan Status assigned => feedback
2016-06-21 09:09 kgv Note Added: 0055276
2016-06-21 09:09 kgv Assigned To kgv => bugmaster
2016-06-21 09:09 kgv Status feedback => reviewed
2016-06-21 09:09 kgv Steps to Reproduce Updated
2016-06-21 11:43 apv Assigned To bugmaster => apv
2016-06-21 18:40 git Note Added: 0055319
2016-06-21 18:40 apv Note Added: 0055320
2016-06-22 14:32 apv Test case number => Not needed
2016-06-22 16:32 apv Note Added: 0055346
2016-06-22 16:32 apv Assigned To apv => oan
2016-06-22 16:32 apv Status reviewed => assigned
2016-06-22 16:33 apv Note Added: 0055347
2016-06-22 18:24 git Note Added: 0055352
2016-06-22 18:24 oan Note Added: 0055353
2016-06-22 18:24 oan Assigned To oan => msv
2016-06-22 18:24 oan Status assigned => resolved
2016-06-23 09:55 msv Note Added: 0055359
2016-06-23 09:55 msv Assigned To msv => oan
2016-06-23 09:55 msv Status resolved => assigned
2016-06-23 14:21 git Note Added: 0055377
2016-06-23 14:22 oan Note Added: 0055378
2016-06-23 14:22 oan Assigned To oan => msv
2016-06-23 14:22 oan Status assigned => resolved
2016-06-23 14:27 git Note Added: 0055379
2016-06-23 16:14 oan Severity minor => major
2016-06-23 16:40 msv Note Added: 0055386
2016-06-23 16:40 msv Assigned To msv => bugmaster
2016-06-23 16:40 msv Status resolved => reviewed
2016-06-23 17:13 mkv Assigned To bugmaster => apv
2016-06-23 17:52 git Note Added: 0055391
2016-06-24 15:11 apv Note Added: 0055445
2016-06-24 15:11 apv Assigned To apv => oan
2016-06-24 15:11 apv Status reviewed => assigned
2016-06-24 15:11 apv Note Added: 0055446
2016-06-24 15:21 msv Note Added: 0055447
2016-06-24 16:46 oan Note Added: 0055453
2016-06-24 16:46 oan Assigned To oan => apv
2016-06-24 16:46 oan Status assigned => feedback
2016-06-24 17:47 apv Note Added: 0055468
2016-06-24 17:47 apv Assigned To apv => szv
2016-06-24 17:48 apv Note Added: 0055469
2016-06-28 10:13 szv Note Added: 0055520
2016-06-28 10:13 szv Assigned To szv => apv
2016-06-28 10:13 szv Status feedback => reviewed
2016-06-28 17:25 mkv Note Added: 0055552
2016-06-28 17:25 mkv Note Added: 0055553
2016-06-28 17:25 mkv Assigned To apv => bugmaster
2016-06-28 17:25 mkv Status reviewed => tested
2016-07-01 17:19 bugmaster Changeset attached => occt master 782467fd
2016-07-01 17:19 bugmaster Status tested => verified
2016-07-01 17:19 bugmaster Resolution open => fixed
2016-07-22 10:45 git Note Added: 0056131
2016-07-22 10:45 git Note Added: 0056136
2016-12-09 16:29 aiv Status verified => closed
2016-12-09 16:40 aiv Fixed in Version => 7.1.0