Boolean Operations algorithm - Added processing of the untouched edges (without edge set) in the UpdatePaveBlocks method.
IntCurvesFace_Intersector algorithm - Avoid calculation of the number of sample points on the surfaces with too small UV ranges.
}
//
if (bRebuild) {
- Standard_Boolean isDegEdge = myDS->ShapeInfo(aPB->Edge()).HasFlag();
+ Standard_Integer nE = aPB->Edge();
+ // Check if the Pave Block has the edge set
+ if (nE < 0) {
+ // untouched edge
+ nE = aPB->OriginalEdge();
+ }
+ Standard_Boolean isDegEdge = myDS->ShapeInfo(nE).HasFlag();
if (wasRegularEdge && !isDegEdge && nV[0] == nV[1]) {
// now edge has the same vertex on both ends;
// check if it is not a regular closed curve.
- const TopoDS_Edge& aE = TopoDS::Edge(myDS->Shape(aPB->Edge()));
+ const TopoDS_Edge& aE = TopoDS::Edge(myDS->Shape(nE));
const TopoDS_Vertex& aV = TopoDS::Vertex(myDS->Shape(nV[0]));
Standard_Real aLength = IntTools::Length(aE);
Standard_Real aTolV = BRep_Tool::Tolerance(aV);
if (aLength <= aTolV * 2.) {
// micro edge, so mark it for removal
- aMicroEdges.Add(aPB->Edge());
+ aMicroEdges.Add(nE);
continue;
}
}
- nSp = SplitEdge(aPB->Edge(), nV[0], aT[0], nV[1], aT[1]);
+ nSp = SplitEdge(nE, nV[0], aT[0], nV[1], aT[1]);
if (bCB)
aCB->SetEdge(nSp);
else
if (nbsu > aMaxSamples) nbsu = aMaxSamples;
if (nbsv > aMaxSamples) nbsv = aMaxSamples;
- if (Max(dU, dV) > Min(dU, dV) * aTresh)
- {
- aMinSamples = 10;
- nbsu = (Standard_Integer)(Sqrt(dU / dV) * aMaxSamples);
- if (nbsu < aMinSamples) nbsu = aMinSamples;
- nbsv = aMaxSamples2 / nbsu;
- if (nbsv < aMinSamples)
+ if (dU > gp::Resolution() && dV > gp::Resolution()) {
+ if (Max(dU, dV) > Min(dU, dV) * aTresh)
{
- nbsv = aMinSamples;
- nbsu = aMaxSamples2 / aMinSamples;
+ aMinSamples = 10;
+ nbsu = (Standard_Integer)(Sqrt(dU / dV) * aMaxSamples);
+ if (nbsu < aMinSamples) nbsu = aMinSamples;
+ nbsv = aMaxSamples2 / nbsu;
+ if (nbsv < aMinSamples)
+ {
+ nbsv = aMinSamples;
+ nbsu = aMaxSamples2 / aMinSamples;
+ }
+ }
+ }
+ else {
+ if (dU < gp::Resolution()) {
+ nbsu = 1;
+ }
+ if (dV < gp::Resolution()) {
+ nbsv = 1;
}
}
--- /dev/null
+puts "TODO OCC28989 ALL: Faulty shapes in variables"
+
+puts "======="
+puts "OCC28892"
+puts "======="
+puts ""
+##################################################
+# BOPAlgo_PaveFiller returns status "error: 11" in draw or raises exception in app on the given shapes set
+##################################################
+
+binrestore [locate_data_file bug28892_shape.bin] a
+binrestore [locate_data_file bug28892_tools.bin] b
+
+bclearobjects
+bcleartools
+baddobjects a
+baddctools b
+bfillds
+bbuild result
+
+# just check that the operation did not raise an exception and produced any result
+checkshape result
+
+# checkview -display result -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file
--- /dev/null
+puts "TODO OCC28989 ALL: Error: result is self-interfered"
+
+puts "======="
+puts "OCC28892"
+puts "======="
+puts ""
+##################################################
+# BOPAlgo_PaveFiller returns status "error: 11" in draw or raises exception in app on the given shapes set
+##################################################
+
+binrestore [locate_data_file bug28892_shape.bin] a
+binrestore [locate_data_file bug28892_tools.bin] b
+
+bclearobjects
+bcleartools
+baddobjects a
+explode b
+baddtools b_1 b_6 b_12
+bfillds
+bbuild result
+
+# just check that the operation did not raise an exception and produced any result
+checkshape result
+
+if {![regexp "OK" [bopcheck result]]} {
+ puts "Error: result is self-interfered"
+}
+
+# checkview -display result -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file
--- /dev/null
+puts "TODO OCC28989 ALL: Error: result is self-interfered"
+
+puts "======="
+puts "OCC28892"
+puts "======="
+puts ""
+##################################################
+# BOPAlgo_PaveFiller returns status "error: 11" in draw or raises exception in app on the given shapes set
+##################################################
+
+binrestore [locate_data_file bug28892_tools.bin] b
+
+explode b
+bclearobjects
+bcleartools
+baddobjects b_6
+baddtools b_12
+bfillds
+bbuild result
+
+# just check that the operation did not raise an exception and produced any result
+checkshape result
+
+if {![regexp "OK" [bopcheck result]]} {
+ puts "Error: result is self-interfered"
+}
+
+# checkview -display result -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file
--- /dev/null
+puts "TODO OCC28984 ALL: Error: Too big intersection tolerance"
+
+puts "======="
+puts "0028984"
+puts "======="
+puts ""
+##################################################
+# Huge intersection tolerance obtained by Face/Face intersection algorithm
+##################################################
+
+binrestore [locate_data_file bug28984_faces.bin] f
+
+explode f
+
+set log [bopcurves f_1 f_2 -2d]
+regexp {Tolerance Reached=([-0-9.+eE]+)} $log full tol_reached
+regexp {([1-9]) curve} $log full nb_curves
+
+if {$nb_curves != 2} {
+ puts "Error: Invalid number of curves"
+}
+
+if {$tol_reached > 0.1} {
+ puts "Error: Too big intersection tolerance"
+}
\ No newline at end of file