mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0032809: Sweep algorithm with Round Corner mode failed
Fix indentation within GeomFill_Sweep.cxx 0032809: Sweep algorithm with Round Corner mode failed Add fix what repair shipping at corner after circle edge at path Add fix test for bug 24909_3
This commit is contained in:
parent
5078d0d84e
commit
a793b75e21
@ -861,7 +861,8 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
|
|||||||
Prof2 = BRep_Tool::Curve(E2, f2, l2);
|
Prof2 = BRep_Tool::Curve(E2, f2, l2);
|
||||||
|
|
||||||
// Indeed, both Prof1 and Prof2 are the same curves but in different positions
|
// Indeed, both Prof1 and Prof2 are the same curves but in different positions
|
||||||
|
// Prof1's param domain may equals to Prof2's param domain *(-1), which means EF.Orientation() == EL.Orientation()
|
||||||
|
Standard_Boolean bSameCurveDomain = EF.Orientation() != EL.Orientation();
|
||||||
gp_Pnt P1, P2, P;
|
gp_Pnt P1, P2, P;
|
||||||
|
|
||||||
// Choose the angle of opening
|
// Choose the angle of opening
|
||||||
@ -887,7 +888,8 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const gp_Pnt aP2 = Prof2->Value(aPrm[aMaxIdx]).Transformed(aTf);
|
const Standard_Real aPrm2[] = { f2, 0.5*(f2 + l2), l2 };
|
||||||
|
const gp_Pnt aP2 = Prof2->Value(aPrm2[bSameCurveDomain ? aMaxIdx : 2 - aMaxIdx]).Transformed(aTf);
|
||||||
const gp_Vec2d aV1(aP1[aMaxIdx].Z(), aP1[aMaxIdx].X());
|
const gp_Vec2d aV1(aP1[aMaxIdx].Z(), aP1[aMaxIdx].X());
|
||||||
const gp_Vec2d aV2(aP2.Z(), aP2.X());
|
const gp_Vec2d aV2(aP2.Z(), aP2.X());
|
||||||
if (aV1.SquareMagnitude() <= gp::Resolution() ||
|
if (aV1.SquareMagnitude() <= gp::Resolution() ||
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
puts "TODO OCC24909 ALL: TEST INCOMPLETE"
|
puts "TODO OCC24909 ALL: Error: sweep failed"
|
||||||
|
|
||||||
puts "========"
|
puts "========"
|
||||||
puts "OCC24909"
|
puts "OCC24909"
|
||||||
@ -28,4 +28,8 @@ trotate Circle001 0 0 0 0.577350269189625731 0.577350269189625731 0.577350269189
|
|||||||
ttranslate Circle001 0 -71 203.5
|
ttranslate Circle001 0 -71 203.5
|
||||||
addsweep Circle001
|
addsweep Circle001
|
||||||
|
|
||||||
buildsweep Sweep001 -C -S
|
set result [buildsweep Sweep001 -C -S]
|
||||||
|
|
||||||
|
if {[regexp "Not Done" $result]} {
|
||||||
|
puts "Error: sweep failed"
|
||||||
|
}
|
16
tests/pipe/bugs/bug32809
Normal file
16
tests/pipe/bugs/bug32809
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "bug32809: Sweep algorithm with Round Corner doesnot work"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
restore [locate_data_file bug32809_path.brep] p
|
||||||
|
restore [locate_data_file bug32809_profile.brep] pr
|
||||||
|
|
||||||
|
mksweep p
|
||||||
|
setsweep -CF
|
||||||
|
addsweep pr
|
||||||
|
|
||||||
|
buildsweep result -R -S
|
||||||
|
|
||||||
|
checkshape result
|
||||||
|
checknbshapes result -vertex 140 -edge 285 -wire 140 -face 140 -shell 1
|
1
tests/pipe/bugs/end
Normal file
1
tests/pipe/bugs/end
Normal file
@ -0,0 +1 @@
|
|||||||
|
puts "TEST COMPLETED"
|
Loading…
x
Reference in New Issue
Block a user