MantisBT - Community
View Issue Details
0025588Community[OCCT] OCCT:Meshpublic2014-12-10 16:292019-09-11 12:44
WindowsVC++ 201064 bit
[OCCT] 6.8.0 
[OCCT] 7.4.0 
0025588: Mesh - BRepMesh_ShapeTool::FindUV check for 2d points to be the same is inconsistent with ShapeAnalysis_Wire::CheckLacking
The current ShapeTool implementation checks 2d points to be same/different using either the distance between the corresponding 3d points or the absolute difference 2d coordinates compared with the surface size. Such check is inconsistent with ShapeAnalysis_Wire::CheckLacking function. This inconsistency results in OpenWire flag, while CheckLacking doesn't report any problems.
# Template to check attached files

restore <face_name>.brep result

tclean result
set log [incmesh result 0.01]

checktrinfo result -tri 0 -nod 0

regexp {Meshing statuses: (\w+)} $log str status
if [string match Failure $status] {
  puts "OK: Failure flag is returned"
} else {
  puts "Error: unexpected flag ($status)"

No tags attached.
related to 0026106verified bugmaster Open CASCADE BRepMesh - revision of data model 
related to 0023111verified bugmaster Open CASCADE Incorrect mesh 
zip (962,204) 2014-12-17 15:11
Issue History
2014-12-10 16:29drazmyslovichNew Issue
2014-12-10 16:29drazmyslovichAssigned To => oan
2014-12-10 16:31gitNote Added: 0035270
2014-12-10 16:32drazmyslovichNote Added: 0035271
2014-12-10 16:32drazmyslovichStatusnew => resolved
2014-12-10 16:32drazmyslovichSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8835#r8835
2014-12-10 16:44oanNote Added: 0035273
2014-12-10 16:44oanAssigned Tooan => drazmyslovich
2014-12-10 16:44oanStatusresolved => feedback
2014-12-17 15:11drazmyslovichFile Added:
2014-12-17 15:16drazmyslovichNote Added: 0035464
2014-12-17 15:16drazmyslovichAssigned Todrazmyslovich => oan
2014-12-17 15:16drazmyslovichStatusfeedback => resolved
2014-12-17 15:16drazmyslovichSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8902#r8902
2014-12-23 15:59oanRelationship addedparent of 0025628
2014-12-23 15:59oanRelationship deletedparent of 0025628
2014-12-23 15:59oanRelationship addedchild of 0025628
2014-12-23 16:06oanRelationship addedrelated to 0023111
2015-04-21 08:41abvNote Added: 0040070
2015-04-21 08:41abvStatusresolved => assigned
2015-04-21 08:41abvTarget Version6.9.0 => 7.1.0
2016-02-16 10:23oanRelationship addedchild of 0027158
2016-02-16 12:27oanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12950#r12950
2016-10-25 17:42oanRelationship addedrelated to 0026106
2016-10-25 17:42oanTarget Version7.1.0 => 7.2.0
2017-07-20 12:43oanTarget Version7.2.0 => 7.3.0
2018-02-25 21:09abvTarget Version7.3.0 => 7.4.0
2018-11-02 15:41nbvNote Added: 0080634
2018-11-02 15:42nbvAssigned Tooan => msv
2018-11-02 15:42nbvStatusassigned => feedback
2018-11-02 16:29drazmyslovichNote Added: 0080645
2018-11-02 16:40nbvNote Added: 0080647
2018-11-02 16:55drazmyslovichNote Added: 0080649
2018-11-02 17:55msvNote Added: 0080653
2018-11-02 17:55msvAssigned Tomsv => drazmyslovich
2018-11-02 17:59oanNote Added: 0080656
2018-11-17 23:23oanNote Added: 0081138
2019-08-07 10:36drazmyslovichNote Added: 0086048
2019-08-07 10:36drazmyslovichAssigned Todrazmyslovich => oan
2019-08-07 10:36drazmyslovichStatusfeedback => resolved
2019-08-07 10:37drazmyslovichNote Edited: 0086048bug_revision_view_page.php?bugnote_id=86048#r21589
2019-08-30 18:45gitNote Added: 0086556
2019-09-02 10:53gitNote Added: 0086609
2019-09-02 12:36oanNote Added: 0086611
2019-09-02 12:36oanAssigned Tooan => msv
2019-09-02 16:59msvNote Added: 0086619
2019-09-02 17:00msvAssigned Tomsv => oan
2019-09-02 17:00msvStatusresolved => assigned
2019-09-02 17:06msvNote Added: 0086620
2019-09-02 18:14oanAssigned Tooan => apn
2019-09-04 16:14kgvSummaryBRepMesh_ShapeTool::FindUV check for 2d points to be the same is inconsistent with ShapeAnalysis_Wire::CheckLacking => Mesh - BRepMesh_ShapeTool::FindUV check for 2d points to be the same is inconsistent with ShapeAnalysis_Wire::CheckLacking
2019-09-04 22:04abvAssigned Toapn => bugmaster
2019-09-11 12:44oanNote Added: 0087004

2014-12-10 16:31   
Branch CR25588 has been created by drazmyslovich.

SHA-1: 1a48f67651c699a53b3daddcae8d5462eeed4f73

Detailed log of new commits:

Author: razmyslovich
Date: Wed Dec 10 14:30:42 2014 +0100

    0025588: fix inconsistency in 2d coordinates equality check
2014-12-10 16:32   
The fix is committed, please, review
2014-12-10 16:44   
Dear Dima,

thank you for the fix! Could you please also provide a test case or problematic shape/face using which the problem can be reproduced?
2014-12-17 15:16   
Dear Oleg, I've attached zip file with 32 failing faces. For all these faces the classifier original returns the status OpenWire, while with the provided fix the mesher ends up with too fee vertices status, since all these faces are small and contain only 2 edges... The problem of too few vertices can be solved by decreasing the deflection iteratively like for self-intersected wires. Additionally in the zip file you will find Pulso 1 Main model from grabCAD, which is actually a regression of my fix. So my fix isn't good enough in order to cover both cases... Regards, Dima
2015-04-21 08:41   
I have checked the patch on current master (6.9.0.beta1), it produces 16 regressions (on 4 models) and 5 improvements (on 2 models):

mesh standard_incmesh J4 S8 V4 W5
mesh standard_incmesh_parallel J4 S8 V4 W5
mesh standard_mesh J4 S8 V4 W5
mesh standard_shading J4 S8 V4 W5
bugs modalg_2 bug287
mesh standard_incmesh C9
mesh standard_incmesh_parallel C9
mesh standard_mesh C9
mesh standard_shading C9
2018-11-02 15:41   
Currently described algorithm is not actual. So, there is no point in any fix. The issue can be closed.
2018-11-02 16:29   
I'm not quite sure, what have you meant by the last comment, but ShapeAnalysis_Wire::CheckLacking is still different from BRepMesh_ShapeTool::FindUV in the way these functions evaluate the result, which causes the described problem - no lacking, but an open wire.
2018-11-02 16:40   
Dear drazmyslovich,

Next week the fixes 0026106, #30008, 0030305 and 0030322 will be integrated. As result, architecture of BRepMesh algorithm will be changed significantly.

As result BRepMesh_ShapeTool::FindUV(...) method will be vanished from OCCT.

So, please just clone MASTER version next week (when it will be pushed) and check your tests on new mesh. In case of any problems, please create new corresponding issue.
2018-11-02 16:55   
Dear nbv,
thank you for the explanation. Maybe, in this case also other issues created once by me do not make some sense anymore. Particularly, 0025044, 0025589 and 0025022
2018-11-02 17:55   
Dear Dmitry, please check the bug state after integration of the fix for 0026106.
2018-11-02 17:59   
Hello Dima,

All of these issues are still important, despite of the current state of BRepMesh. Probably, some problems are handled more correctly, but anyway they should not be closed yet, without proper checks.

As for current issue, FindUV functionality has been modified so it has became more complicated and thus changed its name and behavior.

We also waiting for 0025113 and thanks for 0029715.
The last one is included in the updated component.

Best regards.
2018-11-17 23:23   
Faces from the attached archive represent cases of open wires where gap is covered by tolerance. These ones should result in closed discrete contours of null area formed by two straight links causing error of meshing algorithm (by default).

However, all of them can be meshed using more fair angular tolerance producing several points along the border edges via

incmesh a 0.1 -a 5

Model "2.stp" is meshed via vdisplay without errors according to tricheck command.
2019-08-07 10:36   
(edited on: 2019-08-07 10:37)
On my point of view, this issue can be considered as closed - using the refactored BRepMesh module I do not experience these art of the problems anymore.

2019-08-30 18:45   
Branch CR25588_1 has been created by oan.

SHA-1: a4cddcce4d995f46df90d011332109bfa418e2fe

Detailed log of new commits:

Author: oan
Date: Fri Aug 30 18:10:05 2019 +0300

    0025588: BRepMesh_ShapeTool::FindUV check for 2d points to be the same is inconsistent with ShapeAnalysis_Wire::CheckLacking
    Added test scripts
2019-09-02 10:53   
Branch CR25588_1 has been updated forcibly by oan.

SHA-1: 1a94c10a86f1684c227f2128cecc4b4da55bb727
2019-09-02 12:36   
Dear Mikhail,

please review test cases and close the issue.

Test reports:
http://occt-tests/CR25588-master-OAN-OCCT/Debian80-64/diff_summary.html [^]
http://occt-tests/CR25588-master-OAN-OCCT/Windows-64-VC14/diff_summary.html [^]
2019-09-02 16:59   
Dear Oleg and Andrey (APN)

1. Move 2.stp from private to public data repository. It is not confidential as is attached to public bug.
2. Rename data files to add a prefix "bug25588_"
3. Rename the script bug25588 to bug25588_0, otherwise all images from other cases are included into report of this test.
2019-09-02 17:06   
4. Re-save data files 1.stp_face*.brep without triangulations. For that do the following in Draw:
 foreach f [glob 1.stp_face*.brep] {
   restore $f a
   tcopy a b
   save b bug25588_$f
2019-09-11 12:44   
Dear bugmaster,

please take remarks from Mikhail into account, integrate test scripts and close the issue.