View Issue Details

IDProjectCategoryView StatusLast Update
0024127CommunityOCCT:Meshpublic2014-11-11 13:01
ReporterVitezslav Zajic Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.6.0 
Target Version6.8.0Fixed in Version6.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 Files

  • triangulation.zip (82,873 bytes)

Relationships

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

Activities

Vitezslav Zajic

2013-08-26 16:01

reporter  

triangulation.zip (82,873 bytes)

oan

2014-09-26 15:58

developer   ~0032249

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.

abv

2014-09-26 17:11

manager   ~0032263

Looks Ok on current master (90 triangles)

git

2014-10-08 20:05

administrator   ~0032843

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

mkv

2014-10-08 20:28

tester   ~0032846

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.

git

2014-10-21 16:42

administrator   ~0033421

Branch CR24127 has been deleted by inv.

SHA-1: b1721cb348ed97574a2e3ac3e3ab17467d586aef

Related Changesets

occt: master 432a8df0

2014-10-08 16:05:06

mkv


Committer: bugmaster Details Diff
0024127: Mesh generated with BRepMesh_FastDiscret does not reflect a deflection setting \n Test case for issue CR24127 Affected Issues
0024127
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
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 aiv Fixed in Version => 6.8.0
2014-11-11 13:01 aiv Status verified => closed