Anonymous | Login 2021-01-16 09:39 MSK Project: All Projects Community Open CASCADE
 My View | View Issues | Change Log | Roadmap

View Issue Details  Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029745Community[OCCT] OCCT:Modeling Datapublic2018-05-08 17:552020-12-22 11:55
Reporterventu
Assigned Toakaftasev
PrioritynormalSeveritycrash
StatusfeedbackResolutionopen
PlatformOSOS Version
Product Version[OCCT] 7.2.0
Target VersionFixed in Version
Summary0029745: GeomAdaptor_Surface::VIntervals fails on periodic surfaces
DescriptionSuppose:
_ we have a V periodic NURBS Surface;
_ we have a GeomAdaptor_Surface with V limits outside of the period;
_ the surface has discontinuities;
_ we call GeomAdaptor_Surface::VIntervals to get a list of continuous subintervals.

That method will build an U iso-curve and get such intervals on that; at the end, however, that intervals are bounded with:
T(T.Lower()) = myVFirst;
T(T.Lower() + myNbVIntervals) = myVLast;

The problem arises since the value returned by the curve Intervals(...) method will be within the period, so those values will be invalid.

Example:
_ surface with periodic V knot vector ranging [0 ; 4];
_ surface adaptor with limits [5 ; 6].
_ Intervals(...) on the ISO curve returns [1,2,3];
_ the statements reported above will transform the result in [5,2,6].

This will lead to a crash in subsequent processing.

A solution along the line of the following might work:
if (mySurface->IsVPeriodic())
for (Standard_Integer i=T.Lower()+1;i<T.Lower()+myNbVIntervals;++i)
T(i)+=myVFirst-T(T.Lower());
T(T.Lower()) = myVFirst;
T(T.Lower() + myNbVIntervals) = myVLast;

Notice the problem should also occur in U direction.
TagsNo tags attached.
Test case number
Attached Files

 Relationships

 Notes akaftasev (developer) 2020-11-06 11:58 Dear ventu, can you attach more detailed steps to reproduce current bug, because according to this description it is hard to reproduce it ventu (reporter) 2020-12-18 18:35 TL;DR Changes made in 7.4.0 prevent this bug from happening again. However, I'm not sure the new result is correct either. The problem arose while importint a STeP model and I'm having an hard time reproducing it programmatically (even with 7.3.0). In any case, please take a look at the following code:   TColgp_Array2OfPnt Poles(1,2,1,3);   Poles(1,1)=gp_Pnt(0,0,0); Poles(2,1)=gp_Pnt(0,0,1);   Poles(1,2)=gp_Pnt(1,0,0); Poles(2,2)=gp_Pnt(1,0,1);   Poles(1,3)=gp_Pnt(1,1,0); Poles(2,3)=gp_Pnt(1,1,1);   //Poles(1,4)=gp_Pnt(0,0,0); Poles(2,4)=gp_Pnt(0,0,1);   TColStd_Array1OfReal UKnots(1,2),VKnots(1,4),ResultsA(1,4),ResultsB(1,4);   UKnots(1)=0; UKnots(2)=1;   VKnots(1)=0; VKnots(2)=1; VKnots(3)=2; VKnots(4)=3;   TColStd_Array1OfInteger UMult(1,2),VMult(1,4);   UMult(1)=2; UMult(2)=2;   VMult(1)=1; VMult(2)=1; VMult(3)=1; VMult(4)=1;   Handle(Geom_BSplineSurface) S=new Geom_BSplineSurface(Poles,UKnots,VKnots,UMult,VMult,1,1,false,true);   GeomAdaptor_Surface A(S,0,1,0,3);   A.VIntervals(ResultsA,GeomAbs_C1);   for (TColStd_Array1OfReal::const_iterator i(ResultsA.begin());i!=ResultsA.end();++i) std::cout<<*i<<" ";   std::cout<

 Issue History Date Modified Username Field Change 2018-05-08 17:55 ventu New Issue 2018-05-08 17:55 ventu Assigned To => msv 2020-11-02 10:41 szy Assigned To msv => akaftasev 2020-11-02 10:41 szy Status new => assigned 2020-11-06 11:58 akaftasev Note Added: 0096583 2020-11-06 11:58 akaftasev Assigned To akaftasev => ventu 2020-11-06 11:58 akaftasev Status assigned => feedback 2020-12-18 18:35 ventu Note Added: 0097726 2020-12-22 11:55 ventu Assigned To ventu => 2020-12-22 11:55 ventu Assigned To => akaftasev