View Issue Details

IDProjectCategoryView StatusLast Update
0023650CommunityOCCT:Modeling Algorithmspublic2013-12-19 13:58
Reporterjeromerobert Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.5.4 
Target Version6.7.0Fixed in Version6.7.0 
Summary0023650: Slow mesher: one bspline surface, 80 seconds for 132 triangles
DescriptionMeshing the attached one surface brep with:

    BRepTools::Clean(face);
    BRepMesh_IncrementalMesh(face, 5, false);

last for 80 seconds to create 132 triangles.

Can be reproduced with OCCT 6.5.3 and 6.5.4 (I've not tested with older versions)
TagsNo tags attached.
Test case numberbugs mesh bug23650

Attached Files

  • slowmesh.brep (9,595 bytes)

Relationships

parent of 0024268 closedbugmaster Open CASCADE Wrong triangulation on the boundaries of the cones 

Activities

jeromerobert

2012-12-18 20:22

reporter  

slowmesh.brep (9,595 bytes)

abv

2013-06-06 23:12

manager   ~0024680

The problem looks as having similar nature to 0023706, according to the fix made in OCE for this:
https://github.com/jeromerobert/oce/commit/58f9f0a527899f66817b98ceea278a0c5ff74fad

oan

2013-06-13 10:48

developer   ~0024740

Dear Andrey, dear Igor,

The problem occurs because the boundary of the given surface is much bigger than step for exploring along the chosen iso line. This step is being defined by using a "magic" number:

Standard_Real L = .001;
h = Min(L/sqrt(MDV), hmax);

Thus, when MDV is too small in case of surfaces with small curvature and boundary of this surface is big enough, a step defined in such way is always shorter than hmax and as a result it hangs the program during stepping along the iso line using this value.

As the solution I suppose using size of surface instead of constant value 0.001 for calculation of appropriate step.

Please review the fix placed at git branch CR23650.

ifv

2013-06-28 18:56

developer   ~0024917

Last edited: 2013-07-01 10:42

Dear oan,
in expression
h = Min(L/sqrt(MDV), hmax)
hmax and h are parametric distances, but L is distance in 3D space.
When we use L=last-first, it has no physical sence.
I think it is better to restric number of steps for small h.
May be expression h = Min(...) is mistake and it is better to use
h = Max(L/sqrt(MDV), hmax), so h >= hmax always.

oan

2013-07-15 14:51

developer   ~0025063

Dear Igor,

So, I see the problem needs more thorough analysis and as far as it's out of BRepMesh scope, I move it to Modeling Algorithms category and assign it to you.

Please manage.

aml

2013-10-04 14:29

developer   ~0025896

Dear ifv,
Please, test the current state of branch CR23650_2 to be sure it is still ok.

Since attached mesh have big physical size, avoid to use "incmesh mesh 0.1", try to use "incmesh mesh 0.2". Also i checked my code with cone and sphere, it seems to be ok.



ifv

2013-10-08 10:09

developer   ~0025950

It is better to use CSLib::Normal(...) including second derivatives of S

aml

2013-10-08 12:19

developer   ~0025953

Dear ifv,
I implemented your suggestions. Please, test the current state of branch CR23650_2 to be sure it is still ok.

ifv

2013-10-08 13:29

developer   ~0025956

OK

apn

2013-10-09 11:19

administrator   ~0025984

Dear BugMaster,

Branch CR23650_2 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 8e55481a84d7e74b2eac1b47790cbeef622238f0

Number of compiler warnings:

occt component :
Linux: 424 (424 on master)
Windows: 9 (9 on master)

products component :
Linux: 189 (189 on master)
Windows: 287 (287 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
bugs mesh bug23650 - OK

Testing on Linux:
Total MEMORY difference: 367125272 / 367286876
Total CPU difference: 43952.54000000102 / 44591.450000001256

Testing on Windows:
Total MEMORY difference: 432900964 / 433093372
Total CPU difference: 36985.09375 / 41200.890625

There are differences in images found by testdiff (lost triangle on the tops of shapes):
http://occt-tests/CR23650-2-master-occt/Debian60-64/diff-Debian60-64.html
http://occt-tests/CR23650-2-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html
bugs vis bug20373
bugs vis bug288_1
bugs vis bug288_4
bugs vis bug331
bugs vis bug331
bugs vis bug288_10
bugs vis bug591
bugs vis bug331_1
bugs xde bug22535_1
bugs xde bug22535_2
bugs modalg_2 bug291
etc...

aml

2013-10-10 15:43

developer   ~0026026

Dear ifv,
I improved solution in case of null normal, please re-check branch CR23650_2 to be sure it is still ok.

I deleted
 if (aStatus == CSLib_Defined) {...}
because we cannot get this status in choosed Norm() function.
        

ifv

2013-10-10 17:12

developer   ~0026034

Ok

apn

2013-10-15 11:09

administrator   ~0026079

Dear BugMaster,

Branch CR23650_2 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 284a8f07ae3e83cf72999d0ff42e760a9becb7d5

Number of compiler warnings:

occt component :
Linux: 370 (370 on master)
Windows: 6 (6 on master)

products component :
Linux: 191 (191 on master)
Windows: 287 (287 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
bugs mesh bug23650 - OK

Testing on Linux:
Total MEMORY difference: 353173520 / 353441772
Total CPU difference: 43357.99000000055 / 43492.680000000975

Testing on Windows:
Total MEMORY difference: 407467248 / 411331344
Total CPU difference: 30603.109375 / 37715.796875

There are not differences in images found by testdiff.

abv

2013-10-15 11:19

manager   ~0026080

Please report current time of meshing of the original face (and number of triangles produced), to confirm that original problem (performance) is solved

apn

2013-10-15 11:40

administrator   ~0026081

Meshing the original face on Linux:
Draw[1]> incmesh result 5
Elapsed time: 0 Hours 0 Minutes 0.002081 Seconds
CPU user time: 0 seconds
CPU system time: 0 seconds

Draw[2]> trinfo result
This shape contains 134 triangles.
                    73 nodes.
Maximal deflection 2.6992547745561875

Meshing the original face on WNT:
Draw[1]> incmesh result 5
Elapsed time: 0 Hours 0 Minutes 0.00793472561054 Seconds
CPU user time: 0 seconds
CPU system time: 0 seconds

Draw[2]> trinfo result
This shape contains 134 triangles.
                    73 nodes.
Maximal deflection 2.6992547745561875

abv

2013-10-15 11:46

manager   ~0026082

Thank you!

Related Changesets

occt: master 2b21c641

2013-10-17 08:14:52

aml


Committer: bugmaster Details Diff
0023650: Slow mesher: one bspline surface, 80 seconds for 132 triangles
Corrections in GeomLib::NormEstim, added norm computing using GeomLProp_SLProps.
Corrections in GeomLib::NormEstim, normal is computed with CSLib::Normal in case of a null normal.
Modified GeomLib::NormEstim Algo in case of null normal.
Added test case bugs/mesh/bug23650
Affected Issues
0023650
mod - src/GeomLib/GeomLib.cxx Diff File
add - tests/bugs/mesh/bug23650 Diff File

Issue History

Date Modified Username Field Change
2012-12-18 20:22 jeromerobert New Issue
2012-12-18 20:22 jeromerobert Assigned To => oan
2012-12-18 20:22 jeromerobert File Added: slowmesh.brep
2013-06-06 23:12 abv Note Added: 0024680
2013-06-06 23:12 abv Assigned To oan => ifv
2013-06-06 23:12 abv Status new => assigned
2013-06-13 10:48 oan Note Added: 0024740
2013-06-13 10:49 oan Status assigned => resolved
2013-06-28 18:56 ifv Note Added: 0024917
2013-06-28 18:56 ifv Status resolved => feedback
2013-07-01 10:42 ifv Note Edited: 0024917
2013-07-01 10:43 ifv Assigned To ifv => oan
2013-07-15 14:51 oan Note Added: 0025063
2013-07-15 14:51 oan Category OCCT:Mesh => OCCT:Modeling Algorithms
2013-07-15 14:51 oan Assigned To oan => ifv
2013-07-15 14:52 oan Status feedback => assigned
2013-09-26 14:34 ifv Assigned To ifv => aml
2013-10-04 14:29 aml Note Added: 0025896
2013-10-04 14:29 aml Assigned To aml => ifv
2013-10-04 14:29 aml Status assigned => resolved
2013-10-08 10:09 ifv Note Added: 0025950
2013-10-08 10:09 ifv Status resolved => feedback
2013-10-08 10:26 aml Assigned To ifv => aml
2013-10-08 12:19 aml Note Added: 0025953
2013-10-08 12:19 aml Assigned To aml => ifv
2013-10-08 12:19 aml Status feedback => resolved
2013-10-08 13:29 ifv Note Added: 0025956
2013-10-08 13:29 ifv Status resolved => reviewed
2013-10-08 15:00 mkv Assigned To ifv => apn
2013-10-09 11:19 apn Note Added: 0025984
2013-10-09 11:20 apn Test case number => bugs mesh bug23650
2013-10-09 11:20 apn Assigned To apn => aml
2013-10-09 11:20 apn Status reviewed => assigned
2013-10-10 15:43 aml Note Added: 0026026
2013-10-10 15:43 aml Assigned To aml => ifv
2013-10-10 15:43 aml Status assigned => resolved
2013-10-10 17:12 ifv Note Added: 0026034
2013-10-10 17:12 ifv Status resolved => reviewed
2013-10-11 07:18 mkv Assigned To ifv => mkv
2013-10-15 11:09 apn Note Added: 0026079
2013-10-15 11:10 apn Assigned To mkv => bugmaster
2013-10-15 11:10 apn Status reviewed => tested
2013-10-15 11:10 apn Target Version => 6.7.0
2013-10-15 11:19 abv Note Added: 0026080
2013-10-15 11:19 abv Assigned To bugmaster => mkv
2013-10-15 11:19 abv Status tested => feedback
2013-10-15 11:40 apn Note Added: 0026081
2013-10-15 11:41 apn Assigned To mkv => abv
2013-10-15 11:46 abv Note Added: 0026082
2013-10-15 11:46 abv Assigned To abv => bugmaster
2013-10-15 11:46 abv Status feedback => tested
2013-10-18 11:49 apn Relationship added parent of 0024268
2013-10-18 13:47 bugmaster Changeset attached => occt master 2b21c641
2013-10-18 13:47 bugmaster Status tested => verified
2013-10-18 13:47 bugmaster Resolution open => fixed
2013-12-19 13:51 bugmaster Status verified => closed
2013-12-19 13:58 bugmaster Fixed in Version => 6.7.0