Anonymous | Login | 2021-01-16 06:41 MSK | ![]() |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0029745 | Community | [OCCT] OCCT:Modeling Data | public | 2018-05-08 17:55 | 2020-12-22 11:55 | ||||||||
Reporter | ventu | ||||||||||||
Assigned To | akaftasev | ||||||||||||
Priority | normal | Severity | crash | ||||||||||
Status | feedback | Resolution | open | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | [OCCT] 7.2.0 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0029745: GeomAdaptor_Surface::VIntervals fails on periodic surfaces | ||||||||||||
Description | Suppose: _ 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. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Test case number | |||||||||||||
Attached Files | |||||||||||||
![]() |
|
(0096583) 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 |
(0097726) 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<<std::endl; GeomAdaptor_Surface B(S,0,1,3,6); B.VIntervals(ResultsB,GeomAbs_C1); for (TColStd_Array1OfReal::const_iterator i(ResultsB.begin());i!=ResultsB.end();++i) std::cout<<*i<<" "; std::cout<<std::endl; Output I'd expect (but possibly I'm wrong): 0 1 2 3 3 4 5 6 Output I get (with OC 7.3.0): 0 1 2 3 3 6 0 0 Notice here two values are missing. This is not the original problem I reported and which I'm unable to reproduce now: in that case what I was getting in the second line was the equivalent of 3 1 2 6. 7.4.0 changed this behaviour: at line 441 of GeomAdaptor_Surface.cxx, "break" was replaces with a "return". So the code at the end of the function, that changes only the first and last value, is not executed, and what I originally reported cannot happen anymore. Still I'm wondering whether "3 6" is to be expected or if we just exchanged a bug for another. |
![]() |
|||
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 |
Copyright © 2000 - 2021 MantisBT Team |