1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Compare commits

...

2 Commits

Author SHA1 Message Date
emv
02b258b41e BOPAlgo_PaveFiller::PerformEE - Consider the IsOnPave check satisfying for vertex creation and remove other checks.
BOPTools_AlgoTools3D::PointInFace - Making the method more robust by checking more hatching lines.
2018-08-03 14:44:49 +03:00
emv
98369fc73b 0030010: Invalid result of FUSE operation in series of test cases
Test cases for the issue.
2018-08-03 14:44:38 +03:00
11 changed files with 385 additions and 57 deletions

View File

@@ -399,46 +399,7 @@ void BOPAlgo_PaveFiller::PerformEE()
aTolVnew = aTolMin;
}
}
// <-LXBR
{
Standard_Integer nVS[2], iFound;
Standard_Real aTolVx, aD2, aDT2;
TColStd_MapOfInteger aMV;
gp_Pnt aPx;
//
iFound=0;
j=-1;
aMV.Add(nV[0]);
aMV.Add(nV[1]);
//
if (aMV.Contains(nV[2])) {
++j;
nVS[j]=nV[2];
}
if (aMV.Contains(nV[3])) {
++j;
nVS[j]=nV[3];
}
//
for (Standard_Integer k1=0; k1<=j; ++k1) {
const TopoDS_Vertex& aVx= *(TopoDS_Vertex*)&(myDS->Shape(nVS[k1]));
aTolVx=BRep_Tool::Tolerance(aVx);
aPx=BRep_Tool::Pnt(aVx);
aD2=aPnew.SquareDistance(aPx);
//
aDT2=100.*(aTolVnew+aTolVx)*(aTolVnew+aTolVx);
//
if (aD2<aDT2) {
iFound=1;
break;
}
}
//
if (iFound) {
continue;
}
}
//
// 1
BOPDS_InterfEE& aEE=aEEs.Appended();
iX=aEEs.Length()-1;

View File

@@ -785,30 +785,55 @@ Standard_Integer BOPTools_AlgoTools3D::PointInFace
gp_Pnt2d& theP2D,
const Handle(IntTools_Context)& theContext)
{
Standard_Integer i, iErr = 1;
Standard_Real aUMin, aUMax, aVMin, aVMax, aUx;
//
// Error status
Standard_Integer iErr = 1;
// Get UV bounds of the face
Standard_Real aUMin, aUMax, aVMin, aVMax;
theContext->UVBounds(theF, aUMin, aUMax, aVMin, aVMax);
//
gp_Dir2d aD2D(0. , 1.);
aUx = IntTools_Tools::IntermediatePoint(aUMin, aUMax);
//
for (i = 0; i < 2; ++i) {
gp_Pnt2d aP2D(aUx, 0.);
// Middle point of the 2d bounding box of the face
Standard_Real aUx = IntTools_Tools::IntermediatePoint(aUMin, aUMax),
aVx = IntTools_Tools::IntermediatePoint(aVMin, aVMax);
for (Standard_Integer i = 0; i < 4; ++i)
{
// Point to start the hatching line
gp_Pnt2d aP2D(aUx, aVx);
// Direction for the hatching line
gp_Dir2d aD2D = (i < 2) ? gp::DY2d() : gp::DX2d();
Handle(Geom2d_Line) aL2D = new Geom2d_Line (aP2D, aD2D);
iErr = BOPTools_AlgoTools3D::PointInFace
(theF, aL2D, theP, theP2D, theContext);
if (iErr == 0) {
if (iErr == 0)
// done
break;
}
else {
// possible reason - incorrect computation of the 2d box of the face.
// try to compute the point with the translated line.
aUx = aUMax - (aUx - aUMin);
return iErr;
else
{
// Possible reason - incorrect computation of the 2d box of the face.
// Try to compute the point with the translated line.
if (i < 2)
aUx = aUMax - (aUx - aUMin);
else
aVx = aVMax - (aVx - aVMin);
}
}
//
// The tries to find the point using the hatching line passing through
// the middle of the bounding box of the face have failed.
// Try to start hatching line at the middle of the edges of the face.
TopExp_Explorer anExpE(theF, TopAbs_EDGE);
for (; anExpE.More(); anExpE.Next())
{
const TopoDS_Edge& aE = TopoDS::Edge(anExpE.Current());
Standard_Real aT1, aT2;
BRep_Tool::Range(aE, aT1, aT2);
iErr = BOPTools_AlgoTools3D::PointInFace
(theF, aE, 0.5 * (aT1 + aT2), 0.0, theP, theP2D, theContext);
if (iErr == 0)
return iErr;
}
return iErr;
}
//=======================================================================

View File

@@ -0,0 +1,38 @@
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "TODO CR30010 All: Error : The area of result shape is"
puts "TODO CR30010 All: Error : is WRONG because number of"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"
puts "========"
puts ""
cpulimit 3000
brestore [locate_data_file bug30010_Eckardt_Run_28_1.brep] s1
brestore [locate_data_file bug30010_Eckardt_Run_28_2.brep] s2
bdrawwarnshapes 1
bnondestructive 1
bfuzzyvalue 0.0
brunparallel 1
bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds
bbop result 1
checkshape result
checknbshapes result -shell 1 -solid 1
checkprops result -s 176281 -v 1.47407e+006
incmesh result 0.01
if {[tricheck result] != ""} {
puts "Error: Meshing not done"
}
boptions -default
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,36 @@
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"
puts "========"
puts ""
cpulimit 3000
brestore [locate_data_file bug30010_Eckardt_Run_31_1.brep] s1
brestore [locate_data_file bug30010_Eckardt_Run_31_2.brep] s2
bdrawwarnshapes 1
bnondestructive 1
bfuzzyvalue 0.0
brunparallel 1
bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds
bbop result 1
checkshape result
checknbshapes result -wire 44 -face 44 -shell 1 -solid 1
checkprops result -s 153019 -v 1.16027e+006
incmesh result 0.01
if {[tricheck result] != ""} {
puts "Error: Meshing not done"
}
boptions -default
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,40 @@
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "TODO CR30010 All: Error : is WRONG because number of"
puts "TODO CR30010 All: Warning: Building 2D curve of edge on face has failed"
puts "TODO CR30010 All: Error: Meshing not done"
puts "TODO CR30010 All: Error : The area of result shape is"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"
puts "========"
puts ""
cpulimit 3000
brestore [locate_data_file bug30010_Eckardt_Run_32_1.brep] s1
brestore [locate_data_file bug30010_Eckardt_Run_32_2.brep] s2
bdrawwarnshapes 1
bnondestructive 1
bfuzzyvalue 0.0
brunparallel 1
bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds
bbop result 1
checkshape result
checknbshapes result -wire 49 -face 49 -shell 1 -solid 1
checkprops result -s 163660 -v 1.2937e+006
incmesh result 0.01
if {[tricheck result] != ""} {
puts "Error: Meshing not done"
}
boptions -default
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,39 @@
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "TODO CR30010 All: Error : is WRONG because number of"
puts "TODO CR30010 All: Error: Meshing not done"
puts "TODO CR30010 All: Faulty shapes in variables faulty_1 to faulty_"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"
puts "========"
puts ""
cpulimit 3000
brestore [locate_data_file bug30010_bigFillet_Run_12_1.brep] s1
brestore [locate_data_file bug30010_bigFillet_Run_12_2.brep] s2
bdrawwarnshapes 1
bnondestructive 1
bfuzzyvalue 0.0
brunparallel 1
bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds
bbop result 1
checkshape result
checknbshapes result -wire 80 -face 80 -shell 1 -solid 1
checkprops result -s 131053 -v 1.23621e+006
incmesh result 0.01
if {[tricheck result] != ""} {
puts "Error: Meshing not done"
}
boptions -default
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,36 @@
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"
puts "========"
puts ""
cpulimit 3000
brestore [locate_data_file bug30010_bigFillet_Run_16_1.brep] s1
brestore [locate_data_file bug30010_bigFillet_Run_16_2.brep] s2
bdrawwarnshapes 1
bnondestructive 1
bfuzzyvalue 0.0
brunparallel 1
bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds
bbop result 1
checkshape result
checknbshapes result -wire 78 -face 78 -shell 1 -solid 1
checkprops result -s 131726 -v 1.22931e+006
incmesh result 0.01
if {[tricheck result] != ""} {
puts "Error: Meshing not done"
}
boptions -default
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,38 @@
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "TODO CR30010 All: Error : The area of result shape is"
puts "TODO CR30010 All: Error : is WRONG because number of"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"
puts "========"
puts ""
cpulimit 3000
brestore [locate_data_file bug30010_Eckardt_Run_20_1.brep] s1
brestore [locate_data_file bug30010_Eckardt_Run_20_2.brep] s2
bdrawwarnshapes 1
bnondestructive 1
bfuzzyvalue 0.0
brunparallel 1
bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds
bbop result 1
checkshape result
checknbshapes result -shell 1 -solid 1
checkprops result -s 0 -v 1.07073e+006
incmesh result 0.01
if {[tricheck result] != ""} {
puts "Error: Meshing not done"
}
boptions -default
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,42 @@
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "TODO CR30010 All: Error : The area of result shape is"
puts "TODO CR30010 All: Error : is WRONG because number of"
puts "TODO CR30010 All: Error: Meshing not done"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"
puts "========"
puts ""
cpulimit 3000
brestore [locate_data_file bug30010_Eckardt_Run_20_1.brep] s1
brestore [locate_data_file bug30010_Eckardt_Run_20_2.brep] s2
breducetolerance s1
breducetolerance s2
bdrawwarnshapes 1
bnondestructive 1
bfuzzyvalue 0.0
brunparallel 1
bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds
bbop result 1
checkshape result
checknbshapes result -wire 59 -face 59 -shell 1 -solid 1
checkprops result -s 0 -v 1.07073e+006
incmesh result 0.01
if {[tricheck result] != ""} {
puts "Error: Meshing not done"
}
boptions -default
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,36 @@
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"
puts "========"
puts ""
cpulimit 3000
brestore [locate_data_file bug30010_Eckardt_Run_27_1.brep] s1
brestore [locate_data_file bug30010_Eckardt_Run_27_2.brep] s2
bdrawwarnshapes 1
bnondestructive 1
bfuzzyvalue 0.0
brunparallel 1
bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds
bbop result 1
checkshape result
checknbshapes result -wire 48 -face 48 -shell 1 -solid 1
checkprops result -s 162464 -v 1.30125e+006
incmesh result 0.01
if {[tricheck result] != ""} {
puts "Error: Meshing not done"
}
boptions -default
checkview -display result -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,37 @@
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "TODO CR26106 All: Error: Meshing not done"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"
puts "========"
puts ""
cpulimit 3000
brestore [locate_data_file bug30010_Eckardt_Run_29_1.brep] s1
brestore [locate_data_file bug30010_Eckardt_Run_29_2.brep] s2
bdrawwarnshapes 1
bnondestructive 1
bfuzzyvalue 0.0
brunparallel 1
bclearobjects
bcleartools
baddobjects s1
baddtools s2
bfillds
bbop result 1
checkshape result
checknbshapes result -wire 51 -face 51 -shell 1 -solid 1
checkprops result -s 194270 -v 1.70455e+006
incmesh result 0.01
if {[tricheck result] != ""} {
puts "Error: Meshing not done"
}
boptions -default
checkview -display result -2d -path ${imagedir}/${test_image}.png