MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0024127Community[OCCT] OCCT:Meshpublic2013-08-26 16:012014-11-11 13:01
ReporterVitezslav Zajic 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.6.0 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.8.0 
Summary0024127: Mesh generated with BRepMesh_FastDiscret does not reflect a deflection setting
DescriptionIn some cases, edges in triangulation generated by BRepMesh_FastDiscret can have much grater deflection from the curves they should approximate than is specified. This is due to the computation of the deflection in function splitSegment in file BRepMesh_FastDiscret.cxx. This function takes only one(!) sample point in the middle of the source curve and computes its distance from the segment. If this is lesser than the specified deflection, it considers the segment as a good approximation of the curve, even if it otherwise curves quite far from the segment.

One such example is shown in an attachment. When a surface shown in file surface.png is meshed with BRepMesh_FastDiscret, deflection set to 1.0, the generated mesh has only two triangles and very poorly approximates the one non-straight curve, the deflection of the approximating edge from the curve is greater than 2.5 (see surface_with_bad_triangulation.png). When a splitSegment method is alter in an easy way such that it takes several evenly spaced sample points, the generated mesh is OK, as is illustrated in file right_triangulation.png.

For easier reproducibility, I have also attached a simple test application that creates the above mentioned surface and triangulates it and a patch that alters the splitSegment function.

I hope that I'm not missing something, the documentation of meshing algorithms is quite poor (I definitely vote for feature 0024117).
Steps To ReproduceYou can compile and run attached wrong_triangulation.cpp to reproduce the bug.

Draw script reproducing the problem:
bsplinesurf s 2 4 0.0 3 0.34 1 0.67 1 1.0 3 1 2 0.0 2 1.0 2 10 0 0 1 6 0 0 1 4 0 0 1 2 0 0 1 0 0 0 1 10 5 0 1 6 5 0 1 4 5 0 1 1.5 9 0 1 0 5 0 1
mkface f s
incmesh f 1
trinfo f

#This shape contains 2 triangles.
# 4 nodes.
#Maximal deflection 0.65883450744480032
TagsNo tags attached.
Test case numberbugs mesh(016) bug24127
Attached Fileszip file icon triangulation.zip (82,873 bytes) 2013-08-26 16:01

- Relationships
related to 0024959closedbugmaster Open CASCADE GCPnts_TangentialDeflection does not implement functionality by its meaning in case of BSpline with local splash 

-  Notes
(0032249)
oan (developer)
2014-09-26 15:58

Dear Bugmaster,

please create corresponding test case and check that current behavior of BRepMesh is correct and produces appropriate mesh.

Note that behavior should be checked using fix for issue 0024959.
(0032263)
abv (manager)
2014-09-26 17:11

Looks Ok on current master (90 triangles)
(0032843)
git (administrator)
2014-10-08 20:05

Branch CR24127 has been created by mkv.

SHA-1: b1721cb348ed97574a2e3ac3e3ab17467d586aef


Detailed log of new commits:

Author: mkv
Date: Wed Oct 8 20:05:06 2014 +0400

    0024127: Mesh generated with BRepMesh_FastDiscret does not reflect a deflection setting \n Test case for issue CR24127
(0032846)
mkv (tester)
2014-10-08 20:28

Dear BugMaster,
Test cases bugs/mesh(016)/bug24127 is created and pushed to new branch CR24127 of occt git-repository.
Test cases bugs/mesh(016)/bug24127 is OK.
(0033421)
git (administrator)
2014-10-21 16:42

Branch CR24127 has been deleted by inv.

SHA-1: b1721cb348ed97574a2e3ac3e3ab17467d586aef

- Related Changesets
occt: master 432a8df0
Timestamp: 2014-10-08 16:05:06
Author: mkv
Committer: bugmaster
Details ] Diff ]
0024127: Mesh generated with BRepMesh_FastDiscret does not reflect a deflection setting \n Test case for issue CR24127
add - tests/bugs/mesh/bug24127 Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-08-26 16:01 Vitezslav Zajic New Issue
2013-08-26 16:01 Vitezslav Zajic Assigned To => oan
2013-08-26 16:01 Vitezslav Zajic File Added: triangulation.zip
2014-05-21 13:10 abv Assigned To oan => azn
2014-05-21 13:10 abv Status new => assigned
2014-05-21 13:10 abv Target Version => 6.8.0
2014-05-26 12:57 oan Steps to Reproduce Updated View Revisions
2014-05-26 15:17 oan Relationship added related to 0024959
2014-09-26 12:09 abv Assigned To azn => oan
2014-09-26 15:58 oan Assigned To oan => bugmaster
2014-09-26 15:58 oan Note Added: 0032249
2014-09-26 17:11 abv Note Added: 0032263
2014-09-26 17:11 abv Status assigned => feedback
2014-09-29 15:47 bugmaster Assigned To bugmaster => mkv
2014-10-08 20:05 git Note Added: 0032843
2014-10-08 20:28 mkv Note Added: 0032846
2014-10-08 20:28 mkv Assigned To mkv => bugmaster
2014-10-08 20:28 mkv Status feedback => tested
2014-10-08 20:29 mkv Test case number => bugs mesh(016) bug24127
2014-10-13 17:52 bugmaster Changeset attached => occt master 432a8df0
2014-10-13 17:52 bugmaster Status tested => verified
2014-10-13 17:52 bugmaster Resolution open => fixed
2014-10-21 16:42 git Note Added: 0033421
2014-11-11 12:43 user533 Fixed in Version => 6.8.0
2014-11-11 13:01 user533 Status verified => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker