View Issue Details

IDProjectCategoryView StatusLast Update
0028118CommunityOCCT:Meshpublic2016-12-09 16:39
Reporterthomhong Assigned Toabv 
PriorityhighSeveritymajor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Product Version6.6.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0028118: Mesh generation hangs then crashes
DescriptionCould be a STEP importer issue - mesh generation hangs when generating a mesh for a particular STEP file.
Steps To ReproduceOpen attached STEP file in Windows ImportExport sample (tested with 6.9.1) - display tessalation hangs until application crashes.


pload MODELING VISUALIZATION DATAEXCHANGE
testreadstep 18547.stp s
vclear
vinit View1
vdefaults -autoTriang off
vdisplay s
vfit
incmesh s 0.1 -relative
vsetdispmode 1
trinfo s

TagsNo tags attached.
Test case numberbugs mesh bug28118

Attached Files

  • 18547.stp (491,547 bytes)
  • occt_654.png (25,622 bytes)
  • face_128.png (23,943 bytes)
  • face_128.brep (48,042 bytes)

Relationships

parent of 0028144 closedkgv Open CASCADE Modeling Data, GeomAdaptor_Curve - regression in comparison of version OCCT654 

Activities

thomhong

2016-11-17 04:27

reporter  

18547.stp (491,547 bytes)

abv

2016-11-17 08:28

manager   ~0060475

The problem is reproduced in latest CAD Assistant 0.8 and in OCCT 7.1.0.beta DRAW:

pload DATAEXCHANGE MODELING
stepread 18547.stp a *
incmesh a_1 0.1

Note that both applications exited without any error message...

Please investigate

kgv

2016-11-17 10:03

developer  

occt_654.png (25,622 bytes)

epa

2016-11-22 16:48

developer   ~0060684

The described problem contains two parts:
* not correct reading of data from step file(see bug28144)
* stack overflow in the Mesh caused incorrect reading of data from file( will be investigated in the frame of the current bug and fixed, if possible)

gka

2016-11-22 19:23

developer   ~0060687

Face 128 read from entity 507 is valid. But AXON viewer shows this face as invalid. Please see attached image.
This due to that first edge in the face based on the periodic curve has range -1.31441524331422e-011 0.214529066155427.

gka

2016-11-22 19:24

developer  

face_128.png (23,943 bytes)

gka

2016-11-22 19:25

developer  

face_128.brep (48,042 bytes)

epa

2016-11-23 17:25

developer   ~0060740

It looks that main problem is caused by incorrect intervals method on periodic bspline curve. The parameters of intervals are incorrect. See BRepMesh_EdgeTessellator::BRepMesh_EdgeTessellator->BRepMesh_GeomTool(for intervals)

During the tessellation of incorrect curve we obtain 90K points which causes stack overflow in UBTree selector.

Concerning the BRepMesh, the following issues found:
1) it looks tessellation of Bspline curve called twice. See BRepMesh_EdgeTessellator::BRepMesh_EdgeTessellator.

2) when we check 2d-3d triangulation on edge it can add number of points for (split interval between points up to 10 iterations). It is proposed to limit to 8 (to have not more than 256*original number of points). See the function BRepMesh_EdgeTessellator::splitSegment

oan

2016-11-23 17:50

developer   ~0060741

DC,

I suggest to avoid such solutions and magic numbers (why 8? why 256?). It is supposed that this functionality was being added in order to fix some troubles of GCPnts_TangentialDeflection in the past. Please note that at this moment, GCPnts_TangentialDeflection implements more intelligent approach to process BSpline curves. Like this, there is a possiblity that we can use it directly without extra patches and try to remove redundant code thus simplify the component.

Note that it is already done in context of 0026106 and the problem is not reproduced anymore using that patch without limitation to 8. I suggest to finalize the patch instead of making suspicious solutions.

git

2016-11-23 17:59

administrator   ~0060742

Branch CR28118 has been created by gka.

SHA-1: c321fc078c700cdd93954d31a294ed3bede8c5e0


Detailed log of new commits:

Author: gka
Date: Wed Nov 23 17:58:45 2016 +0300

    0028118: Mesh generation hangs then crashes
    
    Protection against hangs of mesh and crash(made by epa)

epa

2016-11-23 18:03

developer   ~0060743

Branch CR28118 is ready for review

pdn

2016-11-23 18:07

reporter   ~0060744

The protection is OK, but I agree, that double tessellation of BSplines to be removed (to create dedicated issue).

git

2016-11-23 19:28

administrator   ~0060748

Branch CR28118 has been updated by apn.

SHA-1: f5b4805e04835c8f97dda2f93ef091f86a3c0574


Detailed log of new commits:

Author: apn
Date: Wed Nov 23 19:28:46 2016 +0300

    Added test case bugs/mesh/bug28118

git

2016-12-07 11:31

administrator   ~0061300

Branch CR28118 has been deleted by kgv.

SHA-1: f5b4805e04835c8f97dda2f93ef091f86a3c0574

Related Changesets

occt: master cde381c4

2016-11-23 16:31:02

abv


Committer: abv Details Diff
0028118: Mesh generation hangs then crashes

Protection against hangs of mesh and crash(made by epa)
Added test case bugs/mesh/bug28118
Tests mesh* standard_* W7 are corrected (TODO removed)
Affected Issues
0028118
mod - src/BRepMesh/BRepMesh_EdgeTessellator.cxx Diff File
add - tests/bugs/mesh/bug28118 Diff File
mod - tests/mesh/data/standard/W7 Diff File

Issue History

Date Modified Username Field Change
2016-11-17 04:27 thomhong New Issue
2016-11-17 04:27 thomhong Assigned To => oan
2016-11-17 04:27 thomhong File Added: 18547.stp
2016-11-17 08:28 abv Note Added: 0060475
2016-11-17 08:28 abv Status new => assigned
2016-11-17 08:28 abv Target Version => 7.1.0
2016-11-17 08:29 abv Priority normal => high
2016-11-17 09:59 kgv Steps to Reproduce Updated
2016-11-17 10:03 kgv Product Version 6.9.1 => 6.6.0
2016-11-17 10:03 kgv File Added: occt_654.png
2016-11-21 17:56 abv Assigned To oan => epa
2016-11-22 16:48 epa Note Added: 0060684
2016-11-22 19:23 gka Note Added: 0060687
2016-11-22 19:23 gka Assigned To epa => kgv
2016-11-22 19:24 gka File Added: face_128.png
2016-11-22 19:25 gka File Added: face_128.brep
2016-11-22 19:25 gka Assigned To kgv => epa
2016-11-22 23:25 abv Relationship added parent of 0028144
2016-11-23 13:49 abv Target Version 7.1.0 => 7.2.0
2016-11-23 17:25 epa Note Added: 0060740
2016-11-23 17:50 oan Note Added: 0060741
2016-11-23 17:59 git Note Added: 0060742
2016-11-23 18:03 epa Note Added: 0060743
2016-11-23 18:03 epa Assigned To epa => pdn
2016-11-23 18:03 epa Status assigned => resolved
2016-11-23 18:07 pdn Note Added: 0060744
2016-11-23 18:07 pdn Status resolved => reviewed
2016-11-23 18:07 pdn Target Version 7.2.0 => 7.1.0
2016-11-23 19:28 git Note Added: 0060748
2016-11-23 19:49 apn Test case number => bugs mesh bug28118
2016-11-24 15:52 abv Changeset attached => occt master cde381c4
2016-11-24 15:52 abv Assigned To pdn => abv
2016-11-24 15:52 abv Status reviewed => verified
2016-11-24 15:52 abv Resolution open => fixed
2016-12-07 11:31 git Note Added: 0061300
2016-12-09 16:29 aiv Status verified => closed
2016-12-09 16:39 aiv Fixed in Version => 7.1.0