View Issue Details

IDProjectCategoryView StatusLast Update
0032253CommunityOCCT:Meshpublic2023-01-21 20:46
Reporterdrazmyslovich Assigned Tobugmaster  
PrioritynormalSeveritymajor 
Status closedResolutionwon't fix 
Product Version7.4.0 
Target Version7.6.0 
Summary0032253: Mesh - The refactored Mesher fails to mesh correctly scaled (planar) faces
DescriptionThis is a regression of the refactored Mesher introduced in 7.4.0 release. The refactored mesher incorrectly meshes the scaled faces.

Check the images and the model attached.
Steps To ReproduceXOpen failed_scaling.xbf a
vinit
XDisplay a -dispMode 1
TagsNo tags attached.
Test case number

Attached Files

  • failed_scaling.xbf (27,471 bytes)
  • Expected.PNG (53,354 bytes)
  • Current_master.PNG (46,867 bytes)
  • 0001-0032253-Fix-the-incorrect-parameters-for-end-points-.patch (1,901 bytes)
  • 0001-0032253-Mesh-The-refactored-Mesher-fails-to-mesh-cor.patch (1,776 bytes)
  • 0002-0032253-Mesh-The-refactored-Mesher-fails-to-mesh-cor.patch (1,263 bytes)

Relationships

related to 0027457 closedifv Open CASCADE Modeling - Raise exception if scaled transformation is used for shape location 
child of 0026106 closedbugmaster Open CASCADE BRepMesh - revision of data model 

Activities

drazmyslovich

2021-03-27 21:36

developer  

failed_scaling.xbf (27,471 bytes)

drazmyslovich

2021-03-27 21:39

developer  

Expected.PNG (53,354 bytes)

drazmyslovich

2021-03-27 21:41

developer  

Current_master.PNG (46,867 bytes)

git

2021-03-27 21:42

administrator   ~0099793

Branch CR0032253 has been created by drazmyslovich.

SHA-1: 35df88a593acbf196981c3a85b96c533a868708a


Detailed log of new commits:

Author: Dzmitry Razmyslovich
Date: Sat Mar 27 19:38:16 2021 +0100

    0032253: Fix the incorrect parameters for end points - get parameters directly from curve instead of relying on the parameter provider

drazmyslovich

2021-03-27 21:45

developer   ~0099794

Last edited: 2021-03-27 21:46

Hello, Oleg.

I am not sure if the fix I propose is the best one. Most probably, it is better to fix the parameter provider to gracefully handle the scaled (at least) planes. As far as I understand, currently for planes the parameters provider just projects a point on plane without taking the scaling into account which results in an error.

My fix demonstrates where the problem is located and fixes the problem in my particular case, therefore I haven't investigated it further.

Regards,
Dima

msv

2021-03-27 22:45

developer   ~0099797

Hello Dmitry,

Please see the bug 0027457. We are going to forbid storing a location with scale factor in shapes. Instead, when one wants to scale a shape he should use the algorithm BRepBuilderAPI_Transform that will modify the geometry.

Even if your current patch fixes this particular problem with a scaled shape, you may face the same-cause problem in many other OCCT algorithms.

So, please think about using BRepBuilderAPI_Transform instead of patching OCCT codes against this issue.

Regards,
Mikhail

drazmyslovich

2021-03-29 11:57

developer   ~0099807

Hello, Mikhail,

thank you very much for providing this valuable information. We will adapt our code to have no scaling in the transformation matrices.

Do you also plan in the context of 0027457 to add some compatibility code for 'old' native occ files, which contain shapes with scaling transforms? Or should we develop such compatibility code ourselves? Our customers have definitely tons of projects with such xbf files.

Regards,
Dima

msv

2021-03-29 12:05

developer   ~0099808

I will pass this wish into that ticket. We will try to consider it.

msv

2021-03-29 12:06

developer   ~0099809

Dear bugmaster, please close this bug.

kgv

2021-03-29 12:29

developer   ~0099811

Oleg,

could you please take a look onto proposed patch and comment if it looks reasonable / should be moved to another location?

I would prefer integrating a fix into BRepMesh if it would not require dramatic rewriting, as preventing scale factor in TopLoc_Location by 0027457 could take much time and we do not have yet elaborated when and how it will be raised.

oan

2021-03-29 15:05

developer   ~0099818

DC,

Patch looks appropriate for this particular issue.
As I can see, in general case there are only two points for each edge in this case and modification works pretty well.

However, personally, I am concerned about scaled non-planar cases, i.e. NURBS when more than two points exist for each edge.

Dima, do you have any use cases of such shapes?

drazmyslovich

2021-03-30 12:10

developer   ~0099859

I will check and either find such a model or ask to create one.

git

2021-04-01 17:32

administrator   ~0099960

Branch CR32253 has been created by oan.

SHA-1: 41f9783949a9a3037e582cc943d342068d226237


Detailed log of new commits:

Author: oan
Date: Wed Mar 31 14:54:00 2021 +0300

    0032253: Mesh - The refactored Mesher fails to mesh correctly scaled (planar) faces
    
    IMeshTools_ShapeExplorer: process face without any transformation

git

2021-04-01 18:40

administrator   ~0099962

Branch CR32253 has been updated forcibly by oan.

SHA-1: f181545a11e1486c9842f8fed11fe3daaafbacd5

git

2021-04-01 20:03

administrator   ~0099972

Branch CR32253 has been updated forcibly by oan.

SHA-1: 6c403f08f06dc5adcd57bade3c77b3af4d0a0295

git

2021-04-02 11:46

administrator   ~0099982

Branch CR32253 has been updated by oan.

SHA-1: c5bb75b75460cde8dfb5e027a081aa344a85b3be


Detailed log of new commits:

Author: oan
Date: Fri Apr 2 11:46:35 2021 +0300

    0032253: Mesh - The refactored Mesher fails to mesh correctly scaled (planar) faces
    
    IMeshTools_ShapeExplorer: use transformation without scale factor

git

2021-04-02 14:13

administrator   ~0099990

Branch CR32253_base has been created by oan.

SHA-1: 6c403f08f06dc5adcd57bade3c77b3af4d0a0295


No new revisions were added by this update.

oan

2021-04-02 16:00

developer   ~0100002

Hello Dima,

I have checked your patch and added two alternative variants to fix the problem on common level (see commits in CR32253_base and CR32253).

However, all of them contain regressions due to which they could not be integrated yet.

The most stable is CR0032253 - leads mostly to absence of some triangles in the mesh along the frontier edges.

CR32253_base - it contains mostly async edges problem when points related to shared edges do not coincide on adjacent faces. In some specific cases where face has huge gaps between ends of the edges, triangulation could be absent.

CR32253 - produces the most number of regressions of the same nature as previous one.

oan

2021-04-02 16:02

developer   ~0100003

Mikhail,

could you please have a look at the testing results for the aforementioned changes:

CR0032253:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/master-CR0032253-OAN/view/COMPARE/

CR32253_base:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/master-CR32253_base_OAN/view/COMPARE/

CR32253:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/master-CR32253-OAN/view/COMPARE/

msv

2021-04-02 16:42

developer   ~0100004

According to the test results, none of the proposed patches passed the tests.

oan

2021-04-02 16:54

developer   ~0100005

Yes, what do you think about further steps, should we wait for the patch 0027457 as a common solution or, maybe, some ideas regarding finalization of this one?

msv

2021-04-02 16:57

developer   ~0100007

So, I again propose to close this bug.

kgv

2021-04-02 17:07

developer   ~0100009

Last edited: 2021-04-02 17:08

> So, I again propose to close this bug.
OK, if solving the issue requires unjustified efforts for use case, that we would like to disallow at all, then it looks unreasonable pushing it forward.

msv

2021-04-05 10:39

developer   ~0100099

Dear bugmaster, please close this bug.

kgv

2021-04-05 12:04

developer  

0001-0032253-Fix-the-incorrect-parameters-for-end-points-.patch (1,901 bytes)

kgv

2021-04-05 12:06

developer  

0001-0032253-Mesh-The-refactored-Mesher-fails-to-mesh-cor.patch (1,776 bytes)

kgv

2021-04-05 12:06

developer  

0002-0032253-Mesh-The-refactored-Mesher-fails-to-mesh-cor.patch (1,263 bytes)

drazmyslovich

2021-04-06 09:47

developer   ~0100112

Dear Mikhail, Oleg and kgv,

thanks a lot for looking into the issue, considering my fix and proposing other fixes. We will then fix the issue on our end avoiding the scaled shapes to be produced.

Regards,
Dima

git

2021-04-14 20:25

administrator   ~0100300

Branch CR32253_base has been deleted by oan.

SHA-1: 6c403f08f06dc5adcd57bade3c77b3af4d0a0295

git

2021-09-05 23:25

administrator   ~0103836

Branch CR0032253 has been deleted by kgv.

SHA-1: 35df88a593acbf196981c3a85b96c533a868708a

git

2021-09-23 16:09

administrator   ~0104318

Branch CR32253 has been created by oleg.korchagin@opencascade.com in OCCT Products internal repository.

SHA-1: b3e61f2e8a40e3a239e4f4c50184765090375894


git

2021-09-27 13:27

administrator   ~0104396

Branch CR32253 has been updated by oleg.korchagin@opencascade.com in OCCT Products internal repository.

SHA-1: 6e39bd35f39e4c61db597c0bf5f732fed3531c65


git

2023-01-21 20:46

administrator   ~0112946

Branch CR32253 has been deleted by vglukhik.

SHA-1: c5bb75b75460cde8dfb5e027a081aa344a85b3be

Issue History

Date Modified Username Field Change
2021-03-27 21:36 drazmyslovich New Issue
2021-03-27 21:36 drazmyslovich Assigned To => oan
2021-03-27 21:36 drazmyslovich File Added: failed_scaling.xbf
2021-03-27 21:39 drazmyslovich File Added: Expected.PNG
2021-03-27 21:41 drazmyslovich File Added: Current_master.PNG
2021-03-27 21:42 git Note Added: 0099793
2021-03-27 21:42 kgv Relationship added child of 0026106
2021-03-27 21:45 drazmyslovich Note Added: 0099794
2021-03-27 21:45 drazmyslovich Status new => resolved
2021-03-27 21:46 drazmyslovich Note Edited: 0099794
2021-03-27 22:38 msv Relationship added related to 0027457
2021-03-27 22:45 msv Note Added: 0099797
2021-03-27 22:46 msv Assigned To oan => drazmyslovich
2021-03-27 22:46 msv Status resolved => feedback
2021-03-29 11:57 drazmyslovich Note Added: 0099807
2021-03-29 11:57 drazmyslovich Assigned To drazmyslovich => msv
2021-03-29 12:05 msv Note Added: 0099808
2021-03-29 12:06 msv Note Added: 0099809
2021-03-29 12:06 msv Assigned To msv => bugmaster
2021-03-29 12:06 msv Resolution open => won't fix
2021-03-29 12:29 kgv Note Added: 0099811
2021-03-29 12:29 kgv Assigned To bugmaster => oan
2021-03-29 12:29 kgv Status feedback => resolved
2021-03-29 12:29 kgv Summary The refactored Mesher fails to mesh correctly scaled (planar) faces => Mesh - The refactored Mesher fails to mesh correctly scaled (planar) faces
2021-03-29 15:05 oan Note Added: 0099818
2021-03-30 12:10 drazmyslovich Note Added: 0099859
2021-04-01 17:32 git Note Added: 0099960
2021-04-01 18:40 git Note Added: 0099962
2021-04-01 20:03 git Note Added: 0099972
2021-04-02 11:46 git Note Added: 0099982
2021-04-02 14:13 git Note Added: 0099990
2021-04-02 16:00 oan Note Added: 0100002
2021-04-02 16:02 oan Note Added: 0100003
2021-04-02 16:03 oan Assigned To oan => msv
2021-04-02 16:42 msv Note Added: 0100004
2021-04-02 16:54 oan Note Added: 0100005
2021-04-02 16:57 msv Note Added: 0100007
2021-04-02 16:57 msv Assigned To msv => kgv
2021-04-02 16:57 msv Status resolved => feedback
2021-04-02 17:07 kgv Note Added: 0100009
2021-04-02 17:08 kgv Note Edited: 0100009
2021-04-05 09:58 kgv Assigned To kgv => msv
2021-04-05 10:39 msv Note Added: 0100099
2021-04-05 10:39 msv Assigned To msv => bugmaster
2021-04-05 12:04 kgv File Added: 0001-0032253-Fix-the-incorrect-parameters-for-end-points-.patch
2021-04-05 12:06 kgv File Added: 0001-0032253-Mesh-The-refactored-Mesher-fails-to-mesh-cor.patch
2021-04-05 12:06 kgv File Added: 0002-0032253-Mesh-The-refactored-Mesher-fails-to-mesh-cor.patch
2021-04-06 09:47 drazmyslovich Note Added: 0100112
2021-04-07 16:01 bugmaster Status feedback => closed
2021-04-14 20:25 git Note Added: 0100300
2021-09-05 23:25 git Note Added: 0103836
2021-09-23 16:09 git Note Added: 0104318
2021-09-27 13:27 git Note Added: 0104396
2023-01-21 20:46 git Note Added: 0112946