MantisBT - Community
View Issue Details
0028247Community[OCCT] OCCT:Meshpublic2016-12-19 18:372020-02-08 13:29
Markus 
bugmaster 
normalminor 
verifiedfixed 
[OCCT] 7.0.0 
[OCCT] 7.5.0* 
bugs mesh bug28247
0028247: Effect of minSize parameter of BRepMesh_IncrementalMesh seems to be too strong
When the minSize parameter is used for the appended face, the number of triangles is drastically reduced. According to documentation, MinSize defines the minimal allowed size of mesh element. But the mesh which is created without minSize does not seem to have elements with smaller size. At least, the effect should not be so big here.

The behaviour is similar in 7.1.0.
restore face.brep f
whatis f
pload ALL
tolerance f
tclean f
incmesh f 0.59
trinfo f
# => 4357 triangles
tclean f
incmesh f 0.59 -a 11.45
trinfo f
# => 14412 triangles
tclean f
incmesh f 0.59 -a 11.45 -min 0.035
trinfo f
# => 2830 triangles

No tags attached.
zip face.zip (534,550) 2016-12-19 18:37
https://tracker.dev.opencascade.org/
png without minSize.png (161,814) 2016-12-19 18:37
https://tracker.dev.opencascade.org/
png with minSize.png (191,216) 2016-12-19 18:38
https://tracker.dev.opencascade.org/
png case1.png (40,955) 2019-10-11 22:49
https://tracker.dev.opencascade.org/
png case2.png (55,456) 2019-10-11 22:49
https://tracker.dev.opencascade.org/
png case3.png (58,010) 2019-10-11 22:49
https://tracker.dev.opencascade.org/
Issue History
2016-12-19 18:37TimoNew Issue
2016-12-19 18:37TimoAssigned To => kgv
2016-12-19 18:37TimoFile Added: face.zip
2016-12-19 18:37TimoFile Added: without minSize.png
2016-12-19 18:38TimoFile Added: with minSize.png
2016-12-19 18:38kgvAssigned Tokgv => msv
2016-12-19 18:38kgvCategoryOCCT:Visualization => OCCT:Mesh
2017-01-26 15:07TimoAssigned Tomsv => oan
2017-05-31 15:35TimoReporterTimo => Markus
2017-07-20 12:43oanTarget Version7.2.0 => 7.3.0
2017-08-28 14:20mkvTest case number => bugs mesh bug28247
2017-08-28 14:20mkvNote Added: 0069978
2018-02-25 21:14abvTarget Version7.3.0 => 7.4.0
2019-09-04 13:04abvTarget Version7.4.0 => 7.5.0*
2019-10-11 22:49oanFile Added: case1.png
2019-10-11 22:49oanFile Added: case2.png
2019-10-11 22:49oanFile Added: case3.png
2019-10-11 22:59oanNote Added: 0088058
2019-10-11 22:59oanAssigned Tooan => abv
2019-10-11 22:59oanStatusnew => feedback
2019-10-13 09:09abvNote Added: 0088072
2019-10-13 09:09abvAssigned Toabv => oan
2019-10-13 09:09abvStatusfeedback => assigned
2019-10-13 13:34oanNote Added: 0088073
2019-10-13 13:34oanAssigned Tooan => abv
2019-10-13 13:34oanStatusassigned => feedback
2019-10-19 16:29gitNote Added: 0088325
2019-10-19 16:45gitNote Added: 0088326
2019-10-19 16:46oanNote Added: 0088327
2019-10-19 16:46oanStatusfeedback => resolved
2020-01-29 17:05gitNote Added: 0090152
2020-01-29 18:23oanAssigned Toabv => msv
2020-01-29 18:26oanNote Added: 0090168
2020-01-31 19:19msvAssigned Tomsv => bugmaster
2020-01-31 19:19msvStatusresolved => reviewed
2020-02-07 14:07bugmasterNote Added: 0090395
2020-02-07 14:07bugmasterStatusreviewed => closed
2020-02-07 14:07bugmasterResolutionopen => fixed
2020-02-07 14:50bugmasterStatusclosed => assigned
2020-02-07 14:50bugmasterAssigned Tobugmaster => oan
2020-02-07 14:50bugmasterStatusassigned => resolved
2020-02-07 14:50bugmasterAssigned Tooan => bugmaster
2020-02-07 14:50bugmasterStatusresolved => reviewed
2020-02-07 14:50bugmasterStatusreviewed => tested
2020-02-08 13:00bugmasterChangeset attached => occt master 5e06dfcb
2020-02-08 13:00bugmasterStatustested => verified
2020-02-08 13:29gitNote Added: 0090418

Notes
(0069978)
mkv   
2017-08-28 14:20   
Problem described in issue is reproduced on current state of OCCT.
(0088058)
oan   
2019-10-11 22:59   
Dear Andrey,

current version of BRepMesh provides different results comparing to reported problem:

incmesh a 0.59
#This shape contains 1235 triangles.

incmesh a 0.59 -a 11.45
#This shape contains 6438 triangles.

incmesh a 0.59 -a 11.45 -min 0.035
#This shape contains 7079 triangles.

I suppose the issue can be closed now.

However, it could be fair to synchronize description of -min parameter of incmesh command and MinSize parameter of the algorithm itself.

It is suggested to take description of -min parameter as reference as soon as it reflects the notion of this parameter more careful:

minimum size parameter limiting size of triangle's edges to prevent sinking into amplification in case of distorted curves and surfaces
(0088072)
abv   
2019-10-13 09:09   
Oleg, I completely agree that documentation shall be improved to avoid misinterpretation of meaning of the parameter.

Regarding the numbers you gave in 0028247:0088058, can you explain why triangulation with -min parameter has larger number of triangles, while logically it should contain less? Is that due to default value of minSize being greater than 0? If so, this should also be documented, I suppose.
(0088073)
oan   
2019-10-13 13:34   
Andrey,

to my understanding, case with different number of triangles with and without -min parameter is caused by optimization procedure used by BRepMesh which is remembered as Control method. It is limited by 11 iterations.

So, potentially, with -min parameter we can skip some areas processed in default mode and refine another parts of face more strongly which could lead to difference in triangles number. Moreover, MinSize parameter limits discretization methods, so even edge tesellations could violate specified deflection parameter trying to fit to -min value. This causes the situation when face has more areas to be refined comparing to result obtained without -min parameter.
(0088325)
git   
2019-10-19 16:29   
Branch CR28247 has been created by oan.

SHA-1: 661809190aefcfe6603045f4682a19e0d9f47ea3


Detailed log of new commits:

Author: oan
Date: Sat Oct 19 16:28:55 2019 +0300

    0028247: Effect of minSize parameter of BRepMesh_IncrementalMesh seems to be too strong
    Updated description of MinSize parameter of IMeshTools_Parameters
(0088326)
git   
2019-10-19 16:45   
Branch CR28247 has been updated by oan.

SHA-1: 2c30036a1b10bb0113b29ff3d332db8c7976b8de


Detailed log of new commits:

Author: oan
Date: Sat Oct 19 16:44:20 2019 +0300

    # updated test case

(0088327)
oan   
2019-10-19 16:46   
Please review changes made according to the note above.
(0090152)
git   
2020-01-29 17:05   
Branch CR28247 has been updated forcibly by oan.

SHA-1: d0f9b8d8afb943fdeaca8e5fda5ffa5060414829
(0090168)
oan   
2020-01-29 18:26   
Report contains results both for 0025551, 0028247, #26382 and #25827

http://jenkins-test-12.nnov.opencascade.com/view/CR25551-master-OAN/view/COMPARE/ [^]
(0090395)
bugmaster   
2020-02-07 14:07   
Tested in framework of WEEK-6:

Combination -
OCCT branch : WEEK-6
master SHA - 8b3fbdef34aed600927f10a8d58b56824ca8070d
fe4497f3246e6bc1ced97ac331c148f0809ded15
Products branch : WEEK-6 SHA - af75a25bca53d4cfce0059a706fc86799d3c1182
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17009.640000000178 / 16997.920000000046 [+0.07%]
Products
Total CPU difference: 12143.5600000001 / 12129.400000000101 [+0.12%]
Windows-64-VC14:
OCCT
Total CPU difference: 18438.515625 / 18439.75 [-0.01%]
Products
Products
Total CPU difference: 12143.5600000001 / 12129.400000000101 [+0.11%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0090418)
git   
2020-02-08 13:29   
Branch CR28247 has been deleted by inv.

SHA-1: d0f9b8d8afb943fdeaca8e5fda5ffa5060414829