Do not limit the normalization factor of the highly anisotropic parametric space when filtering start points in the algorithm of walking line construction.
Additionally check the knots are in the increasing orders when merging two B-spline curves
if (SecondCurve->Degree() < Deg) { SecondCurve->IncreaseDegree(Deg); }
// Declarationd
- Standard_Real L1, L2, U_de_raccord;
+ Standard_Real L1, L2;
Standard_Integer ii, jj;
Standard_Real Ratio=1, Ratio1, Ratio2, Delta1, Delta2;
Standard_Integer NbP1 = FirstCurve->NbPoles(), NbP2 = SecondCurve->NbPoles();
Delta1 = 0;
Ratio2 = 1/Ratio;
Delta2 = Ratio2*SecondCurve->Knot(1) - FirstCurve->Knot(NbK1);
- U_de_raccord = FirstCurve->LastParameter();
}
else {
// On ne bouge pas la seconde courbe
Delta1 = Ratio1*FirstCurve->Knot(NbK1) - SecondCurve->Knot(1);
Ratio2 = 1;
Delta2 = 0;
- U_de_raccord = SecondCurve->FirstParameter();
}
// Les Noeuds
Standard_Real eps;
- for (ii=1; ii<NbK1; ii++) {
+ for (ii=1; ii<=NbK1; ii++) {
Noeuds(ii) = Ratio1*FirstCurve->Knot(ii) - Delta1;
if(ii > 1) {
eps = Epsilon (Abs(Noeuds(ii-1)));
}
Mults(ii) = FirstCurve->Multiplicity(ii);
}
- Noeuds(NbK1) = U_de_raccord;
- eps = Epsilon (Abs(Noeuds(NbK1-1)));
- if(Noeuds(NbK1) - Noeuds(NbK1-1) <= eps) {
- Noeuds(NbK1) += eps;
- }
Mults(NbK1) = FirstCurve->Degree();
for (ii=2, jj=NbK1+1; ii<=NbK2; ii++, jj++) {
Noeuds(jj) = Ratio2*SecondCurve->Knot(ii) - Delta2;
//Normalizing factor. If it is less than 1.0 then the range will be expanded.
//This is no good for computation. Therefore, it is limited.
- const Standard_Real deltau = mySRangeU.IsVoid() ? UM - Um : Max(mySRangeU.Delta(), 1.0);
- const Standard_Real deltav = mySRangeV.IsVoid() ? VM - Vm : Max(mySRangeV.Delta(), 1.0);
+ //Do not limit this factor in case of highly anisotropic parametrization
+ //(parametric space is considerably larger in one direction than another).
+ const Standard_Boolean isHighlyAnisotropic = Max(tolu, tolv) > 1000. * Min(tolu, tolv);
+ const Standard_Real deltau = mySRangeU.IsVoid() ? UM - Um
+ : (isHighlyAnisotropic ? mySRangeU.Delta()
+ : Max(mySRangeU.Delta(), 1.0));
+ const Standard_Real deltav = mySRangeV.IsVoid() ? VM - Vm
+ : (isHighlyAnisotropic ? mySRangeV.Delta()
+ : Max(mySRangeV.Delta(), 1.0));
Up/=deltau; UV1/=deltau;
Vp/=deltav; UV2/=deltav;
--- /dev/null
+puts "======================================================="
+puts "0032066: Modeling Algorithms - Incorrect result of Boolean CUT operation"
+puts "======================================================="
+puts ""
+
+restore [locate_data_file bug32066_solid.brep] s
+
+restore [locate_data_file bug32066_hole_2547.brep] h1
+restore [locate_data_file bug32066_hole_2562.brep] h2
+restore [locate_data_file bug32066_hole_2563.brep] h3
+restore [locate_data_file bug32066_hole_2564.brep] h4
+
+bclearobjects
+bcleartools
+baddobjects s
+baddtools h1 h2 h3 h4
+bfillds
+
+bbop r 2
+
+checkshape r
+
+checknbshapes r -wire 73 -face 65 -shell 1 -solid 1 -t
+checkprops r -s 3.45489e+07 -v 1.54742e+08
+
+checkview -display r -2d -path ${imagedir}/${test_image}.png
-puts "TODO OCC30286 ALL: Error : The length of result shape is 227257, expected 11."
+puts "TODO OCC30286 ALL: Error : The length of result shape is"
puts "========================================================================"
puts "OCC27979: Parasolid converted BREP shows weird lines on hidden line Algo"