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;
}
--- /dev/null
+# 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
+}
+
+
+
+
--- /dev/null
+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"
+
--- /dev/null
+001 iges
+
--- /dev/null
+# 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
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+pload XDE
+pload AISV
+
+
+
+
+
+
+
--- /dev/null
+error /\bError\b/
+error /\bFaulty\b/
+
+
+