1. Correct building history: the case of closed spine.
2. Rollback method GeomFill_CorrectedFrenet::InitInterval - correct processing singularities on spine.
3. Correct test cases.
Standard_Boolean BRepFill_LocationLaw::IsClosed() const
{
- return myPath.Closed();
+ if (myPath.Closed())
+ return Standard_True;
+
+ TopoDS_Vertex V1, V2;
+ TopExp::Vertices(myPath, V1, V2);
+ return (V1.IsSame(V2));
}
//=======================================================================
BB.Add(aWire, CurEdge);
} //for (jj = 2; jj <= SeqEdges.Length(); jj++)
//case of closed wire
- if (mySection->IsVClosed() &&
+ if (myLocation->IsClosed() &&
!CurVertex.IsSame(FirstVertex))
{
const TopTools_ListOfShape& Elist = VEmap.FindFromKey(CurVertex);
std::cout << "GeomFill_Pipe cannot make a surface" << std::endl;
return 1;
}
+
+ Standard_Real Accuracy = aPipe.ErrorOnSurf();
+ std::cout << "Accuracy of approximation = " << Accuracy << std::endl;
+
Handle(Geom_Surface) Sur = aPipe.Surface();
TopoDS_Face F;
if (!Sur.IsNull())
gp_Vec Tangent, Normal, BN, cross;
TColStd_SequenceOfReal parameters;
TColStd_SequenceOfReal EvolAT;
- Standard_Real Param = First, L, norm;
+ Standard_Real Param = First, LengthMin, L, norm;
Standard_Boolean isZero = Standard_True, isConst = Standard_True;
- const Standard_Real minnorm = 1.e-16;
Standard_Integer i;
gp_Pnt PonC;
gp_Vec D1;
- frenet->SetInterval(First, Last); //To have the rigth evaluation at bounds
+ frenet->SetInterval(First, Last); //To have right evaluation at bounds
GeomFill_SnglrFunc CS(myCurve);
BndLib_Add3dCurve::Add(CS, First, Last, 1.e-2, Boite);
+ LengthMin = Boite.GetGap()*1.e-4;
aT = gp_Vec(0, 0, 0);
aN = gp_Vec(0, 0, 0);
//Evaluate the Next step
CS.D1(Param, PonC, D1);
-
- L = PonC.XYZ().Modulus()/2;
+ L = Max(PonC.XYZ().Modulus()/2, LengthMin);
norm = D1.Magnitude();
- if (norm <= gp::Resolution())
- {
- //norm = 2.*gp::Resolution();
- norm = minnorm;
+ if (norm < Precision::Confusion()) {
+ norm = Precision::Confusion();
}
currStep = L / norm;
- if (currStep <= gp::Resolution()) //L = 0 => curvature = 0, linear segment
- currStep = Step;
- if (currStep < Precision::Confusion()) //too small step
- currStep = Precision::Confusion();
- if (currStep > Step) //too big step
- currStep = Step;//default value
+ if (currStep > Step) currStep = Step;//default value
}
else
currStep /= 2; // Step too long !
return 1;
}
+ Standard_Real Accuracy = Pipe.ErrorOnSurf();
+ di << "Accuracy of approximation = " << Accuracy << "\n";
+
DrawTrSurf::Set(a[1], Pipe.Surface());
return 0;
di << "GeomFill_Pipe cannot make a surface\n";
return 1;
}
+
+ Standard_Real Accuracy = Pipe.ErrorOnSurf();
+ di << "Accuracy of approximation = " << Accuracy << "\n";
+
DrawTrSurf::Set(a[indice_path-1], Pipe.Surface());
return 0;
-puts "========"
-puts "OCC25883"
-puts "========"
+puts "============================================================="
+puts "OCC25883: BRepOffsetAPI_MakePipeShell produces invalid result"
+puts "============================================================="
puts ""
-#######################################################
-# BRepOffsetAPI_MakePipeShell produces invalid result
-#######################################################
restore [locate_data_file OCC25883_shape.brep] a
addsweep a_2
buildsweep res
-donly res
-fit
-
set bug_info [checkshape res]
if {[string compare $bug_info "This shape seems to be valid"] != 0} {
puts "ERROR: OCC25883 is reproduced."
}
+set tolres [checkmaxtol res]
+
+if { ${tolres} > 1.e-4} {
+ puts "Error: bad tolerance of result"
+}
+
+explode res
+mksurface surf2 res_2
+donly surf2
+fit
+
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
explode pr_1 v
generated r3 sweep_hist pr_1_3
-checkprops r3 -l 130.036
+checkprops r3 -l 65.0179
+puts "TODO OCC21413 ALL: bad accuracy of approximation"
+
puts "========"
puts "OCC21413"
puts "========"
restore [locate_data_file bug21413_dc1_err.draw] a
-tuyau result a 1
+set log [tuyau result a 1]
+
+regexp {Accuracy of approximation = ([0-9+-.eE]*)} $log full accuracy
+
+if { ${accuracy} > 0.0001} {
+ puts "Error: bad accuracy of approximation"
+}
checkview -display result -2d -path ${imagedir}/${test_image}.png
-puts "TODO OCC23942 ALL: is not equal"
+puts "TODO OCC21413 ALL: bad accuracy of approximation"
puts "========"
puts "OCC23942"
### 1
#
interpol c [locate_data_file bug23942_points.txt]
-tuyau r_1 c 5
+set log [tuyau r_1 c 5]
+
+regexp {Accuracy of approximation = ([0-9+-.eE]*)} $log full accuracy
+
+if { ${accuracy} > 0.0001} {
+ puts "Error: bad accuracy of approximation"
+}
decho off
dlog reset
#
save c ${imagedir}/cc
restore ${imagedir}/cc
-tuyau r_2 cc 5
+set log [tuyau r_2 cc 5]
+
+regexp {Accuracy of approximation = ([0-9+-.eE]*)} $log full accuracy
+
+if { ${accuracy} > 0.0001} {
+ puts "Error: bad accuracy of approximation"
+}
decho off
dlog reset