Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030148Community[OCCT] OCCT:Modeling Algorithmspublic2018-09-20 13:212018-09-21 07:41
Assigned Toifv 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 7.3.0 
Target VersionFixed in Version 
Summary0030148: 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 =
          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())
          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!

restore pipe_profile.brep profile
restore pipe_spine.brep spine
pipe pipe spine profile
TagsNo tags attached.
Test case number
Attached Files? file icon pipe_spine.brep (3,949 bytes) 2018-09-20 13:21
? file icon pipe_profile.brep (6,544 bytes) 2018-09-20 13:21

- Relationships

-  Notes
adrien_schvalberg_technodigit (reporter)
2018-09-20 13:45

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 (developer)
2018-09-21 07:41

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

- 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

Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker