Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032253Community[OCCT] OCCT:Meshpublic2021-03-27 21:362021-04-14 20:25
Assigned Tobugmaster 
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version[OCCT] 7.4.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
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
XDisplay a -dispMode 1
TagsNo tags attached.
Test case number
Attached Files? file icon failed_scaling.xbf (27,471 bytes) 2021-03-27 21:36
png file icon Expected.PNG (53,354 bytes) 2021-03-27 21:39
png file icon Current_master.PNG (46,867 bytes) 2021-03-27 21:41
patch file icon 0001-0032253-Fix-the-incorrect-parameters-for-end-points-.patch (1,901 bytes) 2021-04-05 12:04
patch file icon 0001-0032253-Mesh-The-refactored-Mesher-fails-to-mesh-cor.patch (1,776 bytes) 2021-04-05 12:06
patch file icon 0002-0032253-Mesh-The-refactored-Mesher-fails-to-mesh-cor.patch (1,263 bytes) 2021-04-05 12:06

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

-  Notes
git (administrator)
2021-03-27 21:42

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 (developer)
2021-03-27 21:45
edited on: 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.


msv (developer)
2021-03-27 22:45

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.

drazmyslovich (developer)
2021-03-29 11:57

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.

msv (developer)
2021-03-29 12:05

I will pass this wish into that ticket. We will try to consider it.
msv (developer)
2021-03-29 12:06

Dear bugmaster, please close this bug.
kgv (developer)
2021-03-29 12:29


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 (developer)
2021-03-29 15:05


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 (developer)
2021-03-30 12:10

I will check and either find such a model or ask to create one.
git (administrator)
2021-04-01 17:32

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 (administrator)
2021-04-01 18:40

Branch CR32253 has been updated forcibly by oan.

SHA-1: f181545a11e1486c9842f8fed11fe3daaafbacd5
git (administrator)
2021-04-01 20:03

Branch CR32253 has been updated forcibly by oan.

SHA-1: 6c403f08f06dc5adcd57bade3c77b3af4d0a0295
git (administrator)
2021-04-02 11:46

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 (administrator)
2021-04-02 14:13

Branch CR32253_base has been created by oan.

SHA-1: 6c403f08f06dc5adcd57bade3c77b3af4d0a0295

No new revisions were added by this update.
oan (developer)
2021-04-02 16:00

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 (developer)
2021-04-02 16:02


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

CR0032253: [^]

CR32253_base: [^]

CR32253: [^]
msv (developer)
2021-04-02 16:42

According to the test results, none of the proposed patches passed the tests.
oan (developer)
2021-04-02 16:54

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 (developer)
2021-04-02 16:57

So, I again propose to close this bug.
kgv (developer)
2021-04-02 17:07
edited on: 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 (developer)
2021-04-05 10:39

Dear bugmaster, please close this bug.
drazmyslovich (developer)
2021-04-06 09:47

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.

git (administrator)
2021-04-14 20:25

Branch CR32253_base has been deleted by oan.

SHA-1: 6c403f08f06dc5adcd57bade3c77b3af4d0a0295

- 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 View Revisions
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 View Revisions
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

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker