mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0025319: Bop Common produces strange results with same shapes.
class BOPAlgo_Builder method void BOPAlgo_Builder::FillIn3DParts (BOPCol_DataMapOfShapeListOfShape& theInParts, BOPCol_DataMapOfShapeShape& theDraftSolids, const BOPCol_BaseAllocator&) Sort faces before its classification relatively to the solid. Test cases for issue CR25319 Correction of test cases for issue CR25319
This commit is contained in:
parent
2a2e3ecdc7
commit
4691b61a72
@ -65,6 +65,7 @@
|
|||||||
#include <BOPTools_Set.hxx>
|
#include <BOPTools_Set.hxx>
|
||||||
//
|
//
|
||||||
#include <BOPAlgo_BuilderSolid.hxx>
|
#include <BOPAlgo_BuilderSolid.hxx>
|
||||||
|
#include <NCollection_Array1.hxx>
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
@ -313,6 +314,14 @@ void BOPAlgo_Builder::FillIn3DParts
|
|||||||
aNbFP=aBBTree.Select(aSelector);
|
aNbFP=aBBTree.Select(aSelector);
|
||||||
//
|
//
|
||||||
const BOPCol_ListOfInteger& aLIFP=aSelector.Indices();
|
const BOPCol_ListOfInteger& aLIFP=aSelector.Indices();
|
||||||
|
//sort indices
|
||||||
|
NCollection_Array1<Standard_Integer> aIVec(1, aNbFP);
|
||||||
|
aItLI.Initialize(aLIFP);
|
||||||
|
for (k = 1; aItLI.More(); aItLI.Next(), ++k) {
|
||||||
|
nFP=aItLI.Value();
|
||||||
|
aIVec(k) = nFP;
|
||||||
|
}
|
||||||
|
std::sort(aIVec.begin(), aIVec.end());
|
||||||
//
|
//
|
||||||
// 2.5. Collect faces that are IN aSolid [ aLFIN ]
|
// 2.5. Collect faces that are IN aSolid [ aLFIN ]
|
||||||
BOPCol_ListOfShape aLFP(aAlr1);
|
BOPCol_ListOfShape aLFP(aAlr1);
|
||||||
@ -322,9 +331,8 @@ void BOPAlgo_Builder::FillIn3DParts
|
|||||||
//
|
//
|
||||||
BOPTools::MapShapes(aSD, TopAbs_EDGE, aME);
|
BOPTools::MapShapes(aSD, TopAbs_EDGE, aME);
|
||||||
//
|
//
|
||||||
aItLI.Initialize(aLIFP);
|
for (k = 1; k <= aNbFP; ++k) {
|
||||||
for (; aItLI.More(); aItLI.Next()) {
|
nFP = aIVec(k);
|
||||||
nFP=aItLI.Value();
|
|
||||||
const BOPAlgo_ShapeBox& aSBF=aDMISB.Find(nFP);
|
const BOPAlgo_ShapeBox& aSBF=aDMISB.Find(nFP);
|
||||||
const TopoDS_Face& aFP=(*(TopoDS_Face*)&aSBF.Shape());
|
const TopoDS_Face& aFP=(*(TopoDS_Face*)&aSBF.Shape());
|
||||||
if (aMF.Contains(aFP)) {
|
if (aMF.Contains(aFP)) {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
puts "TODO #25319 ALL: Error : The area of the resulting shape is"
|
||||||
|
|
||||||
## cts20461
|
## cts20461
|
||||||
|
|
||||||
restore [locate_data_file cts20461.rle] a
|
restore [locate_data_file cts20461.rle] a
|
||||||
|
28
tests/bugs/modalg_5/bug25319_1
Normal file
28
tests/bugs/modalg_5/bug25319_1
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
puts "TODO OCC25319 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
|
|
||||||
|
puts "================"
|
||||||
|
puts "OCC25319"
|
||||||
|
puts "================"
|
||||||
|
puts ""
|
||||||
|
########################################################################
|
||||||
|
# Bop Common produces strange results with same shapes.
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug25319_S1.brep] b1
|
||||||
|
restore [locate_data_file bug25319_S2.brep] b2
|
||||||
|
|
||||||
|
bcommon result b1 b2
|
||||||
|
|
||||||
|
set square 1690.81
|
||||||
|
|
||||||
|
set nb_v_good 20
|
||||||
|
set nb_e_good 31
|
||||||
|
set nb_w_good 13
|
||||||
|
set nb_f_good 13
|
||||||
|
set nb_sh_good 1
|
||||||
|
set nb_sol_good 1
|
||||||
|
set nb_compsol_good 0
|
||||||
|
set nb_compound_good 1
|
||||||
|
set nb_shape_good 80
|
||||||
|
|
||||||
|
set 2dviewer 1
|
31
tests/bugs/modalg_5/bug25319_2
Normal file
31
tests/bugs/modalg_5/bug25319_2
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
puts "TODO OCC25319 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
|
|
||||||
|
puts "================"
|
||||||
|
puts "OCC25319"
|
||||||
|
puts "================"
|
||||||
|
puts ""
|
||||||
|
########################################################################
|
||||||
|
# Bop Common produces strange results with same shapes.
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
restore [locate_data_file bug25319_S1.brep] b1
|
||||||
|
restore [locate_data_file bug25319_S2.brep] b2
|
||||||
|
|
||||||
|
explode b1 so; copy b1_1 b1
|
||||||
|
explode b2 so; copy b2_3 b2
|
||||||
|
|
||||||
|
bcommon result b1 b2
|
||||||
|
|
||||||
|
set square 1690.81
|
||||||
|
|
||||||
|
set nb_v_good 20
|
||||||
|
set nb_e_good 31
|
||||||
|
set nb_w_good 13
|
||||||
|
set nb_f_good 13
|
||||||
|
set nb_sh_good 1
|
||||||
|
set nb_sol_good 1
|
||||||
|
set nb_compsol_good 0
|
||||||
|
set nb_compound_good 1
|
||||||
|
set nb_shape_good 80
|
||||||
|
|
||||||
|
set 2dviewer 1
|
Loading…
x
Reference in New Issue
Block a user