View Issue Details

IDProjectCategoryView StatusLast Update
0022778CommunityOCCT:Meshpublic2016-06-06 16:15
ReporterszyAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformA 
Product Version6.5.2 
Target Version6.6.0Fixed in Version6.6.0 
Summary0022778: Bug in BRepMesh
DescriptionPost from the Forum - http://www.opencascade.org/org/forum/thread_22070/.
" Here are a geometry and a program that show the B-spline mesher is still buggy in OCCT 6.5.1. The BRep is a sphere trimmed by a square made of 120 TopoDS_Edge. The program is run with the B-spline mesher and without (thanks to the attached patch). In both cases I give the number of triangles for the sphere as a reference (the optimal mesh), and for the sphere converted to GeomAbs_BSplineSurface.

Without the patch (B-spline mesher):
$ ./a.out
Number of triangles for the sphere geometry: 886
Number of triangles for the nurbs geometry: 46948

With the patch (generic mesher):
$ ./a.out
Number of triangles for the sphere geometry: 886
Number of triangles for the nurbs geometry: 1676

This geometry is not a pathological case as over refined trimming are more than common in real world. I think a mesh 28 time too thin should be concidered as a bug.

See the patch, source code, and geometry attached.

Regards,

Jerome
"
So, after applying to the initial shape of the BRepBuilderAPI_NurbsConvert and building a mesh with the same deflection a number of triangles sufficiently differ.
Steps To Reproduceplaod ALL
restore square.brep s
checkshape s
incmesh s 0.001
trinfo s
##This shape contains 226 triangles.
## 174 nodes.
##Maximal deflection 0.00088688254163757894
nurbsconvert r s
checkshape r
## This shape seems to be valid
incmesh r 0.001
Draw[11]> trinfo r
This shape contains 2148 triangles.
                    1135 nodes.
Maximal deflection 6.7388607894560643e-005



TagsNo tags attached.
Test case numberbugs mesh bug22778

Attached Files

  • bugocc.tar.bz2 (16,066 bytes)

Relationships

related to 0022893 closedmkv Community Possible regression in tesselation algorithm of OCCT6.5.2 

Activities

szy

2011-10-25 14:37

manager  

bugocc.tar.bz2 (16,066 bytes)

szy

2011-11-25 14:35

manager   ~0018624

Mikhail,
Could you assign the bug to somebody from MESH pool.
SZY

msv

2011-11-25 18:43

developer   ~0018632

There is no such entity "Mesh pool" in the organization. But I know that the mentioned algorithm was last time improved by various people under inspection of PDN.
Dear Pavel, could you help to find the proper person to fix the bug?

pdn

2011-11-28 14:53

reporter   ~0018641

After the analysis of the bug description, attached files and step to reproduce I can comment in the following way:
1) The current state of the BRepMesh mesher (OCC 6.5.2 and trunk) are better that state in the proposed patch. Current difference in sphere and NURBS is about 10 times.
2) This difference is quite OK and explained by the simple algorithmic behavior when information on analytic surface type (sphere) is used. In case of sphere, algorithm is able to compute the maximal error analytically, when for NURBS is should be estimated.

IMHO, the bug should be resolved as documented. Possible improvements if free BRepMesh algorithm can be considered in the frame of OCCT evolution. Similar issue is recorded for Express Mesh.
Thus, I reassign the problem to Andrey to take decision for planning.

jeromerobert

2012-01-13 22:11

reporter   ~0019128

Results with OCC 6.5.2 (much better thanks !):

B-Spline mesher:
  Number of triangles for the sphere geometry: 646
  Number of triangles for the nurbs geometry: 2148

Generic mesher:
  Number of triangles for the sphere geometry: 646
  Number of triangles for the nurbs geometry: 1438

abv

2012-01-14 08:24

manager   ~0019129

I guess that issue 0022893 is probably related to this one, as an opposite side of the medal: decrease of number of triangles on b-splines can lead to decreased shading quality. To be investigated

abv

2012-12-03 22:56

manager   ~0022530

Test case for this issue (bugs mesh bug22778) pushed to branch CR22778.
Note that I have moved test case for #23473 from bugs mesh bug23473 to relevant grid (mesh standard* X5).
Please review and test.

bugmaster

2013-01-21 18:30

administrator   ~0023047

Integrated into master of OCCT repository

Issue History

Date Modified Username Field Change
2011-10-25 14:37 szy New Issue
2011-10-25 14:37 szy Assigned To => jgv
2011-10-25 14:37 szy File Added: bugocc.tar.bz2
2011-10-25 14:38 szy Assigned To jgv => pdn
2011-10-25 14:44 pdn Assigned To pdn => azn
2011-11-25 14:35 szy Note Added: 0018624
2011-11-25 14:35 szy Assigned To azn => msv
2011-11-25 14:35 szy Status new => assigned
2011-11-25 14:35 szy OS L =>
2011-11-25 14:35 szy OS Version L =>
2011-11-25 18:43 msv Note Added: 0018632
2011-11-25 18:44 msv Assigned To msv => pdn
2011-11-28 14:53 pdn Note Added: 0018641
2011-11-28 14:53 pdn Assigned To pdn => abv
2012-01-13 22:11 jeromerobert Note Added: 0019128
2012-01-14 08:24 abv Note Added: 0019129
2012-01-14 08:24 abv Relationship added related to 0022893
2012-03-22 06:18 abv Target Version 6.5.3 => 6.5.4
2012-10-23 19:15 abv Target Version 6.5.4 => 6.6.0
2012-11-09 09:49 abv Category OCCT:Modeling Algorithms => OCCT:Mesh
2012-12-03 22:54 abv Test case number => bugs mesh bug22778
2012-12-03 22:56 abv Note Added: 0022530
2012-12-03 22:56 abv Assigned To abv => bugmaster
2012-12-03 22:56 abv Status assigned => feedback
2013-01-16 15:00 bugmaster Status feedback => tested
2013-01-21 18:30 bugmaster Note Added: 0023047
2013-01-21 18:30 bugmaster Status tested => verified
2013-01-21 18:30 bugmaster Resolution open => fixed
2013-04-23 13:36 aiv Status verified => closed
2013-04-29 15:21 aiv Fixed in Version => 6.6.0