Parameterization speed is taken into account to avoid ProjLib projector usage in case of bad input data.
Test case is added.
Test cases correction.
}
GeomAdaptor_Curve aC3DAdaptor(c3d);
-
+ Standard_Real aMinParSpeed = Precision::Infinite(); // Minimal parameterization speed.
for(; anIdx <= bspl->NbKnots() && aFirstParam < Last; anIdx++)
{
// Fill current knot interval.
{
Standard_Real aParam = aFirstParam + aStep * anIntIdx;
aC3DAdaptor.D0 (aParam, p3d2);
- aLength3d += p3d2.Distance(p3d1);
+ const Standard_Real aDist = p3d2.Distance(p3d1);
+
+ aLength3d += aDist;
p3d1 = p3d2;
+
+ aMinParSpeed = Min(aMinParSpeed, aDist / aStep);
}
const Standard_Real aCoeff = aLength3d / (aLastParam - aFirstParam);
if (Abs(aCoeff) > gp::Resolution())
}
const Standard_Real aMaxQuotientCoeff = 1500.0;
- if (anEvenlyCoeff > aMaxQuotientCoeff)
+ if (anEvenlyCoeff > aMaxQuotientCoeff &&
+ aMinParSpeed > Precision::Confusion() )
{
PerformByProjLib(c3d, First, Last, c2d);
// PerformByProjLib fail detection:
--- /dev/null
+puts "============"
+puts "OCC27569"
+puts "============"
+puts ""
+######################################################
+# [Regression in 6.9.0] Projecting a curve hangs
+######################################################
+
+pload QAcommands
+
+restore [locate_data_file bug27569.brep] aS
+explode aS
+mkcurve c aS_1
+mksurface s aS_2
+
+# Performance check
+chrono h reset; chrono h start
+OCC24008 c s;
+chrono h stop; set q [dchrono h show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $q full aTime
+
+set MAX_TIME 1.0
+
+if { $aTime > ${MAX_TIME} } {
+ puts "Elapsed time is more than ${MAX_TIME} seconds - Faulty"
+} else {
+ puts "Elapsed time is less than ${MAX_TIME} seconds - OK"
+}
# !!!! This file is generated automatically, do not edit manually! See end script
-puts "TODO CR23096 ALL: NBSHAPES : Faulty"
+puts "TODO CR23096 ALL: TPSTAT : Faulty"
set filename ie_soapbox-A.stp
DATA : Faulties = 0 ( 0 ) Warnings = 0 ( 0 ) Summary = 0 ( 0 )
TPSTAT : Faulties = 0 ( 0 ) Warnings = 28 ( 20 ) Summary = 28 ( 20 )
CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
-NBSHAPES : Solid = 2 ( 2 ) Shell = 2 ( 2 ) Face = 112 ( 112 ) Summary = 685 ( 687 )
-STATSHAPE : Solid = 2 ( 2 ) Shell = 2 ( 2 ) Face = 112 ( 112 ) FreeWire = 0 ( 0 ) FreeEdge = 0 ( 0 ) SharedEdge = 286 ( 288 )
+NBSHAPES : Solid = 2 ( 2 ) Shell = 2 ( 2 ) Face = 112 ( 112 ) Summary = 687 ( 687 )
+STATSHAPE : Solid = 2 ( 2 ) Shell = 2 ( 2 ) Face = 112 ( 112 ) FreeWire = 0 ( 0 ) FreeEdge = 0 ( 0 ) SharedEdge = 288 ( 288 )
TOLERANCE : MaxTol = 0.5386330267 ( 1.019942733 ) AvgTol = 0.009444234359 ( 0.01316262156 )
LABELS : N0Labels = 1 ( 1 ) N1Labels = 0 ( 0 ) N2Labels = 0 ( 0 ) TotalLabels = 1 ( 1 ) NameLabels = 1 ( 1 ) ColorLabels = 0 ( 0 ) LayerLabels = 0 ( 0 )
PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )