Archived issue #0032264
Data Exchange - STEP exporter generates bad geometry [REGRESSION since 7.4.0]
Description
Today (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 Attachment 2 (BREP) file:
- 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 Attachment 2 (BREP)). Several boolean subtractions have somehow turned into unions!
- Run the following draw test harness script with the attached Attachment 2 (BREP) file:
##### DRAWEXE.script Begin ##### pload XDE MODELING VISUALIZATION vinit View1 restore Attachment 2 (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 Attachment 2 (BREP)). Several boolean subtractions have somehow turned into unions!
Additional information
https://i.ibb.co/Xbk8HXb/Attachment 3 (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
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
Public activity
18 archived notes
Participants are labeled by their role within this record.
This test case is a regression after a patch for #0031301.
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?
Could you point to a commit hash?
> 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=[revision removed]
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=[revision removed]
Ah, thanks for the link!
This regression must have come from changes between the 7.4.0 and the 7.5.0 releases, right?
This regression must have come from changes between the 7.4.0 and the 7.5.0 releases, right?
> This regression must have come from changes between the 7.4.0 and the 7.5.0 releases, right?
Yes.
Yes.
I'll see if I can help a bit with bisecting it.
> 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).
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).
> 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.
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.
I can confirm that reverting [revision removed] 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!
Thank you very much kgv! I'll be happy to test whatever final solution comes along in time!
Branch [archived branch] has been created by Participant.
[revision removed]
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
[revision removed]
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
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
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
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
Branch CR32264 is ready to be reviewed.
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!
Thank you very much for working so quickly to come up with a solution!
Thank you very much for confirmation.
No remarks, please integrate
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records