mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-16 10:54:53 +03:00
0025838: Wrong result obtained by General Fuse operator.
Changes: class BOPTools_AlgoTools method: Standard_Boolean BOPTools_AlgoTools::GetFaceOff (const TopoDS_Edge& theE1, const TopoDS_Face& theF1, BOPTools_ListOfCoupleOfShape& theLCSOff, TopoDS_Face& theFOff, Handle(IntTools_Context)& theContext) has been changed. The comparison of the angles done with the angular tolerance value Test case for issue CR25838
This commit is contained in:
parent
e002f1ce5b
commit
59f520585b
@ -813,7 +813,7 @@ Standard_Boolean BOPTools_AlgoTools::GetFaceOff
|
||||
{
|
||||
Standard_Boolean bRet;
|
||||
Standard_Real aT, aT1, aT2, aAngle, aTwoPI, aAngleMin, aDt3D;
|
||||
Standard_Real aUmin, aUsup, aVmin, aVsup;
|
||||
Standard_Real aUmin, aUsup, aVmin, aVsup, aPA;
|
||||
gp_Pnt aPn1, aPn2, aPx;
|
||||
gp_Dir aDN1, aDN2, aDBF, aDBF2, aDTF;
|
||||
gp_Vec aVTgt;
|
||||
@ -823,6 +823,7 @@ Standard_Boolean BOPTools_AlgoTools::GetFaceOff
|
||||
BOPTools_ListIteratorOfListOfCoupleOfShape aIt;
|
||||
GeomAPI_ProjectPointOnSurf aProjPL;
|
||||
//
|
||||
aPA=Precision::Angular();
|
||||
aAngleMin=100.;
|
||||
aTwoPI=M_PI+M_PI;
|
||||
aC3D =BRep_Tool::Curve(theE1, aT1, aT2);
|
||||
@ -860,7 +861,7 @@ Standard_Boolean BOPTools_AlgoTools::GetFaceOff
|
||||
aAngle=aTwoPI+aAngle;
|
||||
}
|
||||
//
|
||||
if (aAngle<Precision::Angular()) {
|
||||
if (aAngle<aPA) {
|
||||
if (aF2==theF1) {
|
||||
aAngle=M_PI;
|
||||
}
|
||||
@ -869,6 +870,11 @@ Standard_Boolean BOPTools_AlgoTools::GetFaceOff
|
||||
}
|
||||
}
|
||||
//
|
||||
if (fabs(aAngle-aAngleMin)<aPA) {
|
||||
// the minimal angle can not be found
|
||||
bRet=Standard_False;
|
||||
}
|
||||
//
|
||||
if (aAngle<aAngleMin){
|
||||
aAngleMin=aAngle;
|
||||
theFOff=aF2;
|
||||
|
36
tests/bugs/modalg_5/bug25838
Normal file
36
tests/bugs/modalg_5/bug25838
Normal file
@ -0,0 +1,36 @@
|
||||
puts "========="
|
||||
puts "OCC25838"
|
||||
puts "========="
|
||||
puts ""
|
||||
###############################################
|
||||
# Wrong result obtained by General Fuse operator.
|
||||
###############################################
|
||||
|
||||
restore [locate_data_file bug25715_p02c3s1.brep] b1
|
||||
restore [locate_data_file bug25838_p02c3s2.brep] b2
|
||||
restore [locate_data_file bug25715_p02c3s3.brep] b3
|
||||
|
||||
bclearobjects
|
||||
bcleartools
|
||||
baddobjects b1 b2 b3
|
||||
|
||||
bfillds
|
||||
bbuild result
|
||||
|
||||
set square 3107.42
|
||||
|
||||
set nbshapes_expected "
|
||||
Number of shapes in shape
|
||||
VERTEX : 26
|
||||
EDGE : 45
|
||||
WIRE : 23
|
||||
FACE : 23
|
||||
SHELL : 5
|
||||
SOLID : 5
|
||||
COMPSOLID : 0
|
||||
COMPOUND : 1
|
||||
SHAPE : 128
|
||||
"
|
||||
checknbshapes result ${nbshapes_expected} 1 "Result done by General Fuse operator"
|
||||
|
||||
set 2dviewer 1
|
Loading…
x
Reference in New Issue
Block a user