MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032264Community[OCCT] OCCT:Data Exchangepublic2021-03-29 18:382021-04-14 11:44
Reportergrey.christoforo_170262 
Assigned Tobugmaster 
PrioritynormalSeveritymajor 
StatusverifiedResolutionfixed 
PlatformLinuxOSArch LinuxOS Version5.11.10
Product Version[OCCT] 7.5.0 
Target Version[OCCT] 7.5.2Fixed in Version 
Summary0032264: Data Exchange - STEP exporter generates bad geometry [REGRESSION since 7.4.0]
DescriptionToday (v7.5.1), the step file export pathway generates incorrect geometry. This is not a problem in 7.4.0. I think it's also in 7.5.0.

Steps To Reproduce- Use version 7.5.1 (I think 7.5.0 also shows the bug).
- Run the following draw test harness script with the attached good_geometry.brep file:

##### DRAWEXE.script Begin #####
pload XDE MODELING VISUALIZATION

vinit View1
restore good_geometry.brep good

testwritestep bad.stp good
testreadstep  bad.stp bad
vdisplay -dispMode 1 bad good
vsetlocation good 6 0 0
vfit
##### DRAWEXE.script End #####


- Then run it like this: DRAWEXE -i -f DRAWEXE.script

You'll now have a file on your disk called bad.stp which will contain incorrect geometry (as compared with good_geometry.brep). Several boolean subtractions have somehow turned into unions!
Additional information
and documentation updates
https://i.ibb.co/Xbk8HXb/Screenshot-from-2021-03-29-16-31-41.png [^]

Shows the bad (step exported and reimported) geometry on the left and the good (original .brep) file on the right.

Also see downstream bug reports:
https://github.com/CadQuery/cadquery/issues/697 [^]
https://tracker.freecadweb.org/view.php?id=4610 [^]
TagsNo tags attached.
Test case numberbugs/step/bug32264
Attached Files? file icon good_geometry.brep (24,283 bytes) 2021-03-29 18:38
png file icon Screenshot-from-2021-03-29-16-31-41.png (9,584 bytes) 2021-03-30 11:46
? file icon step_740_OK.stp (92,933 bytes) 2021-03-30 11:52
? file icon step_750_KO.stp (92,933 bytes) 2021-03-30 11:52
? file icon bug32264.brep (24,283 bytes) 2021-03-31 11:44

- Relationships
has duplicate 0032273closedbugmaster Community Data Exchange - STEP Export producing bad geometry from BREP Files 
related to 0032278feedbackekrylova Open CASCADE Data Exchange - Incorrect saving of shape in STEP. 

-  Notes
(0099858)
kgv (developer)
2021-03-30 12:00

This test case is a regression after a patch for #0031301.
(0099860)
grey.christoforo_170262 (reporter)
2021-03-30 12:13

What's #0031301? I can't seem to resolve that number to anything (although maybe I'm just bad at using this site and too accustomed to github!).

Could you point to a commit hash?
(0099861)
kgv (developer)
2021-03-30 12:23
edited on: 2021-03-30 12:24

> What's 0031301?
This is a reference to another bug, which has fixed another STEP export issue.
It is inaccessible to you, but you can find related git commit in log using this number:
https://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff;h=7ef1f9b7c1d9301c158a593dc5facb5a33450318 [^]

(0099862)
grey.christoforo_170262 (reporter)
2021-03-30 12:45

Ah, thanks for the link!

This regression must have come from changes between the 7.4.0 and the 7.5.0 releases, right?
(0099864)
kgv (developer)
2021-03-30 12:50

> This regression must have come from changes between the 7.4.0 and the 7.5.0 releases, right?
Yes.
(0099866)
grey.christoforo_170262 (reporter)
2021-03-30 12:53

I'll see if I can help a bit with bisecting it.
(0099868)
kgv (developer)
2021-03-30 13:44
edited on: 2021-03-30 13:44

> I'll see if I can help a bit with bisecting it.
Thanks for help, but there is nothing to bisect - I've already identified exact commit.
So at this point it is necessary to analyze new test case and find the way to handle both scenarios.
Of course, you may just revert the commit, which would fix specific case, but this will lead to issues in other scenarios (which patch has fixed).

(0099869)
grey.christoforo_170262 (reporter)
2021-03-30 14:17

> I've already identified exact commit.
All makes sense to me now. I wasn't reading that commit correctly. Thanks for working so quickly to target the issue! I think I'll see what happens if I revert that commit. Seems like I should be watching out for side effects impacting very short/small edges in my step exports after reverting this.
(0099873)
grey.christoforo_170262 (reporter)
2021-03-30 15:00
edited on: 2021-03-31 15:40

I can confirm that reverting 7ef1f9b7c1d9301c158a593dc5facb5a33450318 fixes a number of incorrect and corrupted geometry features in __my__ project's step file outputs with no apparent side effects.

Thank you very much kgv! I'll be happy to test whatever final solution comes along in time!

(0099900)
git (administrator)
2021-03-31 11:43

Branch CR32264 has been created by gka.

SHA-1: 056e13b1c067bb4bdd96837ab2ad6a848f3597b9


Detailed log of new commits:

Author: gka
Date: Wed Mar 31 11:43:16 2021 +0300

    0032264: Data Exchange - STEP exporter generates bad geometry [REGRESSION since 7.4.0]
    
    Location of edge is applied to geom curve before analysis of vertices projections
(0099906)
git (administrator)
2021-03-31 13:55

Branch CR32264 has been updated forcibly by gka.

SHA-1: 7f536e166c716605eb625f283779da5f72b0d24f
(0099911)
gka (developer)
2021-03-31 15:44

Results of tests:

http://occt-tests/CR32264-master-gka-OCCT/Windows-64-VC14/summary.html [^]
http://occt-tests/CR32264-master-gka-OCCT/Debian80-64/summary.html [^]
http://occt-tests/CR32264-master-gka-Products/Debian80-64/diff_summary.html [^]
http://occt-tests/CR32264-master-gka-Products/Debian80-64/summary.html [^]
(0099912)
gka (developer)
2021-03-31 15:46

Branch CR32264 is ready to be reviewed.
(0099913)
grey.christoforo_170262 (reporter)
2021-03-31 15:57

I can confirm a patch made from branch CR32264 applies cleanly over the 7.5.1 release source and causes good step file exports with no apparent side effects. It fixes incorrect and corrupted step file geometry I was seeing in several of my projects.

Thank you very much for working so quickly to come up with a solution!
(0099914)
gka (developer)
2021-03-31 16:00

Thank you very much for confirmation.
(0099925)
abv (manager)
2021-03-31 19:31

No remarks, please integrate
(0100025)
bugmaster (administrator)
2021-04-03 11:57

Combination -
OCCT branch : IR-2021-04-02
master SHA - 5e4f263d1cfd948e6a91aa584919bb6d86256a86
a87b7ddc8cb44606b91e3f37113847c3f5f50fdc
Products branch : IR-2021-04-02 SHA - 7cc5f9bb4eb61152ffc5290516ae20c649a33a55
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18055.90000000045 / 18179.810000000525 [-0.68%]
Products
Total CPU difference: 11506.800000000105 / 11565.220000000114 [-0.51%]
Windows-64-VC14:
OCCT
Total CPU difference: 19512.09375 / 19430.5 [+0.42%]
Products
Total CPU difference: 12943.234375 / 12843.765625 [+0.77%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0100064)
git (administrator)
2021-04-03 12:50

Branch CR32264 has been deleted by inv.

SHA-1: 7f536e166c716605eb625f283779da5f72b0d24f

- Related Changesets
occt: master 5e4f263d
Timestamp: 2021-03-31 08:43:16
Author: gka
Committer: bugmaster
Details ] Diff ]
0032264: Data Exchange - STEP exporter generates bad geometry [REGRESSION since 7.4.0]

Location of edge is applied to geom curve before analysis of vertices projections
mod - src/TopoDSToStep/TopoDSToStep_MakeStepEdge.cxx Diff ] File ]
add - tests/bugs/step/bug32264 Diff ] File ]

- Issue History
Date Modified Username Field Change
2021-03-29 18:38 grey.christoforo_170262 New Issue
2021-03-29 18:38 grey.christoforo_170262 Assigned To => gka
2021-03-29 18:38 grey.christoforo_170262 File Added: good_geometry.brep
2021-03-29 19:10 kgv Target Version => 7.6.0*
2021-03-29 19:10 kgv Summary step exporter generates bad geometry => Data Exchange - STEP exporter generates bad geometry
2021-03-29 19:10 kgv Description Updated View Revisions
2021-03-29 19:10 kgv Steps to Reproduce Updated View Revisions
2021-03-29 23:22 au Assigned To gka => au
2021-03-29 23:23 au Assigned To au => gka
2021-03-30 11:46 kgv File Added: Screenshot-from-2021-03-29-16-31-41.png
2021-03-30 11:52 kgv File Added: step_740_OK.stp
2021-03-30 11:52 kgv File Added: step_750_KO.stp
2021-03-30 11:52 kgv Summary Data Exchange - STEP exporter generates bad geometry => Data Exchange - STEP exporter generates bad geometry [REGRESSION since 7.4.0]
2021-03-30 12:00 kgv Relationship added child of 0031301
2021-03-30 12:00 kgv Note Added: 0099858
2021-03-30 12:13 grey.christoforo_170262 Note Added: 0099860
2021-03-30 12:23 kgv Note Added: 0099861
2021-03-30 12:24 kgv Note Edited: 0099861 View Revisions
2021-03-30 12:45 grey.christoforo_170262 Note Added: 0099862
2021-03-30 12:50 kgv Note Added: 0099864
2021-03-30 12:53 grey.christoforo_170262 Note Added: 0099866
2021-03-30 13:44 kgv Note Added: 0099868
2021-03-30 13:44 kgv Note Edited: 0099868 View Revisions
2021-03-30 14:17 grey.christoforo_170262 Note Added: 0099869
2021-03-30 15:00 grey.christoforo_170262 Note Added: 0099873
2021-03-30 15:05 grey.christoforo_170262 Note Edited: 0099873 View Revisions
2021-03-31 11:43 git Note Added: 0099900
2021-03-31 11:44 gka File Added: bug32264.brep
2021-03-31 13:55 git Note Added: 0099906
2021-03-31 14:55 gka Relationship added related to 0032273
2021-03-31 15:40 grey.christoforo_170262 Note Edited: 0099873 View Revisions
2021-03-31 15:44 gka Note Added: 0099911
2021-03-31 15:46 gka Note Added: 0099912
2021-03-31 15:46 gka Assigned To gka => abv
2021-03-31 15:46 gka Status new => resolved
2021-03-31 15:57 grey.christoforo_170262 Note Added: 0099913
2021-03-31 16:00 gka Note Added: 0099914
2021-03-31 19:31 abv Note Added: 0099925
2021-03-31 19:31 abv Assigned To abv => bugmaster
2021-03-31 19:31 abv Status resolved => reviewed
2021-03-31 20:33 abv Target Version 7.6.0* => 7.5.2
2021-04-02 14:12 kgv Relationship added related to 0032278
2021-04-03 11:57 bugmaster Note Added: 0100025
2021-04-03 11:57 bugmaster Status reviewed => tested
2021-04-03 12:06 bugmaster Test case number => bugs/step/bug32264
2021-04-03 12:13 bugmaster Changeset attached => occt master 5e4f263d
2021-04-03 12:13 bugmaster Status tested => verified
2021-04-03 12:13 bugmaster Resolution open => fixed
2021-04-03 12:50 git Note Added: 0100064
2021-04-03 14:11 kgv Relationship replaced has duplicate 0032273
2021-04-13 19:36 dpasukhi Relationship added related to 0032228
2021-04-14 11:44 kgv Relationship replaced has duplicate 0032228


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker