View Issue Details

IDProjectCategoryView StatusLast Update
0030148CommunityOCCT:Modeling Algorithmspublic2021-12-13 14:56
Reporteradrien_schvalberg_technodigit Assigned Tosmoskvin 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Product Version7.3.0 
Target Version7.6.0Fixed in Version7.6.0 
Summary0030148: Modeling Algorithms - exception in BRepOffestAPI_MakePipe for some periodic BSpline spines
Descriptionif you execute BRepOffsetAPI_MakePipe(Spine, Profile); with No_Exception and No_Standard_RangeError NOT defined, that will raise a Standard_RangeError exception.

in GeomFill_SectionsPlacement.cxx, line 289 to 304 (in constructor):
...
          Handle(Geom_BSplineCurve) BC =
        Handle(Geom_BSplineCurve)::DownCast(myAdpSection.Curve());
          Standard_Integer I1, I2, I3, I4;
          BC->LocateU( first, Precision::Confusion(), I1, I2 );
          BC->LocateU( last, Precision::Confusion(), I3, I4 );
          Standard_Integer NbKnots = I3 - I2 + 1;
          
          Standard_Integer NbLocalPnts = 10;
          Standard_Integer NbPnts = (NbKnots-1) * NbLocalPnts;
          if (I1 != I2)
        NbPnts += NbLocalPnts;
          if (I3 != I4 && first < BC->Knot(I3))
        NbPnts += NbLocalPnts;
          if (!myAdpSection.IsClosed())
        NbPnts++;
          Pnts = new TColgp_HArray1OfPnt(1, NbPnts);
...
the construction of the point array raises an exception because NbPnts == 0 here.
And this number is 0 because BC->LocateU on the last parameter wrongly reports I3 = I4 = 1 (instead of 5 with my sample files).
The range of the (periodic) Geom_BSplineCurve is [0, 2071.7994540550058].
The range of the Geom_TrimmedCurve used by the myAdpSection adaptor is [0, 2071.7994540550098].
The LocateU applies the PeriodicNormalization on the last parameter BEFORE testing for tolerance so the real tested parameter is 4.0927261579781771e-12 which report 1.
Steps To Reproducein Draw with No_Exception and No_Standard_RangeError NOT defined!

pload MODELING
restore pipe_profile.brep profile
restore pipe_spine.brep spine
pipe pipe spine profile
TagsNo tags attached.
Test case numberpipe/bugs/bug30148

Attached Files

  • pipe_spine.brep (3,949 bytes)
  • pipe_profile.brep (6,544 bytes)
  • bug30148_1.brep (6,544 bytes)
  • bug30148_2.brep (3,949 bytes)

Activities

adrien_schvalberg_technodigit

2018-09-20 13:21

reporter  

pipe_spine.brep (3,949 bytes)

adrien_schvalberg_technodigit

2018-09-20 13:21

reporter  

pipe_profile.brep (6,544 bytes)

adrien_schvalberg_technodigit

2018-09-20 13:45

reporter   ~0079279

to be more precise, even if No_Exception or No_Standard_RangeError is defined, the point array will be empty and then in GeomLib::Inertia (GeomLib.cxx line 1864) you will have a division by 0. It can crash here also if you have floating point exceptions enabled.

emv

2018-09-21 07:41

developer   ~0079302

Dear Igor, please have a look at the problem when have time.

abulychev-ext

2021-09-21 12:50

developer   ~0104255

The bug is not reproducible because it was fixed in 30597.

msv

2021-09-21 22:17

developer   ~0104279

Could you create a non-regression test?

git

2021-09-22 12:57

administrator   ~0104288

Branch CR30148 has been created by abulychev-ext.

SHA-1: aa8d5d43c6c1177a4f99a0cb2e34b57ed0302a1d


Detailed log of new commits:

Author: abulyche
Date: Wed Sep 22 12:56:33 2021 +0300

    0030148: Modeling Algorithms - exception in BRepOffestAPI_MakePipe for some periodic BSpline spines
    
    Added the non-regression test for this problem.

abulychev-ext

2021-09-22 12:57

developer  

bug30148_1.brep (6,544 bytes)

abulychev-ext

2021-09-22 12:57

developer  

bug30148_2.brep (3,949 bytes)

kgv

2021-09-23 10:26

developer   ~0104304

Last edited: 2021-09-23 10:27

> 0030148: Modeling Algorithms - exception in BRepOffestAPI_MakePipe for some periodic BSpline spines
> Added the non-regression test for this problem.
While pushing a commit for already fixed bug, please mention there that problem was solved by fix for 0030597.
As from the current commit message it is unclear if problem still exist (regression tests could be integrated also for failing scenarios).

git

2021-09-23 10:40

administrator   ~0104305

Branch CR30148 has been updated forcibly by abulychev-ext.

SHA-1: d4d3a3897d3febbc384986c5e4fe0f176805ba91

msv

2021-09-27 11:59

developer   ~0104392

Please add in the "puts" statement the words "exc-eption in" according to the bug summary. Otherwise, the sense of this test is lost. The character '-' in the middle of "exception" will prevent raising of error.

git

2021-09-27 16:08

administrator   ~0104404

Branch CR30148 has been updated forcibly by abulychev-ext.

SHA-1: c6ec66d0557965b616723502da2895ecb770f974

msv

2021-09-27 20:49

developer   ~0104410

For integration:
occt - CR30148
products - none

smoskvin

2021-10-02 10:33

administrator   ~0104477

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

git

2021-12-13 14:56

administrator   ~0105852

Branch CR30148 has been deleted by kgv.

SHA-1: c6ec66d0557965b616723502da2895ecb770f974

Related Changesets

occt: master 95c380d2

2021-09-22 09:56:33

abulyche


Committer: smoskvin Details Diff
0030148: Modeling Algorithms - exception in BRepOffestAPI_MakePipe for some periodic BSpline spines

This problem was solved by fix for 0030597.
Added the non-regression test for this problem.
Affected Issues
0030148
add - tests/pipe/bugs/bug30148 Diff File

Issue History

Date Modified Username Field Change
2018-09-20 13:21 adrien_schvalberg_technodigit New Issue
2018-09-20 13:21 adrien_schvalberg_technodigit Assigned To => msv
2018-09-20 13:21 adrien_schvalberg_technodigit File Added: pipe_spine.brep
2018-09-20 13:21 adrien_schvalberg_technodigit File Added: pipe_profile.brep
2018-09-20 13:45 adrien_schvalberg_technodigit Note Added: 0079279
2018-09-21 07:41 emv Assigned To msv => ifv
2018-09-21 07:41 emv Note Added: 0079302
2021-08-19 13:05 ifv Assigned To ifv => abulychev-ext
2021-08-19 13:05 ifv Status new => assigned
2021-09-21 12:50 abulychev-ext Note Added: 0104255
2021-09-21 12:51 abulychev-ext Assigned To abulychev-ext => msv
2021-09-21 12:51 abulychev-ext Status assigned => resolved
2021-09-21 22:17 msv Note Added: 0104279
2021-09-21 22:17 msv Assigned To msv => abulychev-ext
2021-09-21 22:17 msv Status resolved => assigned
2021-09-22 12:57 git Note Added: 0104288
2021-09-22 12:57 abulychev-ext File Added: bug30148_1.brep
2021-09-22 12:57 abulychev-ext File Added: bug30148_2.brep
2021-09-22 13:03 abulychev-ext Test case number => pipe/bugs/bug30148
2021-09-23 10:15 abulychev-ext Assigned To abulychev-ext => msv
2021-09-23 10:15 abulychev-ext Status assigned => resolved
2021-09-23 10:25 kgv Summary exception in BRepOffestAPI_MakePipe for some periodic BSpline spines => Modeling Algorithms - exception in BRepOffestAPI_MakePipe for some periodic BSpline spines
2021-09-23 10:26 kgv Note Added: 0104304
2021-09-23 10:27 kgv Note Edited: 0104304
2021-09-23 10:29 abulychev-ext Assigned To msv => abulychev-ext
2021-09-23 10:29 abulychev-ext Status resolved => assigned
2021-09-23 10:40 git Note Added: 0104305
2021-09-23 10:41 abulychev-ext Assigned To abulychev-ext => msv
2021-09-23 10:41 abulychev-ext Status assigned => resolved
2021-09-27 11:59 msv Note Added: 0104392
2021-09-27 11:59 msv Assigned To msv => abulychev-ext
2021-09-27 11:59 msv Status resolved => assigned
2021-09-27 12:01 msv Target Version => 7.6.0
2021-09-27 16:08 git Note Added: 0104404
2021-09-27 16:09 abulychev-ext Assigned To abulychev-ext => msv
2021-09-27 16:09 abulychev-ext Status assigned => resolved
2021-09-27 20:49 msv Note Added: 0104410
2021-09-27 20:49 msv Assigned To msv => bugmaster
2021-09-27 20:49 msv Status resolved => reviewed
2021-10-02 10:33 smoskvin Note Added: 0104477
2021-10-02 10:33 smoskvin Status reviewed => tested
2021-10-02 11:32 smoskvin Changeset attached => occt master 95c380d2
2021-10-02 11:32 smoskvin Assigned To bugmaster => smoskvin
2021-10-02 11:32 smoskvin Status tested => verified
2021-10-02 11:32 smoskvin Resolution open => fixed
2021-12-13 14:56 git Note Added: 0105852