MantisBT - Open CASCADE
View Issue Details
0031144Open CASCADE[OCCT] OCCT:Shape Healingpublic2019-11-09 08:202020-12-02 17:12
[OCCT] 7.4.0 
[OCCT] 7.5.0[OCCT] 7.5.0 
0031144: Shape Healing - ShapeAnalysis::OuterWire() infinite loop on solid obtained from IFC
BRepMesh hangs on one of solids created during reading from IFC with OCC reader.
This blocks any possibility to see the model in CAD Assistant or other OCCT-based viewer.

This is regression appeared in OCCT 7.4.0.

The solid is valid according to checkshape but has large tolerance (90 mm, on object of ~ 300 mm size) and visible gaps in edges + misplaced vertex, see attached image.

The IFC files comes from Duraark archives ( [^]), archive "A-House Scan September 2014" ( [^]), file LTU_A-House_redesign.ifc, solid 4081 (no information on original entity).
pload ALL
restore LTU_A-House_redesign_so4081.brep a
incmesh a 1.
No tags attached.
related to 0031248new abv Community Shape Healing - ShapeAnalysis::OuterWire() returns empty outer wire for attached use case 
? LTU_A-House_redesign_so4081.brep (17,661) 2019-11-09 08:20
png LTU_A-House_redesign_so4081.png (8,809) 2019-11-09 08:21
Issue History
2019-11-09 08:20abvNew Issue
2019-11-09 08:20abvAssigned To => oan
2019-11-09 08:20abvFile Added: LTU_A-House_redesign_so4081.brep
2019-11-09 08:21abvFile Added: LTU_A-House_redesign_so4081.png
2019-11-10 19:04oanNote Added: 0088883
2019-11-10 21:07oanNote Added: 0088884
2019-11-10 21:07oanAssigned Tooan => abv
2019-11-10 21:07oanStatusnew => assigned
2019-11-10 22:17oanNote Added: 0088885
2019-11-10 22:26oanNote Added: 0088886
2019-11-11 12:39oanStatusassigned => feedback
2019-11-12 15:06oanCategoryOCCT:Mesh => OCCT:Shape Healing
2019-11-12 15:06oanSummaryMesh - [regression] BRepMesh hangs on solid obtained from IFC => Shape Healing - ShapeAnalysis::OuterWire() infinite loop on solid obtained from IFC
2019-11-12 19:13gitNote Added: 0088921
2019-11-12 19:27abvStatusfeedback => assigned
2019-11-12 23:17gitNote Added: 0088925
2019-11-12 23:17abvNote Added: 0088926
2019-11-12 23:17abvAssigned Toabv => gka
2019-11-12 23:17abvStatusassigned => resolved
2019-11-12 23:17abvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=22187#r22187
2019-11-13 08:36abvDescription Updatedbug_revision_view_page.php?rev_id=22189#r22189
2019-11-15 10:07gkaNote Added: 0088982
2019-11-15 10:07gkaAssigned Togka => bugmaster
2019-11-15 10:07gkaStatusresolved => reviewed
2019-11-15 16:39bugmasterTest case number => bugs/mesh/bug31144
2019-11-16 17:57bugmasterChangeset attached => occt master 31a5a359
2019-11-16 17:57bugmasterStatusreviewed => verified
2019-11-16 17:57bugmasterResolutionopen => fixed
2019-11-16 18:11gitNote Added: 0089022
2019-12-16 19:07oanRelationship addedrelated to 0031248
2020-12-02 16:40emoFixed in Version => 7.5.0
2020-12-02 17:12emoStatusverified => closed

2019-11-10 19:04   
It is strange that checkshape reports nothing, whereas bopargcheck notifies a lot of failures:

bopargcheck a #F
Made faulty shape: s1si_1
Made faulty shape: s1si_2
Made faulty shape: s1si_3
Made faulty shape: s1si_4
Made faulty shape: s1si_5
Made faulty shape: s1si_6
Made faulty shape: s1si_7
Made faulty shape: s1si_8
Made faulty shape: s1si_9
Made faulty shape: s1si_10
Made faulty shape: s1si_11
Made faulty shape: s1si_12
Made faulty shape: s1si_13
Made faulty shape: s1si_14
Made faulty shape: s1si_15
Made faulty shape: s1si_16
Made faulty shape: s1si_17
Made faulty shape: s1si_18
Made faulty shape: s1si_19
Made faulty shape: s1si_20
Made faulty shape: s1si_21
Made faulty shape: s1si_22
Made faulty shape: s1si_23
Made faulty shape: s1si_24
Made faulty shape: s1si_25
Made faulty shape: s1si_26
Made faulty shape: s1si_27
Made faulty shape: s1si_28
Made faulty shape: s1si_29
Made faulty shape: s1si_30
Made faulty shape: s1si_31
Made faulty shape: s1si_32
Made faulty shape: s1se_1
Made faulty shape: s1se_2
Made faulty shape: s1se_3
Made faulty shape: s1se_4
Faulties for FIRST shape found : 36
Shapes are not suppotrted by BOP: NO
Self-Intersections : YES Cases(32) Total shapes(64)
Check for SI has been aborted : NO
Too small edges : YES Cases(4) Total shapes(4)
Bad faces : NO
Too close vertices : DISABLED
Too close edges : DISABLED
Shapes with Continuity C0 : NO
Invalid Curve on Surface : NO

Faulties for SECOND shape found : 0

However, issue should be checked in context of BRepMesh anyway.
2019-11-10 21:07   
Dear Andrey,

preliminary analysis has shown that issue with hang on attached model is caused by

ShapeAnalysis::OuterWire (theFace);

called from BRepMesh_ShapeVisitor::Visit (const TopoDS_Face& theFace).

This means that issue by its nature is not a problem of BRepMesh, but Shape Healing regression.

Please move the ticket to Shape Healing category and assign to proper person for further processing.
2019-11-10 22:17   
In details, ShapeAnalysis::OuterWire causes infinite loop if first sub-shape is not a wire due to lack of proper iterator move after this particular check.
2019-11-10 22:26   
Potentially, this issue will cause hang up of any algorithm using ShapeAnalysis::OuterWire, so it should be checked by an expert in order to provide an appropriate fix.
2019-11-12 19:13   
Branch CR31144 has been created by abv.

SHA-1: 40125556fe489fcb0a862a7f6ccc43dd2a72f81b

Detailed log of new commits:

Author: abv
Date: Tue Nov 12 19:10:14 2019 +0300

    0031144: Shape Healing - ShapeAnalysis::OuterWire() infinite loop on solid obtained from IFC
    Implementation of ShapeAnalysis::OuterWire() is revised to avoid infinite cycle if face contains internal vertex.
2019-11-12 23:17   
Branch CR31144 has been updated by abv.

SHA-1: e6764f9969f1760dca248568767e6765cd1bb888

Detailed log of new commits:

Author: abv
Date: Tue Nov 12 23:15:55 2019 +0300

    Added test bugs mesh bug31144

2019-11-12 23:17   
Fix is pushed to CR3144 and tested, see Jenkins job CR3144-abv; please review
2019-11-15 10:07   
Branch CR31144 was reviewed
2019-11-16 18:11   
Branch CR31144 has been deleted by inv.

SHA-1: e6764f9969f1760dca248568767e6765cd1bb888