mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +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:
parent
1ec8a59e23
commit
fa920fb12e
@ -115,8 +115,13 @@ IGESGeom_BSplineSurface::IGESGeom_BSplineSurface () { }
|
|||||||
if (flag) return isPolynomial;
|
if (flag) return isPolynomial;
|
||||||
Standard_Integer i,j;
|
Standard_Integer i,j;
|
||||||
Standard_Real w0 = theWeights->Value(0,0);
|
Standard_Real w0 = theWeights->Value(0,0);
|
||||||
for ( j = 0; j < theIndexV; j ++)
|
/*CR23377
|
||||||
for (i = 0; i < theIndexU; i ++)
|
* 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;
|
if (Abs(theWeights->Value(i,j) - w0) > 1.e-10) return Standard_False;
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
30
tests/bugs/begin
Executable file
30
tests/bugs/begin
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
# File : begin
|
||||||
|
if { [array get Draw_Groups "TOPOLOGY Check commands"] == "" } {
|
||||||
|
pload TOPTEST
|
||||||
|
pload VISUALIZATION
|
||||||
|
# set env(CSF_DrawPluginQADefaults) $env(CASROOT)/src/DrawResources/.
|
||||||
|
# pload QAcommands
|
||||||
|
# pload -DrawPluginQA QAcommands
|
||||||
|
}
|
||||||
|
|
||||||
|
# to prevent loops limit to 16 minutes
|
||||||
|
cpulimit 1000
|
||||||
|
|
||||||
|
#set script_dir [file dirname [info script]]/script
|
||||||
|
# if { [info exist WorkDirectory] == 0 } {
|
||||||
|
# set WorkDirectory "/tmp"
|
||||||
|
# if { [array get env TEMP] != "" } {
|
||||||
|
# set WorkDirectory "$env(TEMP)"
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
if { [info exists imagedir] == 0 } {
|
||||||
|
set imagedir .
|
||||||
|
}
|
||||||
|
if { [info exists test_image] == 0 } {
|
||||||
|
set test_image photo
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
22
tests/bugs/end
Executable file
22
tests/bugs/end
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
if { [isdraw result] } {
|
||||||
|
if { [info exists 2dviewer] } {
|
||||||
|
clear
|
||||||
|
smallview
|
||||||
|
donly result
|
||||||
|
fit
|
||||||
|
xwd $imagedir/${test_image}.gif
|
||||||
|
}
|
||||||
|
if { [info exists 3dviewer] } {
|
||||||
|
vclear
|
||||||
|
vdisplay result
|
||||||
|
vsetdispmode 1
|
||||||
|
vfit
|
||||||
|
vdump $imagedir/${test_image}.gif
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
puts "Error : The command can not be build."
|
||||||
|
}
|
||||||
|
|
||||||
|
# to end a test script
|
||||||
|
puts "TEST COMPLETED"
|
||||||
|
|
2
tests/bugs/grids.list
Executable file
2
tests/bugs/grids.list
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
001 iges
|
||||||
|
|
17
tests/bugs/iges/CR23377
Executable file
17
tests/bugs/iges/CR23377
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
# Original bug : 23377
|
||||||
|
# Date : 12 Aug 2012
|
||||||
|
|
||||||
|
igesbrep [locate_data_file OCC23377-Input.igs] result *
|
||||||
|
regexp {Number of Rational BSpline surfaces +([-0-9.+eE]+)} [expshape result 1 1] full nb
|
||||||
|
puts "Number of Rational BSpline surfaces is $nb"
|
||||||
|
set 2dviewer 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
9
tests/bugs/iges/begin
Executable file
9
tests/bugs/iges/begin
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
pload XDE
|
||||||
|
pload AISV
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
5
tests/bugs/parse.rules
Executable file
5
tests/bugs/parse.rules
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
error /\bError\b/
|
||||||
|
error /\bFaulty\b/
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user