const Handle(Geom_OsculatingSurface)& theOscSurf)
: GeomEvaluator_Surface(),
myBaseAdaptor(theBase),
- myOffset(theOffset)
+ myOffset(theOffset),
+ myOscSurf(theOscSurf)
{
- if (theOscSurf.IsNull())
- return; // osculating surface already exists
-
- // Create osculating surface for B-spline and Besier surfaces only
- Handle(Geom_Surface) aBSurf;
- if (myBaseAdaptor->GetType() == GeomAbs_BSplineSurface)
- aBSurf = myBaseAdaptor->BSpline();
- else if (myBaseAdaptor->GetType() == GeomAbs_BezierSurface)
- aBSurf = myBaseAdaptor->Bezier();
- if (!aBSurf.IsNull())
- {
- myBaseSurf = aBSurf;
- myOscSurf = new Geom_OsculatingSurface(aBSurf, Precision::Confusion());
- }
}
void GeomEvaluator_OffsetSurface::D0(
--- /dev/null
+puts "========"
+puts "OCC26914"
+puts "========"
+puts ""
+#################################
+# Hang in surface approximation
+#################################
+
+set max_time 2
+
+restore [locate_data_file OCC26914-a_2773_draw.draw] s
+
+dchrono cr reset
+dchrono cr start
+approxsurf rs s 5e-5 0 0 15 15 100 0
+
+dchrono cr stop
+
+set chrono_info [dchrono cr show]
+regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
+if { $CPU_time > ${max_time} } {
+ puts "Elapsed time of surface approximation is more than ${max_time} seconds - Error"
+} else {
+ puts "Elapsed time of surface approximation is less than ${max_time} seconds - OK"
+}