mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
0027769: BRepOffsetAPI_MakePipeShell produces a face based on degenerated toroidal surface
method BuildKPart was modified in order to create sphere instead of torus in case of major radius <= tolerance Minor corrections in test case bugs/modalg_6/bug27769
This commit is contained in:
parent
7c3ef2f752
commit
b969ebe7cf
@ -836,13 +836,21 @@ static Standard_Boolean IsSweepParallelSpine (const Handle(GeomFill_LocationLaw)
|
||||
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)
|
||||
|
27
tests/bugs/modalg_6/bug27769
Normal file
27
tests/bugs/modalg_6/bug27769
Normal file
@ -0,0 +1,27 @@
|
||||
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."
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user