View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032557 | Community | OCCT:Modeling Algorithms | public | 2021-09-02 18:08 | 2021-12-30 15:09 |
Reporter | lrineau | Assigned To | |||
Priority | normal | Severity | major | ||
Status | closed | Resolution | reopened | ||
Platform | Linux | OS | Debian 6.0 | ||
Product Version | 7.5.0 | ||||
Target Version | 7.7.0 | Fixed in Version | 7.6.0 | ||
Summary | 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with errors | ||||
Description | With the given STEP file `abc_0_31-mod.step` given in the attached zip file, the code `debug_issue.cpp` (also in the zip file) shows that the conversion to NURBS using `BRepBuilderAPI_NurbsConvert` create an incorrect wire, with 2d p-curve accumulating so much imprecision that the end points of the loop of p-curve in the wire no longer coincide. Given the data set, the incriminated wire the one of the third face. I will attach screenshots... The attached .cpp file loops on the edges of the wire, and displays the maximal distance between two endpoints (of p-curves) that should coincide. That process is run before and after the conversion to NURBS. | ||||
Steps To Reproduce | Test case bugs/moddata_3/bug32557 | ||||
Tags | No tags attached. | ||||
Test case number | bugs/moddata_3/bug32557 | ||||
|
related to | 0032454 | assigned | Community | Use of BRepBuilderAPI_NurbsConvert create self intersecting 2d curves |
|
debug_issue.zip (15,645 bytes) |
|
abc_31_third_face.png (43,187 bytes) |
|
wire.png (4,643 bytes) |
|
wire-nurbs.png (4,573 bytes) |
|
wire-nurbs-zoom.png (1,699 bytes) |
|
I have upload a general view of the STEP face that has the incorrect wire (after the conversion to NURBS). I have also uploaded a drawing of the wire, in the 2d parametric space, before and after the conversion to NURBS, as well as a zoom on the problematic zone. |
|
This bug occurs with OCCT version 7.5.0 (as shipped by Linux Fedora 34), and with the master branch of OCCT (commit dated Sun Jun 27 20:13:49 2021 +0300). The bug was not present in OCCT version 7.4.0. That version 7.4.0 was ship in Linux Fedora 32, and I recompiled it locally to check again, just before the submission of this issue. |
|
Hi, It seems this buggy behaviour has been introduced in OCCT 7.5.0 by the commit > commit bdd09cfaf4fe4d7643d0c1c3d1d4cf9e8037a32a > Author: ifv <ifv@opencascade.com> > Date: Wed Dec 18 13:53:11 2019 +0300 > > 0031242: Scaling with different coefficients along axes produces invalid shape > > GeomConvert_1.cxx: > Creation periodic BSpline surfaces from trimmed periodic surface if trim is boundaries of periodic domain is allowed > > BRepTools_NurbsConvertModification.cxx: > Checking domain of 2dCurves if surfaces are periodic is added > > Test case tests/bugs/mesh/bug30008_2 is modified according to current behavior > > Test case tests/bugs/modalg_7/bug31242 is added It seems to be a regression. I can for now go back to OCCT 7.4.0, as a workaround. What are your intention for that bug? Will your revert commit bdd09cfaf4fe4d7643d0c1c3d1d4cf9e8037a32a (0031242) in future OpenCASCADE releases? |
|
Here is a Github link to the culprit commit: https://github.com/Open-Cascade-SAS/OCCT/commit/bdd09cfaf4fe4d7643d0c1c3d1d4cf9e8037a32a. |
|
@lrineau, thanks for preliminary analysis, the bug #0031242 has been linked to this one (it is inaccessible to public, but there is nothing interesting in description). > Hi, It seems this buggy behaviour has been introduced in OCCT 7.5.0 by the commit |
|
Hi @kvg, that is interesting to now that commit bdd09cfaf4fe4d7643d0c1c3d1d4cf9e8037a32a was actually a fix for an existing bug. It means you cannot easily revert the commit, because the bug #0031242 (whatever it is) would reappear. |
|
Dear Igor, could you see if this regression can be fixed by the next release? |
|
Debugging |
|
This problem can be fixed by next release |
2021-09-24 15:48 developer |
bug32557.brep (19,981 bytes) |
|
Branch CR32557 has been created by ifv. SHA-1: 612beace39c5bc349761dc4dbbb3cf7a3795b644 Detailed log of new commits: Author: ifv Date: Fri Sep 24 16:24:34 2021 +0300 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with errors BRepTools/BRepTools_NurbsConvertModification.cxx - Checking domain of 2dCurves if surfaces are periodic is improved tests/bugs/moddata_3/bug32557 - test case added |
|
Branch CR32557 has been updated forcibly by ifv. SHA-1: 16578705170e25be3ca2f8e35bb8f805dc6f0439 |
|
I confirm branch CR32557 fixes the bug in my setup. Thanks for the fix. |
|
Branch 32557 is ready for review Branches for integration OCCT - CR32557 Products - not |
|
Igor, could you test if it fixes also the linked bug 0032454? |
|
debug_issue_bis.zip (25,175 bytes) |
|
Hi, Even if branch `CR32557` fixes most of my test cases, I found one for which there is still a distance between 2d curves once converted in NURBS. See the attached file `debug_issue_bis.zip`, with the data set `abc_0_522.step` from the public ABC repository. This time, the file debug_issue.cpp uses `ShapeAnalysis_WireOrder` to find the maximal distance between edges of the wire, because the wire is not correctly ordered in the file. |
|
Combination - OCCT branch : IR-2021-10-01 master SHA - 0f05f21194a6711251182a118643efc9eb6c322b 49e51745631c52b6c452c65adae4d6dfa21a1b1e Products branch : IR-2021-10-01 SHA - a7a409985492330e4f25011465bc659dfe7d7562 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: 17464.590000000462 / 17476.150000000354 [-0.07%] Products Total CPU difference: 11405.930000000111 / 11390.180000000097 [+0.14%] Windows-64-VC14: OCCT Total CPU difference: 19332.171875 / 19335.34375 [-0.02%] Products Total CPU difference: 12772.859375 / 12782.828125 [-0.08%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR32557_1 has been created by ifv. SHA-1: 30a611a6005bf850b31d7ec330c4368dfc589f81 Detailed log of new commits: Author: ifv Date: Mon Oct 4 14:48:03 2021 +0300 CheckAndSegment added |
|
Branch CR32557_1 has been updated forcibly by ifv. SHA-1: b54f34fa1d291349a8c1d246c0474d409ece9f9d |
|
Issue is reopen because of new problem provided by @Irineau, see note #104424 |
|
abc_0_709.step (8,751 bytes) |
|
abc_0_1225.step (19,381 bytes) |
|
The branch CR32557_1 does fix the issue with the file abc_0_522.step, but there are other files from the ABC repository that got worst with the new commits from CR32557_1, compared to CR32557. I have attached two new files: abc_0_709.step abc_0_1225.step With those two files, and a lot of other from the ABC repository, now I have an exception raised: terminate called after throwing an instance of 'Standard_ConstructionError' Here is the relevant backtrace: #5 0x00007ffff61a75a9 in __cxa_throw () from /lib64/libstdc++.so.6 #6 0x00007fff402977f5 in CheckSurfaceData (SPoles=..., SUKnots=..., SVKnots=..., SUMults=..., SVMults=..., UDegree=2, VDegree=1, UPeriodic=<optimized out>, VPeriodic=<optimized out>) at OCCT/src/Geom/Geom_BSplineSurface.cxx:85 0000007 0x00007fff40297d8f in Geom_BSplineSurface::Geom_BSplineSurface (this=0x6e5c680, this@entry=0x1, Poles=..., Weights=..., UKnots=..., VKnots=..., UMults=..., VMults=..., UDegree=<optimized out>, VDegree=<optimized out>, UPeriodic=<optimized out>, VPeriodic=<optimized out>) at OCCT/src/Geom/Geom_BSplineSurface.cxx:259 0000008 0x00007fff402970bf in Geom_BSplineSurface::Copy (this=<optimized out>) at OCCT/src/Geom/Geom_BSplineSurface.cxx:140 0000009 0x00007fff402c1b0b in GeomAdaptor::MakeSurface (HS=..., theTrimFlag=false) at OCCT/src/GeomAdaptor/GeomAdaptor.cxx:134 #10 0x00007fff40474356 in computePeriodicity (theSurf=..., theUPeriod=@0x7fffffffb878: 0, theVPeriod=@0x7fffffffb870: 0) at OCCT/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx:119 0000011 0x00007fff4046f1e5 in ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d (this=this@entry=0x7fffffffc730, Curve=..., Surf=...) at OCCT/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx:932 #12 0x00007fff4046e202 in ProjLib_ComputeApproxOnPolarSurface::Perform (this=this@entry=0x7fffffffc730, InitialCurve2d=..., Curve=..., S=...) at OCCT/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx:794 0000013 0x00007fff4046d8db in ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface (this=0x7fffffffc730, theInitialCurve2d=..., theCurve=..., theSurface=..., theTolerance3D=<optimized out>) at OCCT/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx:517 0000014 0x00007fff408c8a03 in BRepTools_NurbsConvertModification::NewCurve2d (this=0x6d86a60, E=..., F=..., newE=..., newF=..., Curve2d=..., Tol=@0x7fffffffc940: 9.9999999999999995e-08) at OCCT/src/BRepTools/BRepTools_NurbsConvertModification.cxx:488 0000015 0x00007fff408c4188 in BRepTools_Modifier::Rebuild (this=<optimized out>, this@entry=0x7fffffffd310, S=..., M=..., theNewGeom=<optimized out>, theProgress=...) at OCCT/src/BRepTools/BRepTools_Modifier.cxx:410 0000016 0x00007fff408c3df2 in BRepTools_Modifier::Rebuild (this=<optimized out>, this@entry=0x7fffffffd310, S=..., M=..., theNewGeom=<optimized out>, theProgress=...) at OCCT/src/BRepTools/BRepTools_Modifier.cxx:363 0000017 0x00007fff408c3df2 in BRepTools_Modifier::Rebuild (this=<optimized out>, this@entry=0x7fffffffd310, S=..., M=..., theNewGeom=<optimized out>, theProgress=...) at OCCT/src/BRepTools/BRepTools_Modifier.cxx:363 0000018 0x00007fff408c29a4 in BRepTools_Modifier::Perform (this=0x7fffffffd310, M=..., theProgress=...) at OCCT/src/BRepTools/BRepTools_Modifier.cxx:147 0000019 0x00007fff41040243 in BRepBuilderAPI_ModifyShape::DoModif (this=this@entry=0x7fffffffd2c0) at OCCT/src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.cxx:77 0000020 0x00007fff410403ad in BRepBuilderAPI_ModifyShape::DoModif (this=0x7fffffffd2c0, S=..., M=...) at OCCT/src/BRepBuilderAPI/BRepBuilderAPI_ModifyShape.cxx:126 0000021 0x00007fff41040701 in BRepBuilderAPI_NurbsConvert::Perform (this=this@entry=0x7fffffffd2c0, S=...) at OCCT/src/BRepBuilderAPI/BRepBuilderAPI_NurbsConvert.cxx:63 0000022 0x00007fff41040682 in BRepBuilderAPI_NurbsConvert::BRepBuilderAPI_NurbsConvert (this=0x7fffffffd2c0, S=..., Copy=<optimized out>) at OCCT/src/BRepBuilderAPI/BRepBuilderAPI_NurbsConvert.cxx:50 |
|
Branch CR32557_1 has been updated forcibly by ifv. SHA-1: 7ae1f65ec6d779b5236575f6f9aaddce132626c7 |
|
Dear @Irineau, could you please test new variant of branch CR32557_1 on your data repository? |
|
abc_0_492.step (60,279 bytes) |
|
abc_0_685.step (34,757 bytes) |
|
abc_0_710.step (31,610 bytes) |
|
abc_0_1005.step (66,461 bytes) |
|
abc_0_1062.step (97,469 bytes) |
|
Hi abc_0_1005.step abc_0_1062.step abc_0_492.step abc_0_685.step abc_0_710.step |
|
Actually, the call stack is not always the same, and the exception thrown is also different: name status time error abc_0_1062.step FAILED 3.05515 terminate called after throwing an instance of 'Standard_ConstructionError' abc_0_492.step FAILED 3.04846 terminate called after throwing an instance of 'Standard_ConstructionError' abc_0_685.step FAILED 3.00421 terminate called after throwing an instance of 'Standard_ConstructionError' abc_0_1005.step FAILED 3.03978 terminate called after throwing an instance of 'Standard_RangeError' abc_0_710.step FAILED 3.02421 terminate called after throwing an instance of 'Standard_RangeError' but that seems to be always somewhere in a call to `BRepBuilderAPI_NurbsConvert::Perform`. |
|
Branch CR32557_1 has been deleted by mnt. SHA-1: 7ae1f65ec6d779b5236575f6f9aaddce132626c7 |
2021-10-25 11:00 developer |
bug32557_1.brep (1,715 bytes) |
2021-10-25 11:01 developer |
bug32557_2.brep (37,593 bytes) |
|
Branch CR32557_1 has been created by ifv. SHA-1: 9923f0870387be558e462998f98172b172a659a4 Detailed log of new commits: Author: ifv Date: Mon Oct 4 14:48:03 2021 +0300 0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with gaps GeomConvert/GeomConvert_1.cxx - method CheckAndSegment is added to adjust surface periodic boundaries bug32557 - test is updated by new cases |
|
Branch CR32557_1 is ready for review Branches for integration: OCCT - CR32557_1 Products - not Patch seems to fix issue 0032454 Test results: http://jenkins-test-occt.nnov.opencascade.com/view/CR32557_1-master-ifv/view/COMPARE/ |
|
What is about the difference in images? IMAGE bugs modalg_7 bug31242: bug31242.png differs |
|
In my opinion, reason of image differences for bugs modalg_7 bug31242 is any problem in isoline builder. Really result of CR32557_1 is better than result of master, for example tolerances are: CR32557_1 ## Tolerances on the shape result (nbFaces:1 nbEdges:4 nbVtx:4) Face : Min 1.00000e-07 Max 1.00000e-07 Edge : Min 3.22903e-07 Max 8.73714e-02 Vertex : Min 5.00000e-06 Max 8.73714e-02 master ## Tolerances on the shape result (nbFaces:1 nbEdges:4 nbVtx:4) Face : Min 1.00000e-07 Max 1.00000e-07 Edge : Min 4.48635e-06 Max 2.12449e-01 Vertex : Min 9.94636e-02 Max 2.12449e-01 Surfaces are the same, pcurves are differ a bit |
|
Branches for integration: OCCT - CR32557_1 Products - not |
|
Debugging |
|
Combination - OCCT branch : OCCT-760 master SHA - 0d186a91c07a6217cd132ec7ea03f1e6f7a2a9ce 49e51745631c52b6c452c65adae4d6dfa21a1b1e Products branch : OCCT-760 SHA - c472aa8da77ba932a88c890c58c81b09f9ae00b5 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: 17728.310000000427 / 17750.15000000046 [-0.12%] Products Total CPU difference: 11578.090000000113 / 11624.980000000118 [-0.40%] Windows-64-VC14: OCCT Total CPU difference: 19746.84375 / 19683.796875 [+0.32%] Products Total CPU difference: 12740.0 / 10994.3125 [+15.88%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR32557 has been deleted by mnt. SHA-1: 16578705170e25be3ca2f8e35bb8f805dc6f0439 |
|
Branch CR32557_1 has been deleted by mnt. SHA-1: 9923f0870387be558e462998f98172b172a659a4 |
occt: master f277dcbb 2021-09-24 13:24:34
Committer: |
0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with errors BRepTools/BRepTools_NurbsConvertModification.cxx - Checking domain of 2dCurves if surfaces are periodic is improved tests/bugs/moddata_3/bug32557 - test case added |
Affected Issues 0032557 |
|
mod - src/BRepTools/BRepTools_NurbsConvertModification.cxx | Diff File | ||
mod - tests/bugs/mesh/bug30008_2 | Diff File | ||
add - tests/bugs/moddata_3/bug32557 | Diff File | ||
occt: master 9923f087 2021-10-04 11:48:03
|
0032557: Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with gaps GeomConvert/GeomConvert_1.cxx - method CheckAndSegment is added to adjust surface periodic boundaries bug32557 - test is updated by new cases |
Affected Issues 0032557 |
|
mod - src/BRepTools/BRepTools_NurbsConvertModification.cxx | Diff File | ||
mod - src/GeomConvert/GeomConvert_1.cxx | Diff File | ||
mod - tests/bugs/moddata_3/bug32557 | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-09-02 18:08 | lrineau | New Issue | |
2021-09-02 18:08 | lrineau | Assigned To | => msv |
2021-09-02 18:08 | lrineau | File Added: debug_issue.zip | |
2021-09-02 18:08 | lrineau | File Added: abc_31_third_face.png | |
2021-09-02 18:12 | lrineau | File Added: wire.png | |
2021-09-02 18:12 | lrineau | File Added: wire-nurbs.png | |
2021-09-02 18:12 | lrineau | File Added: wire-nurbs-zoom.png | |
2021-09-02 18:14 | lrineau | Note Added: 0103686 | |
2021-09-02 18:18 | lrineau | Note Added: 0103688 | |
2021-09-02 18:26 | kgv | Product Version | 7.5.3 => 7.5.0 |
2021-09-23 16:12 | lrineau | Note Added: 0104319 | |
2021-09-23 16:13 | lrineau | Note Added: 0104320 | |
2021-09-23 16:21 | kgv | Note Added: 0104321 | |
2021-09-23 16:25 | lrineau | Note Added: 0104322 | |
2021-09-23 22:35 |
|
Note Added: 0104325 | |
2021-09-23 22:35 |
|
Assigned To | msv => ifv |
2021-09-24 15:12 |
|
Note Added: 0104330 | |
2021-09-24 15:13 |
|
Note Added: 0104331 | |
2021-09-24 15:16 |
|
Status | new => assigned |
2021-09-24 15:16 |
|
Summary | Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with errors => Modeling Data - Use of BRepBuilderAPI_NurbsConvert create 2d p-curves with errors |
2021-09-24 15:48 |
|
File Added: bug32557.brep | |
2021-09-24 16:25 | git | Note Added: 0104334 | |
2021-09-27 09:59 | kgv | Target Version | => 7.6.0 |
2021-09-27 10:22 | git | Note Added: 0104385 | |
2021-09-27 11:22 | lrineau | Note Added: 0104389 | |
2021-09-27 12:37 |
|
Test case number | => bugs/moddata_3/bug32557 |
2021-09-27 12:37 |
|
Steps to Reproduce Updated | |
2021-09-27 12:40 |
|
Note Added: 0104394 | |
2021-09-27 12:40 |
|
Assigned To | ifv => msv |
2021-09-27 12:40 |
|
Status | assigned => resolved |
2021-09-27 14:11 |
|
Assigned To | msv => bugmaster |
2021-09-27 14:11 |
|
Status | resolved => reviewed |
2021-09-27 19:44 |
|
Relationship added | related to 0032454 |
2021-09-27 19:45 |
|
Note Added: 0104409 | |
2021-09-29 11:19 | lrineau | File Added: debug_issue_bis.zip | |
2021-09-29 11:22 | lrineau | Note Added: 0104424 | |
2021-09-29 16:07 | kgv | Relationship added | related to 0032596 |
2021-09-29 16:07 | kgv | Relationship deleted | related to 0032596 |
2021-10-02 10:34 |
|
Note Added: 0104479 | |
2021-10-02 10:34 |
|
Status | reviewed => tested |
2021-10-02 11:32 |
|
Changeset attached | => occt master f277dcbb |
2021-10-02 11:32 |
|
Assigned To | bugmaster => smoskvin |
2021-10-02 11:32 |
|
Status | tested => verified |
2021-10-02 11:32 |
|
Resolution | open => fixed |
2021-10-04 14:52 | git | Note Added: 0104502 | |
2021-10-04 15:02 | git | Note Added: 0104503 | |
2021-10-08 11:07 |
|
Assigned To | smoskvin => ifv |
2021-10-08 11:07 |
|
Note Added: 0104541 | |
2021-10-08 11:07 |
|
Status | verified => feedback |
2021-10-08 11:07 |
|
Resolution | fixed => reopened |
2021-10-08 11:09 |
|
Status | feedback => assigned |
2021-10-12 15:13 | lrineau | File Added: abc_0_709.step | |
2021-10-12 15:13 | lrineau | File Added: abc_0_1225.step | |
2021-10-12 15:17 | lrineau | Note Added: 0104610 | |
2021-10-20 14:59 | git | Note Added: 0104763 | |
2021-10-21 15:04 |
|
Note Added: 0104781 | |
2021-10-22 19:03 | lrineau | File Added: abc_0_492.step | |
2021-10-22 19:04 | lrineau | File Added: abc_0_685.step | |
2021-10-22 19:04 | lrineau | File Added: abc_0_710.step | |
2021-10-22 19:04 | lrineau | File Added: abc_0_1005.step | |
2021-10-22 19:04 | lrineau | File Added: abc_0_1062.step | |
2021-10-22 19:06 | lrineau | Note Added: 0104802 | |
2021-10-22 19:13 | lrineau | Note Added: 0104803 | |
2021-10-24 10:23 | git | Note Added: 0104827 | |
2021-10-25 11:00 |
|
File Added: bug32557_1.brep | |
2021-10-25 11:01 |
|
File Added: bug32557_2.brep | |
2021-10-25 11:18 | git | Note Added: 0104850 | |
2021-10-26 14:08 |
|
Note Added: 0104876 | |
2021-10-26 14:08 |
|
Assigned To | ifv => msv |
2021-10-26 14:08 |
|
Status | assigned => resolved |
2021-10-26 17:30 |
|
Note Added: 0104883 | |
2021-10-26 17:31 |
|
Assigned To | msv => ifv |
2021-10-26 17:31 |
|
Status | resolved => assigned |
2021-10-26 17:58 |
|
Note Added: 0104884 | |
2021-10-26 17:58 |
|
Assigned To | ifv => msv |
2021-10-26 17:58 |
|
Status | assigned => resolved |
2021-10-26 18:37 |
|
Note Added: 0104885 | |
2021-10-26 18:37 |
|
Assigned To | msv => bugmaster |
2021-10-26 18:37 |
|
Status | resolved => reviewed |
2021-10-28 10:27 |
|
Note Added: 0104930 | |
2021-10-30 11:21 |
|
Note Added: 0104978 | |
2021-10-30 11:21 |
|
Status | reviewed => tested |
2021-11-02 17:57 |
|
Changeset attached | => occt master 9923f087 |
2021-11-02 17:57 |
|
Assigned To | bugmaster => ifv |
2021-11-02 17:57 |
|
Status | tested => verified |
2021-11-02 21:09 | git | Note Added: 0105021 | |
2021-11-02 21:09 | git | Note Added: 0105022 | |
2021-12-30 15:09 |
|
Target Version | 7.6.0 => 7.7.0 |