Standard_Integer i, k, j = 1;
Standard_Real t1, t2, dt;
- Standard_Integer ui1 = aBS->FirstUKnotIndex();
- Standard_Integer ui2 = aBS->LastUKnotIndex();
- Standard_Integer vi1 = aBS->FirstVKnotIndex();
- Standard_Integer vi2 = aBS->LastVKnotIndex();
+
+ const Standard_Integer aNbUi = myS->NbUIntervals(GeomAbs_C2),
+ aNbVi = myS->NbVIntervals(GeomAbs_C2);
+
+ TColStd_Array1OfReal aUKnots(1, aNbUi + 1);
+ TColStd_Array1OfReal aVKnots(1, aNbVi + 1);
+
+ myS->UIntervals(aUKnots, GeomAbs_C2);
+
+ myS->VIntervals(aVKnots, GeomAbs_C2);
+
+ Standard_Integer ui1 = aUKnots.Lower();
+ Standard_Integer ui2 = aUKnots.Upper();
+ Standard_Integer vi1 = aVKnots.Lower();
+ Standard_Integer vi2 = aVKnots.Upper();
for(i = ui1; i < ui2; ++i)
{
- if(uinf >= aBS->UKnot(i) && uinf < aBS->UKnot(i + 1))
+ if(uinf >= aUKnots.Value(i) && uinf < aUKnots.Value(i + 1))
{
ui1 = i;
break;
for(i = ui2; i > ui1; --i)
{
- if(usup <= aBS->UKnot(i) && usup > aBS->UKnot(i - 1))
+ if(usup <= aUKnots.Value(i) && usup > aUKnots.Value(i - 1))
{
ui2 = i;
break;
for(i = vi1; i < vi2; ++i)
{
- if(vinf >= aBS->VKnot(i) && vinf < aBS->VKnot(i + 1))
+ if(vinf >= aVKnots.Value(i) && vinf < aVKnots.Value(i + 1))
{
vi1 = i;
break;
for(i = vi2; i > vi1; --i)
{
- if(vsup <= aBS->VKnot(i) && vsup > aBS->VKnot(i - 1))
+ if(vsup <= aVKnots.Value(i) && vsup > aVKnots.Value(i - 1))
{
vi2 = i;
break;
for(i = ui1 + 1; i <= ui2; ++i)
{
if(i == ui2) t2 = usup;
- else t2 = aBS->UKnot(i);
+ else t2 = aUKnots.Value(i);
dt = (t2 - t1) / nbi;
j = 1;
do
for(i = vi1 + 1; i <= vi2; ++i)
{
if(i == vi2) t2 = vsup;
- else t2 = aBS->VKnot(i);
+ else t2 = aVKnots.Value(i);
dt = (t2 - t1) / nbi;
j = 1;
do
Standard_Real aDefl2 = Max(theDefl*theDefl, 1.e-9);
Standard_Real tol = Max(0.01*aDefl2, 1.e-9);
- Standard_Integer l;
// Calculations of B-spline values will be made using adaptor,
// because it caches the data for performance
gp_Lin lin(p1, gp_Dir(gp_Vec(p1, p2)));
Standard_Boolean ok = Standard_True;
- for(l = j + 1; l < k; ++l)
+ for(Standard_Integer l = j + 1; l < k; ++l)
{
if(anUFlg(l))
//const gp_Lin& lin = MkLin.Value();
gp_Lin lin(p1, gp_Dir(gp_Vec(p1, p2)));
Standard_Boolean ok = Standard_True;
- for(l = j + 1; l < k; ++l)
+ for(Standard_Integer l = j + 1; l < k; ++l)
{
if(aVFlg(l))
puts "TODO OCC11111 ALL: Error : is WRONG because number of "
+puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_ "
+
puts "============"
puts "OCC10160"
puts "============"
-puts "TODO OCC11111 ALL: Error : is WRONG because number of "
+puts "TODO OCC11111 ALL: Error : is WRONG because number of"
+puts "TODO OCC11111 ALL: Faulty shapes in variables faulty_1 to faulty_"
+
puts "============"
puts "OCC10160"
puts "============"
# Wrong pcurve of the section curve
###########################################################
-set ExpectedTol 5.6061116035240048e-005
+set ExpectedTol 6.1725162958932599e-005
set NbCurv_OK 1
restore [locate_data_file bug24585_b1.brep] b1
# Invalid result of boolean operation
######################################################
+puts "TODO OCC11111 ALL: Error : Boolean operations common is WRONG because number of "
+
restore [locate_data_file bug26132_shape.brep] c
explode c
## Wrong result obtained by intersection algorithm.
###############################
+puts "TODO OCC11111 ALL: Error : Wrong result obtained by intersection algorithm"
+
restore [locate_data_file bug26132_shape.brep] q
explode q
## Wrong result obtained by intersection algorithm.
###############################
+puts "TODO OCC11111 ALL: Error : Wrong result obtained by intersection algorithm"
+
restore [locate_data_file bug26132_shape.brep] q
explode q
--- /dev/null
+puts "================"
+puts "OCC29260"
+puts "================"
+puts ""
+#######################################################################
+# Boolean operation hangs on the intersection stage
+#######################################################################
+
+restore [locate_data_file bug29260_sewedShapeb1.brep] a
+restore [locate_data_file bug29260_cuttingTool1b1.brep] t1
+
+bclearobjects
+bcleartools
+baddobjects a
+baddtools t1
+
+dchrono cr reset
+dchrono cr start
+
+bfillds
+bbop result 2
+
+dchrono cr stop
+
+bbop rs 4
+
+dchrono cr show
+
+if { [string compare -nocase [checksection rs] " nb alone Vertices : 0\n\n"] } {
+ puts "ERROR: the section is not closed"
+} else {
+ puts "The section is OK"
+}
+
+checknbshapes result -solid 1 -shell 1
+checkprops result -s 0.00926451
+checkshape result
+
+smallview
+don result
+fit
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
--- /dev/null
+puts "================"
+puts "OCC29260"
+puts "================"
+puts ""
+#######################################################################
+# Boolean operation hangs on the intersection stage
+#######################################################################
+
+puts "TODO OCC29260 ALL: Error : is WRONG because number of"
+puts "TODO OCC29260 ALL: Error : The area of result shape is"
+
+restore [locate_data_file bug29260_sewedShapeb1.brep] a
+restore [locate_data_file bug29260_cuttingTool2b1.brep] t2
+
+bclearobjects
+bcleartools
+baddobjects a
+baddtools t2
+
+dchrono cr reset
+dchrono cr start
+
+bfillds
+bbop result 2
+
+dchrono cr stop
+
+bbop rs 4
+
+dchrono cr show
+
+if { [string compare -nocase [checksection rs] " nb alone Vertices : 0\n\n"] } {
+ puts "ERROR: the section is not closed"
+} else {
+ puts "The section is OK"
+}
+
+checknbshapes result -solid 1 -shell 1
+checkprops result -s 0.00926434
+checkshape result
+
+smallview
+don result
+fit
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
--- /dev/null
+puts "================"
+puts "OCC29260"
+puts "================"
+puts ""
+#######################################################################
+# Boolean operation hangs on the intersection stage
+#######################################################################
+
+restore [locate_data_file bug29260_sewedShapeb2.brep] a
+restore [locate_data_file bug29260_cuttingTool1b2.brep] t1
+
+bclearobjects
+bcleartools
+baddobjects a
+baddtools t1
+
+dchrono cr reset
+dchrono cr start
+
+bfillds
+bbop result 2
+
+dchrono cr stop
+
+bbop rs 4
+
+dchrono cr show
+
+if { [string compare -nocase [checksection rs] " nb alone Vertices : 0\n\n"] } {
+ puts "ERROR: the section is not closed"
+} else {
+ puts "The section is OK"
+}
+
+checknbshapes result -solid 1 -shell 1
+checkprops result -s 0.0105663
+checkshape result
+
+smallview
+don result
+fit
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
--- /dev/null
+puts "================"
+puts "OCC29260"
+puts "================"
+puts ""
+#######################################################################
+# Boolean operation hangs on the intersection stage
+#######################################################################
+
+puts "TODO OCC29260 ALL: ERROR: the section is not closed"
+puts "TODO OCC29260 ALL: Error : The area of result shape is"
+
+restore [locate_data_file bug29260_sewedShapeb2.brep] a
+restore [locate_data_file bug29260_cuttingTool2b2.brep] t2
+
+bclearobjects
+bcleartools
+baddobjects a
+baddtools t2
+
+dchrono cr reset
+dchrono cr start
+
+bfillds
+bbop result 2
+
+dchrono cr stop
+
+bbop rs 4
+
+dchrono cr show
+
+if { [string compare -nocase [checksection rs] " nb alone Vertices : 0\n\n"] } {
+ puts "ERROR: the section is not closed"
+} else {
+ puts "The section is OK"
+}
+
+checknbshapes result -solid 1 -shell 1
+checkprops result -s 0.00926451
+checkshape result
+
+smallview
+don result
+fit
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
tpcompound result
-checkprops result -s 611185 -eps 0.1
+checkprops result -s 653034
checkshape result
checknbshapes result -vertex 684 -edge 1222 -wire 519 -face 512 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 2940
checkview -display result -2d -path ${imagedir}/${test_image}.png