MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031251Community[OCCT] OCCT:Meshpublic2019-12-17 21:182019-12-28 15:24
Reporterdrazmyslovich 
Assigned Tobugmaster 
PrioritynormalSeverityfeature 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0*Fixed in Version 
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? file icon Albatros d2 elisa a.STEP (1,092,666 bytes) 2019-12-17 21:36

- Relationships
related to 0025287verifiedbugmaster BRepMesh_IncrementalMesh produces (way) out of tolerance mesh 

-  Notes
(0089612)
git (administrator)
2019-12-17 21:20

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
(0089685)
git (administrator)
2019-12-20 19:33

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.

(0089701)
oan (developer)
2019-12-23 11:01

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.
(0089702)
oan (developer)
2019-12-23 11:06

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?
(0089713)
msv (developer)
2019-12-23 15:15

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?
(0089714)
msv (developer)
2019-12-23 15:19

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.
(0089715)
oan (developer)
2019-12-23 15:50
edited on: 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.

(0089716)
msv (developer)
2019-12-23 15:51

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.
(0089717)
git (administrator)
2019-12-23 16:05

Branch CR31251 has been updated forcibly by oan.

SHA-1: 7f67c023fc0880b6c328029eb938e39dc520b3b9
(0089721)
oan (developer)
2019-12-23 17:03
edited on: 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.

(0089722)
git (administrator)
2019-12-23 18:00

Branch CR31251 has been updated forcibly by oan.

SHA-1: 144950507c787fb2ecb48fda16eab86e30fb2418
(0089724)
git (administrator)
2019-12-24 11:27

Branch CR31251 has been updated forcibly by oan.

SHA-1: 187a444f3332d905d95b93ed4ef4150c571ba16c
(0089725)
oan (developer)
2019-12-24 11:28

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.
(0089727)
msv (developer)
2019-12-24 11:56

tests/bugs/mesh/bug31251 is failed in the result.
(0089730)
oan (developer)
2019-12-24 12:22

Please see comment given in previous note.

This fail is due to rebase.
(0089736)
git (administrator)
2019-12-24 14:11

Branch CR31251 has been updated forcibly by oan.

SHA-1: 27a8ce133db8c99257f48f86a7730467bd1f11f9
(0089746)
msv (developer)
2019-12-25 10:02

Reviewed.
(0089802)
git (administrator)
2019-12-28 15:24

Branch CR31251 has been deleted by inv.

SHA-1: 27a8ce133db8c99257f48f86a7730467bd1f11f9

- Related Changesets
occt: master 0da2ecac
Timestamp: 2019-12-17 18:17:17
Author: 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.
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 View Revisions
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 View Revisions
2019-12-23 16:03 oan Note Edited: 0089715 View Revisions
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 View Revisions
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


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker