MantisBT - Community
View Issue Details
0030234Community[OCCT] OCCT:Meshpublic2018-10-11 13:392018-11-11 12:00
adrien_schvalberg_technodigit 
bugmaster 
normalmajor 
verifiedfixed 
WindowsVC++ 201564 bit
[OCCT] 7.3.0 
[OCCT] 7.4.0* 
bugs/mesh/bug30234
0030234: BRepMesh_IncrementalMesh fail to discretize some zero-length free edges
conditions:
- enable Standard_ConstructionError exceptions in config
- set the BRepMesh_IncrementalMesh to use relative deflection
- try to mesh a shape with at least a zero-length free edge (for instance an edge with a 0-radius circle, as it can be found in the outer wire of a sphere)

Then a Standard_ConstructionError exception will be raised inside BRepMesh_IncrementalMesh::discretizeFreeEdges() > CPnts_TangentialDeflection::CPnts_TangentialDeflection() > GCPnts_TangentialDeflection::Initialize()

In my test, with a empty circle for instance, the computed deflection for this edge is less than Precision::Confusion(), which explains the exception.

one possible fix would be to modify BRepMesh_ShapeTool::RelativeEdgeDeflection to have a minimum value strictly greater than Precison::Confusion()
restore empty_circle.brep a
incmesh a 0.005 -relative
No tags attached.
related to 0029181assigned apn Open CASCADE Jenkins Certification Tool - testing with enabled exceptions (undefined No_Exception) 
related to 0030345verified bugmaster Open CASCADE [REGRESSION] Mesh, BRepMesh_CurveTessellator - GCPnts_TangentialDeflection throws Standard_ConstructionError 
? empty_circle.brep (304) 2018-10-11 15:21
https://tracker.dev.opencascade.org/
Issue History
2018-10-11 13:39adrien_schvalberg_technodigitNew Issue
2018-10-11 13:39adrien_schvalberg_technodigitAssigned To => oan
2018-10-11 14:24oanNote Added: 0079889
2018-10-11 14:29oanAssigned Tooan => adrien_schvalberg_technodigit
2018-10-11 14:29oanStatusnew => feedback
2018-10-11 15:21adrien_schvalberg_technodigitFile Added: empty_circle.brep
2018-10-11 15:23adrien_schvalberg_technodigitNote Added: 0079894
2018-10-11 17:59oanRelationship addedrelated to 0026106
2018-10-11 18:00oanNote Added: 0079906
2018-10-11 18:03oanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20115#r20115
2018-10-11 18:09adrien_schvalberg_technodigitNote Added: 0079907
2018-10-11 18:19oanRelationship deletedrelated to 0026106
2018-10-11 18:24oanNote Added: 0079908
2018-10-16 10:19adrien_schvalberg_technodigitNote Added: 0079997
2018-10-16 14:14oanAssigned Toadrien_schvalberg_technodigit => oan
2018-10-16 14:14oanStatusfeedback => assigned
2018-11-06 17:59oanRelationship addedrelated to 0030345
2018-11-06 18:10kgvRelationship addedrelated to 0029181
2018-11-08 13:59oanAssigned Tooan => nbv
2018-11-08 15:20gitNote Added: 0080959
2018-11-08 15:55nbvNote Added: 0080963
2018-11-08 15:55nbvAssigned Tonbv => msv
2018-11-08 15:55nbvStatusassigned => resolved
2018-11-08 18:25msvNote Added: 0080989
2018-11-08 18:25msvAssigned Tomsv => bugmaster
2018-11-08 18:25msvStatusresolved => reviewed
2018-11-09 15:02bugmasterTarget Version => 7.4.0*
2018-11-09 15:20bugmasterTest case number => bugs/mesh/bug30234
2018-11-09 15:20bugmasterNote Added: 0081006
2018-11-09 15:20bugmasterStatusreviewed => tested
2018-11-11 11:52bugmasterChangeset attached => occt master 1f17d5fb
2018-11-11 11:52bugmasterStatustested => verified
2018-11-11 11:52bugmasterResolutionopen => fixed
2018-11-11 12:00gitNote Added: 0081023

Notes
(0079889)
oan   
2018-10-11 14:24   
Dear adrien_schvalberg_technodigit,

please attach BREP model with described behaviour.
(0079894)
adrien_schvalberg_technodigit   
2018-10-11 15:23   
load the brep (a 0-radius circle at origin),
test discretization with
BRepMesh_IncrementalMesh mesher(theEdge, 0.005, Standard_True);
(0079906)
oan   
2018-10-11 18:00   
Thanks a lot for the use case.
Seems the problem is not reproduced using patch 0026106.
However, it has not been integrated to master yet.
(0079907)
adrien_schvalberg_technodigit   
2018-10-11 18:09   
Thanks for the update.

to be sure: as I already reported it, you must have an OCC config with Standard_ConstructionError exceptions enabled (ie with #if !defined No_Exception && !defined No_Standard_ConstructionError directive evaluating to true) to reproduce the problem
(0079908)
oan   
2018-10-11 18:24   
Great notice - I had different configs for master build and patch.

So, unfortunately, it does not solve the problem(
We will investigate it.

Thanks for the details!
(0079997)
adrien_schvalberg_technodigit   
2018-10-16 10:19   
I think I'm mistakenly assigned to this issue. I didn't notice since when...
(0080959)
git   
2018-11-08 15:20   
Branch CR30234 has been created by nbv.

SHA-1: 4fffe4945e69a4a879a27401c8e4bcf231ffdae5


Detailed log of new commits:

Author: nbv
Date: Thu Nov 8 15:18:16 2018 +0300

    0030234: BRepMesh_IncrementalMesh fail to discretize some zero-length free edges
    
    Test case for the issue has been created.
    This problem is fixed by the patch 0030345.
(0080963)
nbv   
2018-11-08 15:55   
Dear Mikhail,

Please review the branch CR30234.

Test results:
Linux: http://jenkins-test-12.nnov.opencascade.com/view/CR30234-master_NBV/view/TESTING/job/CR30234-master_NBV-OCCT-Debian80-64-opt-test-restart/HTML_20Report/ [^]

Windows: http://jenkins-test-12.nnov.opencascade.com/view/CR30234-master_NBV/view/TESTING/job/CR30234-master_NBV-OCCT-Windows-64-VC14-opt-test-restart/HTML_20Report/ [^]
(0080989)
msv   
2018-11-08 18:25   
Reviewed.
(0081006)
bugmaster   
2018-11-09 15:20   
Adding new test case
(0081023)
git   
2018-11-11 12:00   
Branch CR30234 has been deleted by inv.

SHA-1: 4fffe4945e69a4a879a27401c8e4bcf231ffdae5