MantisBT - Community
View Issue Details
0022981Community[OCCT] OCCT:Modeling Algorithmspublic2012-02-07 14:212013-04-29 15:24
Timo 
apn 
normalminor 
closedfixed 
WindowsVC++ 201064 bit
[OCCT] 6.5.2 
[OCCT] 6.6.0[OCCT] 6.6.0 
bugs modalg_5 bug22981
0022981: BRepOffsetAPI_ThruSections fails to build a surface from closed wires
In order to reproduce the problem you can use the following Draw commands:

restore Turb1.brep t
explode t
thrusections r 0 0 t_1 t_2 t_3 t_4 t_5 t_6 t_7 t_8 t_9 t_10 t_11
alternatively:
thrusections r 0 0 t_1 t_2 t_3

If I leave out the first wire the exception is not thrown:
thrusections r 0 0 t_2 t_3 t_4 t_5 t_6 t_7 t_8 t_9 t_10 t_11


Tested with OCC 6.5.2

Stack-Trace:
...
TKernel.dll!Standard_ConstructionError::Raise(const char * const AString) Zeile 12 + 0xcc Bytes C++
TKG3d.dll!Geom_BSplineSurface::InsertUKnots(const TColStd_Array1OfReal & Knots, const TColStd_Array1OfInteger & Mults, const double ParametricTolerance, const unsigned int Add) Zeile 1882 + 0xa Bytes C++
TKG3d.dll!Geom_BSplineSurface::Segment(const double U1, const double U2, const double V1, const double V2) Zeile 641 C++
TKOffset.dll!BRepOffsetAPI_ThruSections::CreateSmoothed() Zeile 642 C++
TKOffset.dll!BRepOffsetAPI_ThruSections::Build() Zeile 392 C++

Is it a bug or is there a problem with the wires / geometry?
Forum supervisor:
The posted problem has been checked and reproduced.
It looks like a bug. The commands:
>>thrusections r 0 0 t_1 t_2
>>thrusections r 0 0 t_2 t_3 t_4 t_5 t_6 t_7 t_8 t_9 t_10 t_11
are performed successfully, but together with the first section it leads to exception.
No tags attached.
related to 0023436closed jgv BRepOffsetAPI_ThruSections crashes when lofting through identical profiles 
? Turb1.brep (161,373) 2012-02-07 14:21
https://tracker.dev.opencascade.org/
png thruSections with increased tolerance.PNG (19,759) 2012-02-07 15:55
https://tracker.dev.opencascade.org/
Issue History
2012-02-07 14:21TimoNew Issue
2012-02-07 14:21TimoAssigned To => jgv
2012-02-07 14:21TimoFile Added: Turb1.brep
2012-02-07 15:54TimoNote Added: 0019439
2012-02-07 15:55TimoFile Added: thruSections with increased tolerance.PNG
2013-02-28 15:16abvRelationship addedrelated to 0023436
2013-02-28 15:17abvNote Added: 0023527
2013-02-28 15:17abvAssigned Tojgv => bugmaster
2013-02-28 15:17abvStatusnew => feedback
2013-02-28 15:19abvTarget Version => 6.6.0
2013-02-28 17:57bugmasterAssigned Tobugmaster => mkv
2013-03-12 17:03apnNote Added: 0023681
2013-03-12 17:04apnTest case number => bugs modalg_5 bug22981
2013-03-12 17:04apnAssigned Tomkv => bugmaster
2013-03-12 17:04apnStatusfeedback => tested
2013-03-18 20:48apnChangeset attached => occt master 972bd4bf
2013-03-18 20:48apnAssigned Tobugmaster => apn
2013-03-18 20:48apnStatustested => verified
2013-03-18 20:48apnResolutionopen => fixed
2013-04-23 13:35aivStatusverified => closed
2013-04-29 15:24aivFixed in Version => 6.6.0

Notes
(0019439)
Timo   
2012-02-07 15:54   
BSplCLib::PrepareInsertKnots, which is called by Geom_BSplineSurface::InsertUKnots, returns false because (adeltaK2 > Tolerance).
adeltaK2: 1.3322676295501878e-015
Tolerance: 8.8817841970012523e-016

If the parametric tolerance (epsU) is increased to 8.8817841970012523e-015
before the call of InsertUKnots in Geom_BSplineSurface::Segment, the surface can be generated, but it doesn't seem to be OK in visualization (see "thruSections with increased tolerance.PNG").
(0023527)
abv   
2013-02-28 15:17   
The problem seems to be fixed by fix for 0023436, at least it is not reproduced on current master. I suggest the issue can be closed after adding a test case.
(0023681)
apn   
2013-03-12 17:03   
Branch CR22981 was created from current state of master. The problem is fixed.
Test case - bugs/modalg_5/bug22981 - OK
Branch contains only test case and will be integrated.