1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-16 10:08:36 +03:00

0024313: BRepAlgoAPI_Section and IntTools_FaceFace aren't written to handle Geom_SurfaceOfLinearExtrusion

Test case for issue CR24313
This commit is contained in:
ifv 2013-12-05 15:16:11 +04:00 committed by bugmaster
parent 12c76beeb0
commit 94218044fe
2 changed files with 866 additions and 840 deletions

View File

@ -1197,7 +1197,7 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
// //
bPCurvesOk = Standard_True; bPCurvesOk = Standard_True;
reapprox:; reapprox:;
Tolpc = myTolApprox; Tolpc = myTolApprox;
bAvoidLineConstructor = Standard_False; bAvoidLineConstructor = Standard_False;
@ -1332,7 +1332,6 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
} }
mySeqOfCurve.Append(aCurve); mySeqOfCurve.Append(aCurve);
} // end of if (!Precision::IsNegativeInfinite(fprm) && !Precision::IsPositiveInfinite(lprm)) } // end of if (!Precision::IsNegativeInfinite(fprm) && !Precision::IsPositiveInfinite(lprm))
else { else {
// on regarde si on garde // on regarde si on garde
// //
@ -1353,6 +1352,19 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
gp_Pnt ptref(newc->Value(aTestPrm)); gp_Pnt ptref(newc->Value(aTestPrm));
// //
GeomAbs_SurfaceType typS1 = myHS1->GetType();
GeomAbs_SurfaceType typS2 = myHS2->GetType();
if( typS1 == GeomAbs_SurfaceOfExtrusion ||
typS1 == GeomAbs_OffsetSurface ||
typS1 == GeomAbs_SurfaceOfRevolution ||
typS2 == GeomAbs_SurfaceOfExtrusion ||
typS2 == GeomAbs_OffsetSurface ||
typS2 == GeomAbs_SurfaceOfRevolution)
{
Handle(Geom2d_BSplineCurve) H1;
mySeqOfCurve.Append(IntTools_Curve(newc, H1, H1));
continue;
}
Standard_Real u1, v1, u2, v2, Tol; Standard_Real u1, v1, u2, v2, Tol;
@ -1515,7 +1527,7 @@ static Standard_Boolean isTreatAnalityc(const TopoDS_Face& theF1,
// on regarde si on garde // on regarde si on garde
// //
if (aNbParts==1) { if (aNbParts==1) {
// if (Abs(fprm) < RealEpsilon() && Abs(lprm-2.*M_PI) < RealEpsilon()) { // if (Abs(fprm) < RealEpsilon() && Abs(lprm-2.*M_PI) < RealEpsilon()) {
if (Abs(fprm) <= aRealEpsilon && Abs(lprm-2.*M_PI) <= aRealEpsilon) { if (Abs(fprm) <= aRealEpsilon && Abs(lprm-2.*M_PI) <= aRealEpsilon) {
IntTools_Curve aCurve; IntTools_Curve aCurve;
Handle(Geom_TrimmedCurve) aTC3D=new Geom_TrimmedCurve(newc,fprm,lprm); Handle(Geom_TrimmedCurve) aTC3D=new Geom_TrimmedCurve(newc,fprm,lprm);

14
tests/bugs/modalg_5/bug24313 Executable file
View File

@ -0,0 +1,14 @@
puts "============"
puts "OCC24313"
puts "============"
puts ""
#######################################################################
# BRepAlgoAPI_Section and IntTools_FaceFace aren't written to handle Geom_SurfaceOfLinearExtrusion
#######################################################################
circle c 0 0 0 0 0 1 1 0 0 100
extsurf s1 c 0 0 1
plane s2 0 0 0 1 0 0 0 1 0
mkface b1 s1
mkface b2 s2
bopcurves b1 b2