View Issue Details

IDProjectCategoryView StatusLast Update
0031251CommunityOCCT:Meshpublic2022-07-27 11:19
Reporterdrazmyslovich Assigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.5.0Fixed in Version7.5.0 
Summary0031251: Mesh - Add a parameter for IncrementalMesh to ignore face tolerance for face deflection
DescriptionIn our use case of the mesh representation of CAD model, it is highly important, that the desired linear deflection is kept as good as possible.
Unfortunately, often the files imported from 3rd party sources specify too high face tolerances which results in higher linear deflection for face.
Here I propose to add an additional flag to meshing parameters to enforce the linear deflection (or in other words to ignore face tolerance)
Steps To ReproduceFor example try to import attached step file and mesh using linear deflection 0.004 and angular deflection 0.244 The final deviation from CAD to mesh shows that 67% of mesh surface is over 0.004 distance from CAD surface...

This is maybe kind of acceptable for text based formats like STEP, but enforcing the mesh deflection improves reasonably the final result.
TagsNo tags attached.
Test case number

Attached Files

  • Albatros d2 elisa a.STEP (1,092,666 bytes)

Relationships

related to 0025287 closedbugmaster Community BRepMesh_IncrementalMesh produces (way) out of tolerance mesh 

Activities

git

2019-12-17 21:20

administrator   ~0089612

Branch CR31251 has been created by drazmyslovich.

SHA-1: 80048edde5912d20a36efa69cf63be3933b91d79


Detailed log of new commits:

Author: razmyslovich
Date: Tue Dec 17 19:17:17 2019 +0100

    0031251: Add a new meshing parameter to enforce face linear deflection

drazmyslovich

2019-12-17 21:36

developer  

Albatros d2 elisa a.STEP (1,092,666 bytes)

git

2019-12-20 19:33

administrator   ~0089685

Branch CR31251 has been updated by oan.

SHA-1: 1a7a2b8a5b7398e9a5ee81bf4e361c2be6160ec4


Detailed log of new commits:

Author: oan
Date: Thu Dec 19 13:14:23 2019 +0300

    #Parameter has been renamed to TightFit. Added test case.
    
    New parameter -tight has been added to incmesh command.

oan

2019-12-23 11:01

developer   ~0089701

Hello Dima!

Thank you a lot for your patch.
As for non-regression tests, they're OK, given that I have renamed parameter to TightFit. Maybe, it is as ambiguous as ForceDeflection due to dual nature of face and edge deflection parameters, but IMHO it would explain results of adjustment of face deflection better.

Best regards,
Oleg.

oan

2019-12-23 11:06

developer   ~0089702

Dear Mikhail,

test results are available by the following link:
http://jenkins-test-12.nnov.opencascade.com/view/CR31251-master-OAN/view/COMPARE/

Please review.

By the way, what if we make new behaviour default without any additional parameter since its logic seems correct for general case?

msv

2019-12-23 15:15

developer   ~0089713

For me, ForceDeflection name is more understandable and its implementation follows its name (even with your implementation version).

Bug in your version is that you pass face tolerance (absolute value) to the function ComputeAbsoluteDeflection() that treats it as relative (in the case of theParameters.Relative is true).

As for the new test, I see the following lines:

incmesh result 0.004 -a 14 -tight
checktrinfo result -tri 290474 -nod 149903 -defl 0.041867171925924547

It means that we request deflection 0.004, but obtain on output 0.04, that is ten times worse than requested. Is it unavoidable, or can we do something more to achieve the requested value?

msv

2019-12-23 15:19

developer   ~0089714

We cannot do this the default behavior. For an shape with honest tolerances, if some defect in the shape was neglected using a big tolerance, the algorithm may fail discretizing such shape if it ignores the tolerance of the shape.

oan

2019-12-23 15:50

developer   ~0089715

Last edited: 2019-12-23 16:03

As for face tolerance that has been taken into account, I thought that usage of deflections smaller than face tolerance (given that face is valid) is illogical as far as 3D point could be within specified tolerance from real surface.

msv

2019-12-23 15:51

developer   ~0089716

Agreed to use the term ForceFaceDeflection.
If it is true then exclude face tolerance as well as tolerances of its edges/vertices from consideration when assigning the requested deflection for the inner part of the face.
Face tolerance as it is has no any geometrical sense for the purpose of meshing.

git

2019-12-23 16:05

administrator   ~0089717

Branch CR31251 has been updated forcibly by oan.

SHA-1: 7f67c023fc0880b6c328029eb938e39dc520b3b9

oan

2019-12-23 17:03

developer   ~0089721

Last edited: 2019-12-23 17:03

>> It means that we request deflection 0.004, but obtain on output 0.04, that is ten times worse than requested. Is it unavoidable, or can we do something more to achieve the requested value?

Currently, yes, it is unavoidable. Such a huge tolerance is caused by points on edges and segments built upon them. Here, mesh optimization ends up after 11 iterations with value 0.04579460790575135 on some face and stores it as the final result.

As a possible solution, user-defined deflection passed as a parameter to the algorithm could be used as is, without reference to edge tolerance, given that it is also has no geometrical sence in context of meshing.

git

2019-12-23 18:00

administrator   ~0089722

Branch CR31251 has been updated forcibly by oan.

SHA-1: 144950507c787fb2ecb48fda16eab86e30fb2418

git

2019-12-24 11:27

administrator   ~0089724

Branch CR31251 has been updated forcibly by oan.

SHA-1: 187a444f3332d905d95b93ed4ef4150c571ba16c

oan

2019-12-24 11:28

developer   ~0089725

Test results are available by the following link:
http://jenkins-test-12.nnov.opencascade.com/view/CR31251-master-OAN/view/COMPARE/

Latest commit contains corrected test case mentioned in the results.

msv

2019-12-24 11:56

developer   ~0089727

tests/bugs/mesh/bug31251 is failed in the result.

oan

2019-12-24 12:22

developer   ~0089730

Please see comment given in previous note.

This fail is due to rebase.

git

2019-12-24 14:11

administrator   ~0089736

Branch CR31251 has been updated forcibly by oan.

SHA-1: 27a8ce133db8c99257f48f86a7730467bd1f11f9

msv

2019-12-25 10:02

developer   ~0089746

Reviewed.

git

2019-12-28 15:24

administrator   ~0089802

Branch CR31251 has been deleted by inv.

SHA-1: 27a8ce133db8c99257f48f86a7730467bd1f11f9

Related Changesets

occt: master 0da2ecac

2019-12-17 18:17:17

razmyslovich


Committer: bugmaster Details Diff
0031251: Add a new meshing parameter to enforce face linear deflection

Parameter has been renamed to ForceFaceDeflection. Added test case.

New parameter -force_face_def has been added to incmesh command.
Affected Issues
0031251
mod - src/BRepMesh/BRepMesh_Deflection.cxx Diff File
mod - src/BRepMesh/BRepMesh_ShapeTool.cxx Diff File
mod - src/IMeshTools/IMeshTools_Parameters.hxx Diff File
mod - src/MeshTest/MeshTest.cxx Diff File
add - tests/bugs/mesh/bug31251 Diff File

Issue History

Date Modified Username Field Change
2019-12-17 21:18 drazmyslovich New Issue
2019-12-17 21:18 drazmyslovich Assigned To => drazmyslovich
2019-12-17 21:20 git Note Added: 0089612
2019-12-17 21:27 kgv Summary Add a parameter for IncrementalMesh to ignore face tolerance for face deflection => Mesh - Add a parameter for IncrementalMesh to ignore face tolerance for face deflection
2019-12-17 21:36 drazmyslovich Assigned To drazmyslovich => oan
2019-12-17 21:36 drazmyslovich Status new => resolved
2019-12-17 21:36 drazmyslovich Steps to Reproduce Updated
2019-12-17 21:36 drazmyslovich File Added: Albatros d2 elisa a.STEP
2019-12-20 19:33 git Note Added: 0089685
2019-12-20 20:07 oan Relationship added related to 0025287
2019-12-23 11:01 oan Note Added: 0089701
2019-12-23 11:06 oan Note Added: 0089702
2019-12-23 11:06 oan Assigned To oan => msv
2019-12-23 11:06 oan Status resolved => feedback
2019-12-23 15:15 msv Note Added: 0089713
2019-12-23 15:16 msv Assigned To msv => oan
2019-12-23 15:16 msv Status feedback => assigned
2019-12-23 15:19 msv Note Added: 0089714
2019-12-23 15:50 oan Note Added: 0089715
2019-12-23 15:51 msv Note Added: 0089716
2019-12-23 16:02 oan Note Edited: 0089715
2019-12-23 16:03 oan Note Edited: 0089715
2019-12-23 16:05 git Note Added: 0089717
2019-12-23 17:03 oan Note Added: 0089721
2019-12-23 17:03 oan Note Edited: 0089721
2019-12-23 18:00 git Note Added: 0089722
2019-12-24 11:27 git Note Added: 0089724
2019-12-24 11:28 oan Note Added: 0089725
2019-12-24 11:28 oan Assigned To oan => msv
2019-12-24 11:28 oan Status assigned => resolved
2019-12-24 11:56 msv Note Added: 0089727
2019-12-24 11:56 msv Assigned To msv => oan
2019-12-24 11:56 msv Status resolved => assigned
2019-12-24 12:22 oan Note Added: 0089730
2019-12-24 12:22 oan Assigned To oan => msv
2019-12-24 12:22 oan Status assigned => feedback
2019-12-24 12:42 msv Assigned To msv => oan
2019-12-24 12:42 msv Status feedback => assigned
2019-12-24 14:11 git Note Added: 0089736
2019-12-24 16:16 oan Assigned To oan => msv
2019-12-24 16:16 oan Status assigned => resolved
2019-12-25 10:02 msv Note Added: 0089746
2019-12-25 10:02 msv Assigned To msv => bugmaster
2019-12-25 10:02 msv Status resolved => reviewed
2019-12-28 13:37 bugmaster Changeset attached => occt master 0da2ecac
2019-12-28 13:37 bugmaster Status reviewed => verified
2019-12-28 13:37 bugmaster Resolution open => fixed
2019-12-28 15:24 git Note Added: 0089802
2020-12-02 16:41 emo Fixed in Version => 7.5.0
2020-12-02 17:12 emo Status verified => closed