1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0023377: Error in importing a rational spline IGES surface [Type 128, PROP3 = 0] into OCCT

Fix to address Rational surface with non-unitary weights at last index
Add new test case folder with test case for bugs
This commit is contained in:
sneeraj
2012-08-31 15:33:33 +04:00
parent 1ec8a59e23
commit fa920fb12e
7 changed files with 92 additions and 2 deletions

View File

@@ -115,8 +115,13 @@ IGESGeom_BSplineSurface::IGESGeom_BSplineSurface () { }
if (flag) return isPolynomial;
Standard_Integer i,j;
Standard_Real w0 = theWeights->Value(0,0);
for ( j = 0; j < theIndexV; j ++)
for (i = 0; i < theIndexU; i ++)
/*CR23377
* Following fix is needed to address Rational surface with non-unitary weights at last index
* Limit for indices are changed from theIndexV-->theIndexV+1 (=NbPolesV())
* theIndexU--> theIndexU+1 (=NbPolesU())
*/
for ( j = 0; j < (theIndexV+1); j ++)
for (i = 0; i < (theIndexU+1); i ++)
if (Abs(theWeights->Value(i,j) - w0) > 1.e-10) return Standard_False;
return Standard_True;
}