mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
02b258b41e | ||
|
98369fc73b |
@@ -399,46 +399,7 @@ void BOPAlgo_PaveFiller::PerformEE()
|
|||||||
aTolVnew = aTolMin;
|
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
|
// 1
|
||||||
BOPDS_InterfEE& aEE=aEEs.Appended();
|
BOPDS_InterfEE& aEE=aEEs.Appended();
|
||||||
iX=aEEs.Length()-1;
|
iX=aEEs.Length()-1;
|
||||||
|
@@ -785,30 +785,55 @@ Standard_Integer BOPTools_AlgoTools3D::PointInFace
|
|||||||
gp_Pnt2d& theP2D,
|
gp_Pnt2d& theP2D,
|
||||||
const Handle(IntTools_Context)& theContext)
|
const Handle(IntTools_Context)& theContext)
|
||||||
{
|
{
|
||||||
Standard_Integer i, iErr = 1;
|
// Error status
|
||||||
Standard_Real aUMin, aUMax, aVMin, aVMax, aUx;
|
Standard_Integer iErr = 1;
|
||||||
//
|
|
||||||
|
// Get UV bounds of the face
|
||||||
|
Standard_Real aUMin, aUMax, aVMin, aVMax;
|
||||||
theContext->UVBounds(theF, aUMin, aUMax, aVMin, aVMax);
|
theContext->UVBounds(theF, aUMin, aUMax, aVMin, aVMax);
|
||||||
//
|
|
||||||
gp_Dir2d aD2D(0. , 1.);
|
// Middle point of the 2d bounding box of the face
|
||||||
aUx = IntTools_Tools::IntermediatePoint(aUMin, aUMax);
|
Standard_Real aUx = IntTools_Tools::IntermediatePoint(aUMin, aUMax),
|
||||||
//
|
aVx = IntTools_Tools::IntermediatePoint(aVMin, aVMax);
|
||||||
for (i = 0; i < 2; ++i) {
|
|
||||||
gp_Pnt2d aP2D(aUx, 0.);
|
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);
|
Handle(Geom2d_Line) aL2D = new Geom2d_Line (aP2D, aD2D);
|
||||||
iErr = BOPTools_AlgoTools3D::PointInFace
|
iErr = BOPTools_AlgoTools3D::PointInFace
|
||||||
(theF, aL2D, theP, theP2D, theContext);
|
(theF, aL2D, theP, theP2D, theContext);
|
||||||
if (iErr == 0) {
|
if (iErr == 0)
|
||||||
// done
|
// done
|
||||||
break;
|
return iErr;
|
||||||
}
|
else
|
||||||
else {
|
{
|
||||||
// possible reason - incorrect computation of the 2d box of the face.
|
// Possible reason - incorrect computation of the 2d box of the face.
|
||||||
// try to compute the point with the translated line.
|
// Try to compute the point with the translated line.
|
||||||
aUx = aUMax - (aUx - aUMin);
|
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;
|
return iErr;
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
38
tests/bugs/modalg_7/bug30010_1
Normal file
38
tests/bugs/modalg_7/bug30010_1
Normal 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
|
36
tests/bugs/modalg_7/bug30010_2
Normal file
36
tests/bugs/modalg_7/bug30010_2
Normal 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
|
40
tests/bugs/modalg_7/bug30010_3
Normal file
40
tests/bugs/modalg_7/bug30010_3
Normal 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
|
39
tests/bugs/modalg_7/bug30010_4
Normal file
39
tests/bugs/modalg_7/bug30010_4
Normal 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
|
36
tests/bugs/modalg_7/bug30010_5
Normal file
36
tests/bugs/modalg_7/bug30010_5
Normal 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
|
38
tests/bugs/modalg_7/bug30010_6a
Normal file
38
tests/bugs/modalg_7/bug30010_6a
Normal 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
|
42
tests/bugs/modalg_7/bug30010_6b
Normal file
42
tests/bugs/modalg_7/bug30010_6b
Normal 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
|
36
tests/bugs/modalg_7/bug30010_7
Normal file
36
tests/bugs/modalg_7/bug30010_7
Normal 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
|
37
tests/bugs/modalg_7/bug30010_8
Normal file
37
tests/bugs/modalg_7/bug30010_8
Normal 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
|
Reference in New Issue
Block a user