mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0027087: [Regression to OCCT 6.7.1] BRepExtrema_DistShapeShape gives wrong result
Extrema_ExtCs.cxx: number of subdivision is incresed for curve; Modifications to fix regressions of some tests IntTools_BeanFaceIntersector.cxx: restriction of curve, which is used in Extrema_ExtCS ProjLib_CompProjectedCurve.cxx: tolerance is reduced for Extrema_ExtCS BRepOffset_Tool.cxx: checking common vertex if it is Null tests/bugs/modalg_7/bug27087 : test case added. tests/bugs/modalg_5/bug25232_8 : test is modified according to new behavior of algorithms
This commit is contained in:
parent
72e6020d50
commit
79aa9b5cf6
@ -1345,7 +1345,11 @@ static TopoDS_Edge AssembleEdge(const BOPDS_PDS& pDS,
|
|||||||
{
|
{
|
||||||
TopoDS_Vertex CV, V11, V12, V21, V22;
|
TopoDS_Vertex CV, V11, V12, V21, V22;
|
||||||
TopExp::CommonVertex( CurEdge, anEdge, CV );
|
TopExp::CommonVertex( CurEdge, anEdge, CV );
|
||||||
Standard_Boolean IsAutonomCV = IsAutonomVertex( CV, pDS, F1, F2 );
|
Standard_Boolean IsAutonomCV = Standard_False;
|
||||||
|
if (!CV.IsNull())
|
||||||
|
{
|
||||||
|
IsAutonomCV = IsAutonomVertex(CV, pDS, F1, F2);
|
||||||
|
}
|
||||||
if (IsAutonomCV)
|
if (IsAutonomCV)
|
||||||
{
|
{
|
||||||
aGlueTol = BRep_Tool::Tolerance(CV);
|
aGlueTol = BRep_Tool::Tolerance(CV);
|
||||||
|
@ -105,7 +105,7 @@ void Extrema_ExtCS::Perform(const Adaptor3d_Curve& C,
|
|||||||
mySqDist.Clear();
|
mySqDist.Clear();
|
||||||
Standard_Integer i, j;
|
Standard_Integer i, j;
|
||||||
Standard_Integer NbT, NbU, NbV;
|
Standard_Integer NbT, NbU, NbV;
|
||||||
NbT = NbU = NbV = 10;
|
NbT = 12; NbU = NbV = 10;
|
||||||
GeomAbs_CurveType myCtype = C.GetType();
|
GeomAbs_CurveType myCtype = C.GetType();
|
||||||
|
|
||||||
myDone = Standard_False;
|
myDone = Standard_False;
|
||||||
|
@ -913,7 +913,17 @@ void IntTools_BeanFaceIntersector::ComputeUsingExtremum()
|
|||||||
}
|
}
|
||||||
|
|
||||||
GeomAdaptor_Curve aGACurve(aCurve, anarg1, anarg2);
|
GeomAdaptor_Curve aGACurve(aCurve, anarg1, anarg2);
|
||||||
Extrema_ExtCS theExtCS(aGACurve, aGASurface, Tol, Tol);
|
Extrema_ExtCS theExtCS;
|
||||||
|
theExtCS.Initialize(aGASurface, myUMinParameter, myUMaxParameter,
|
||||||
|
myVMinParameter, myVMaxParameter, Tol, Tol);
|
||||||
|
Standard_Real first = aCurve->FirstParameter(), last = aCurve->LastParameter();
|
||||||
|
if (aCurve->IsPeriodic() ||
|
||||||
|
(anarg1 >= first - Precision::PConfusion() && anarg2 <= last + Precision::PConfusion()))
|
||||||
|
{
|
||||||
|
//Extrema_ExtCS theExtCS(aGACurve, aGASurface, Tol, Tol);
|
||||||
|
theExtCS.Perform(aGACurve, anarg1, anarg2);
|
||||||
|
}
|
||||||
|
|
||||||
myExtrema = theExtCS;
|
myExtrema = theExtCS;
|
||||||
|
|
||||||
if(myExtrema.IsDone() && (myExtrema.NbExt() || myExtrema.IsParallel())) {
|
if(myExtrema.IsDone() && (myExtrema.NbExt() || myExtrema.IsParallel())) {
|
||||||
|
@ -636,8 +636,8 @@ void ProjLib_CompProjectedCurve::Init()
|
|||||||
Standard_Boolean FromLastU = Standard_False,
|
Standard_Boolean FromLastU = Standard_False,
|
||||||
isSplitsComputed = Standard_False;
|
isSplitsComputed = Standard_False;
|
||||||
|
|
||||||
const Standard_Real aTol3D = Precision::Confusion();
|
const Standard_Real aTolExt = Precision::PConfusion();
|
||||||
Extrema_ExtCS CExt(myCurve->Curve(), mySurface->Surface(), aTol3D, aTol3D);
|
Extrema_ExtCS CExt(myCurve->Curve(), mySurface->Surface(), aTolExt, aTolExt);
|
||||||
if (CExt.IsDone() && CExt.NbExt())
|
if (CExt.IsDone() && CExt.NbExt())
|
||||||
{
|
{
|
||||||
// Search for the minimum solution.
|
// Search for the minimum solution.
|
||||||
|
@ -27,5 +27,5 @@ mkvolume result fcon3 fp
|
|||||||
checkprops result -s 1706.51
|
checkprops result -s 1706.51
|
||||||
checkshape result
|
checkshape result
|
||||||
|
|
||||||
checknbshapes result -vertex 5 -edge 6 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 17
|
checknbshapes result -vertex 4 -edge 5 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 15
|
||||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||||
|
16
tests/bugs/modalg_7/bug27087
Normal file
16
tests/bugs/modalg_7/bug27087
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
puts "========"
|
||||||
|
puts "OCC27087"
|
||||||
|
puts "========"
|
||||||
|
puts ""
|
||||||
|
#######################################################
|
||||||
|
# [Regression to OCCT 6.7.1] BRepExtrema_DistShapeShape gives wrong result
|
||||||
|
#######################################################
|
||||||
|
|
||||||
|
smallview
|
||||||
|
restore [locate_data_file bug27087.brep] a
|
||||||
|
explode a
|
||||||
|
distmini r a_1 a_2
|
||||||
|
if { [dval r_val] > 0.0001 } { puts "Error: too big deviation, should be 0!" }
|
||||||
|
|
||||||
|
fit
|
||||||
|
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user