MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0022778Community[OCCT] OCCT:Meshpublic2011-10-25 14:372016-06-06 16:15
Reporterszy 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSOS Version
Product Version[OCCT] 6.5.2 
Target Version[OCCT] 6.6.0Fixed in Version[OCCT] 6.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 Filesbz2 file icon bugocc.tar.bz2 (16,066 bytes) 2011-10-25 14:37

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

-  Notes
(0018624)
szy (administrator)
2011-11-25 14:35

Mikhail,
Could you assign the bug to somebody from MESH pool.
SZY
(0018632)
msv (developer)
2011-11-25 18:43

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?
(0018641)
pdn (developer)
2011-11-28 14:53

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.
(0019128)
jeromerobert (reporter)
2012-01-13 22:11

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
(0019129)
abv (manager)
2012-01-14 08:24

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
(0022530)
abv (manager)
2012-12-03 22:56

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.
(0023047)
bugmaster (administrator)
2013-01-21 18:30

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
2011-11-28 15:36 szy Note Added: 0018644
2011-12-01 09:54 abv Note Deleted: 0018644
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 user533 Status verified => closed
2013-04-29 15:21 user533 Fixed in Version => 6.6.0
2016-06-06 16:15 abv Relationship added related to 0027362


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker