if (error <= Tol) {
SError = error;
error += Radius + Abs(RotRadius - C.Radius())/2;
- if (error <= Tol) {
+ if (error <= Tol || Radius <= Tol) {
// (2.1.a) Sphere
- Standard_Real f = UFirst , l = ULast;
+ 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);
- gp_Sphere theSphere( AxisOfSphere, (RotRadius + C.Radius())/2 );
+ if (Radius <= Tol)
+ {
+ aRadius = C.Radius();
+ }
+ else
+ {
+ aRadius = (RotRadius + C.Radius()) / 2;
+ }
+ gp_Sphere theSphere( AxisOfSphere, aRadius );
S = new Geom_SphericalSurface(theSphere);
// Pour les spheres on ne peut pas controler le parametre
// V (donc U car myExchUV = Standard_True)
--- /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