1. Clearance of fields of class has been added to the method BRepFill_PipeShell::Prepare().
2. Calculation of error on surfaces has been corrected in the method GeomFill_Sweep::BuildKPart().
3. New Draw command "errorsweep" has been added to check the error reached on the surfaces built by BRepOffsetAPI_MakePipeShell algorithm.
//=======================================================================
void BRepFill_PipeShell::Prepare()
{
+ WSeq.Clear();
+ myEdgeNewEdges.Clear();
+
TopoDS_Wire theSect;
if (!IsReady()) throw StdFail_NotDone("PipeShell");
if (!myLocation.IsNull() && !mySection.IsNull()) return; // It is ready
return 0;
}
+//=======================================================================
+//function : errorsweep
+//purpose : returns the summary error on resulting surfaces
+// reached by Sweep
+//=======================================================================
+static Standard_Integer errorsweep(Draw_Interpretor& di,
+ Standard_Integer, const char**)
+{
+ if (!Sweep->IsDone())
+ {
+ di << "Sweep is not done\n";
+ return 1;
+ }
+ Standard_Real ErrorOnSurfaces = Sweep->ErrorOnSurface();
+ di << "Tolerance on surfaces = " << ErrorOnSurfaces << "\n";
+ return 0;
+}
+
//=======================================================================
// simulsweep
//=======================================================================
theCommands.Add("gensweep", "gensweep res subshape_of_profile",
__FILE__,gensweep,g);
+ theCommands.Add("errorsweep", "errorsweep: returns the summary error on resulting surfaces reached by Sweep",
+ __FILE__,errorsweep,g);
+
theCommands.Add("simulsweep", "simulsweep r [n] [option]"
__FILE__,simulsweep,g);
theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]"
error *= C.Radius();
if (error <= Tol) {
SError = error;
- error += Radius + Abs(RotRadius - C.Radius())/2;
- if (error <= Tol || Radius <= Tol) {
+ error += Radius;
+ if (Radius <= Tol) {
// (2.1.a) Sphere
Standard_Real f = UFirst , l = ULast, aRadius = 0.0;
SError = error;
Centre.BaryCenter(1.0, C.Location(), 1.0);
gp_Ax3 AxisOfSphere(Centre, DN, DS);
- if (Radius <= Tol)
- {
- aRadius = C.Radius();
- }
- else
- {
- aRadius = (RotRadius + C.Radius()) / 2;
- }
+ aRadius = C.Radius();
gp_Sphere theSphere( AxisOfSphere, aRadius );
S = new Geom_SphericalSurface(theSphere);
// Pour les spheres on ne peut pas controler le parametre
+++ /dev/null
-puts "========"
-puts "OCC27769"
-puts "========"
-puts ""
-#################################################
-# BRepOffsetAPI_MakePipeShell produces a face
-# based on degenerated toroidal surfaces
-#################################################
-
-restore [locate_data_file bug27769_W5_slot.brep] w
-restore [locate_data_file bug27769_A4_slot.brep] e
-
-wire p e
-mksweep p
-addsweep w
-buildsweep r
-explode r f
-mksurface s1 r_1
-set info [dump s1]
-
-set check [regexp "SphericalSurface" $info]
-
-if { ${check} == 1 } {
- puts "OK: The basic surface is spherical surface."
-} else {
- puts "Faulty: The basic surface is not spherical surface."
-}
\ No newline at end of file
--- /dev/null
+puts "============"
+puts "OCC28661"
+puts "============"
+puts ""
+#######################################################################
+# BRepOffsetAPI_MakePipeShell throws an exception Standard_NoSuchObject
+#######################################################################
+
+restore [locate_data_file bug27769_W5_slot.brep] pr
+restore [locate_data_file bug27769_A4_slot.brep] sp
+wire sp sp
+
+mksweep sp
+addsweep pr
+buildsweep r
+
+explode r f
+mksurface s1 r_1
+set info [dump s1]
+
+set check [regexp "SphericalSurface" $info]
+
+if { ${check} == 1 } {
+ puts "OK: The basic surface is spherical surface."
+} else {
+ puts "Faulty: The basic surface is not spherical surface."
+}
+
+set info1 [errorsweep]
+
+set check [regexp {Tolerance on surfaces = ([0-9\-+Ee.]+)} $info1 str error]
+
+checkreal "Accuracy" $error 0 1.e-10 0
+
+setsweep -FR
+buildsweep r1
--- /dev/null
+puts "============"
+puts "OCC28661"
+puts "============"
+puts ""
+#######################################################################
+# BRepOffsetAPI_MakePipeShell throws an exception Standard_NoSuchObject
+#######################################################################
+
+circle sp 0 0 0 6
+mkedge sp sp
+wire sp sp
+circle pr 0 0 0 0 -1 0 10
+trim pr pr 0 pi
+mkedge pr pr
+wire pr pr
+
+mksweep sp
+addsweep pr
+buildsweep r
+
+explode r f
+mksurface s1 r_1
+set info [dump s1]
+
+set check [regexp "SphericalSurface" $info]
+
+if { ${check} == 1 } {
+ puts "OK: The basic surface is spherical surface."
+} else {
+ puts "Faulty: The basic surface is not spherical surface."
+}
+
+set info1 [errorsweep]
+
+set check [regexp {Tolerance on surfaces = ([0-9\-+Ee.]+)} $info1 str error]
+
+if { $error != 0 } {
+ puts "Faulty: tolerance reached on resulting surfaces is wrong"
+}