MantisBT - Open CASCADE
View Issue Details
0027595Open CASCADE[OCCT] OCCT:Meshpublic2016-06-12 16:232016-12-09 16:40
kgv 
bugmaster 
normalmajor 
closedfixed 
WindowsVC++ 201364 bit
[OCCT] 7.1.0 
[OCCT] 7.1.0[OCCT] 7.1.0 
Not needed
0027595: Mesh - faces without triangulations due to gp_VectorWithNullMagnitude exception
38 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.
N/A
No tags attached.
7z bad_faces.7z (255,698) 2016-06-12 16:23
https://tracker.dev.opencascade.org/
Issue History
2016-06-12 16:23kgvNew Issue
2016-06-12 16:23kgvAssigned To => oan
2016-06-12 16:23kgvFile Added: bad_faces.7z
2016-06-12 16:24kgvRelationship addedchild of 0027384
2016-06-12 16:33gitNote Added: 0054928
2016-06-12 16:34kgvNote Added: 0054929
2016-06-12 16:34kgvAssigned Tooan => msv
2016-06-12 16:34kgvStatusnew => assigned
2016-06-12 16:48kgvDescription Updatedbug_revision_view_page.php?rev_id=13896#r13896
2016-06-14 08:48kgvAssigned Tomsv => oan
2016-06-15 23:33msvNote Added: 0055050
2016-06-16 15:17gitNote Added: 0055080
2016-06-16 15:18kgvNote Added: 0055081
2016-06-16 15:18kgvStatusassigned => resolved
2016-06-16 16:37oanNote Added: 0055094
2016-06-16 16:37oanAssigned Tooan => kgv
2016-06-16 16:37oanStatusresolved => assigned
2016-06-17 11:24gitNote Added: 0055126
2016-06-17 11:25kgvNote Added: 0055127
2016-06-17 11:25kgvAssigned Tokgv => oan
2016-06-17 14:39oanNote Added: 0055174
2016-06-17 14:39oanAssigned Tooan => kgv
2016-06-17 14:39oanStatusassigned => feedback
2016-06-17 14:50kgvAssigned Tokgv => oan
2016-06-17 14:50kgvStatusfeedback => assigned
2016-06-17 19:00gitNote Added: 0055198
2016-06-17 19:00oanAssigned Tooan => kgv
2016-06-17 19:00oanStatusassigned => feedback
2016-06-21 09:09kgvNote Added: 0055276
2016-06-21 09:09kgvAssigned Tokgv => bugmaster
2016-06-21 09:09kgvStatusfeedback => reviewed
2016-06-21 09:09kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14018#r14018
2016-06-21 11:43apvAssigned Tobugmaster => apv
2016-06-21 15:30oanRelationship addedrelated to 0027626
2016-06-21 18:40gitNote Added: 0055319
2016-06-21 18:40apvNote Added: 0055320
2016-06-22 14:32apvTest case number => Not needed
2016-06-22 16:32apvNote Added: 0055346
2016-06-22 16:32apvAssigned Toapv => oan
2016-06-22 16:32apvStatusreviewed => assigned
2016-06-22 16:33apvNote Added: 0055347
2016-06-22 18:24gitNote Added: 0055352
2016-06-22 18:24oanNote Added: 0055353
2016-06-22 18:24oanAssigned Tooan => msv
2016-06-22 18:24oanStatusassigned => resolved
2016-06-23 09:55msvNote Added: 0055359
2016-06-23 09:55msvAssigned Tomsv => oan
2016-06-23 09:55msvStatusresolved => assigned
2016-06-23 14:21gitNote Added: 0055377
2016-06-23 14:22oanNote Added: 0055378
2016-06-23 14:22oanAssigned Tooan => msv
2016-06-23 14:22oanStatusassigned => resolved
2016-06-23 14:27gitNote Added: 0055379
2016-06-23 16:14oanSeverityminor => major
2016-06-23 16:40msvNote Added: 0055386
2016-06-23 16:40msvAssigned Tomsv => bugmaster
2016-06-23 16:40msvStatusresolved => reviewed
2016-06-23 17:13mkvAssigned Tobugmaster => apv
2016-06-23 17:52gitNote Added: 0055391
2016-06-24 15:11apvNote Added: 0055445
2016-06-24 15:11apvAssigned Toapv => oan
2016-06-24 15:11apvStatusreviewed => assigned
2016-06-24 15:11apvNote Added: 0055446
2016-06-24 15:21msvNote Added: 0055447
2016-06-24 16:46oanNote Added: 0055453
2016-06-24 16:46oanAssigned Tooan => apv
2016-06-24 16:46oanStatusassigned => feedback
2016-06-24 17:47apvNote Added: 0055468
2016-06-24 17:47apvAssigned Toapv => szv
2016-06-24 17:48apvNote Added: 0055469
2016-06-28 10:13szvNote Added: 0055520
2016-06-28 10:13szvAssigned Toszv => apv
2016-06-28 10:13szvStatusfeedback => reviewed
2016-06-28 17:25mkvNote Added: 0055552
2016-06-28 17:25mkvNote Added: 0055553
2016-06-28 17:25mkvAssigned Toapv => bugmaster
2016-06-28 17:25mkvStatusreviewed => tested
2016-07-01 17:19bugmasterChangeset attached => occt master 782467fd
2016-07-01 17:19bugmasterStatustested => verified
2016-07-01 17:19bugmasterResolutionopen => fixed
2016-07-22 10:45gitNote Added: 0056131
2016-07-22 10:45gitNote Added: 0056136
2016-12-09 16:29aivStatusverified => closed
2016-12-09 16:40aivFixed in Version => 7.1.0

Notes
(0054928)
git   
2016-06-12 16:33   
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().
(0054929)
kgv   
2016-06-12 16:34   
I have pushed a patch adding zero-magnitude check, but I'm not sure if it is a proper fix.
(0055050)
msv   
2016-06-15 23:33   
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)
(0055080)
git   
2016-06-16 15:17   
Branch CR27595 has been updated forcibly by kgv.

SHA-1: 1ed4a18a8e013ae5470afd52d6209367f6c0dbe3
(0055081)
kgv   
2016-06-16 15:18   
Patch has been updated following remarks.
(0055094)
oan   
2016-06-16 16:37   
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()".
(0055126)
git   
2016-06-17 11:24   
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().
(0055127)
kgv   
2016-06-17 11:25   
> 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.
(0055174)
oan   
2016-06-17 14:39   
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.
(0055198)
git   
2016-06-17 19:00   
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.

(0055276)
kgv   
2016-06-21 09:09   
Please test the patch.
Test case is not needed.
(0055319)
git   
2016-06-21 18:40   
Branch CR27595_1 has been updated forcibly by apv.

SHA-1: 3437df85e9474a8d865713f7585fec95f50917bb
(0055320)
apv   
2016-06-21 18:40   
Branch CR27595_1 has been rebased on the current master
(0055346)
apv   
2016-06-22 16:32   
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%]
(0055347)
apv   
2016-06-22 16:33   
Dear Oleg,

Branch CR27595_1 has been rejected due to:
- regressions/differences/improvements
(0055352)
git   
2016-06-22 18:24   
Branch CR27595_1 has been updated forcibly by oan.

SHA-1: b3340156c4f60eb29b53a3a98a556a0f1ba32fad
(0055353)
oan   
2016-06-22 18:24   
Please review.
(0055359)
msv   
2016-06-23 09:55   
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.
(0055377)
git   
2016-06-23 14:21   
Branch CR27595_1 has been updated forcibly by oan.

SHA-1: cd93fdd6f5ea1c77f90a465b6e55fb6e30628dc4
(0055378)
oan   
2016-06-23 14:22   
Dear Mikhail,

yes, you are right, please review.
(0055379)
git   
2016-06-23 14:27   
Branch CR27595_1 has been updated forcibly by oan.

SHA-1: cc41ee19583e407dcc820a55504ed1877df1deae
(0055386)
msv   
2016-06-23 16:40   
Reviewed.
(0055391)
git   
2016-06-23 17:52   
Branch CR27595_1 has been updated forcibly by mkv.

SHA-1: 97edb51d48c3bb2ab9430e2e9e2b878170c8d526
(0055445)
apv   
2016-06-24 15:11   
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%]
(0055446)
apv   
2016-06-24 15:11   
Dear Oleg,

Branch CR27595_1 has been rejected due to:
- regressions/differences/improvements
(0055447)
msv   
2016-06-24 15:21   
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
(0055453)
oan   
2016-06-24 16:46   
Dear Alexey,

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

TIA
(0055468)
apv   
2016-06-24 17:47   
Branch CR27595 has been created in products git-repository
(0055469)
apv   
2016-06-24 17:48   
Dear Sergey,

Please, validate modification of test case in branch CR27595 from products git-repository.
(0055520)
szv   
2016-06-28 10:13   
The modification of tests in the branch CR27595 is acceptable, please proceed.
(0055552)
mkv   
2016-06-28 17:25   
Dear BugMaster,
following test case was retested
omf advanced_meshcut Z5
Now it is OK.
(0055553)
mkv   
2016-06-28 17:25   
Dear BugMaster,
Branches CR27595_1 and CR27595 are TESTED.
(0056131)
git   
2016-07-22 10:45   
Branch CR27595_1 has been deleted by inv.

SHA-1: 97edb51d48c3bb2ab9430e2e9e2b878170c8d526
(0056136)
git   
2016-07-22 10:45   
Branch CR27595 has been deleted by inv.

SHA-1: 1ed4a18a8e013ae5470afd52d6209367f6c0dbe3