Skip to content

Commit 23f8e5f

Browse files
committed
last changes for now
1 parent 5597382 commit 23f8e5f

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

testing/test_filter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,7 @@ def test_equal_capt_pts(tmp_path):
939939
cyl.SetResolution(12)
940940

941941
z = .0000025
942+
# z = .0000075 # verursacht ein anderes bekanntes problem
942943

943944
tra = vtkTransform()
944945
tra.RotateZ(90)

vtkPolyDataBooleanFilter.cxx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,9 @@ bool vtkPolyDataBooleanFilter::GetPolyStrips (vtkPolyData *pd, vtkIdTypeArray *c
624624
// sucht nach gleichen captPts
625625

626626
{
627-
std::map<Point3d, std::map<vtkIdType, std::vector<std::reference_wrapper<StripPt>>>> collapsed;
627+
// std::map<Point3d, std::map<vtkIdType, std::vector<std::reference_wrapper<StripPt>>>> collapsed;
628+
629+
std::map<Point3d, std::set<vtkIdType>> collapsed;
628630

629631
PolyStripsType::iterator itr;
630632
StripPtsType::iterator itr2;
@@ -638,16 +640,24 @@ bool vtkPolyDataBooleanFilter::GetPolyStrips (vtkPolyData *pd, vtkIdTypeArray *c
638640
StripPt &sp = itr2->second;
639641

640642
if (sp.capt & Capt::BOUNDARY) {
641-
collapsed[{sp.cutPt[0], sp.cutPt[1], sp.cutPt[2]}][sp.ind].push_back(sp);
643+
// collapsed[{sp.cutPt[0], sp.cutPt[1], sp.cutPt[2]}][sp.ind].push_back(sp);
644+
645+
auto inds = collapsed[{sp.cutPt[0], sp.cutPt[1], sp.cutPt[2]}];
646+
647+
inds.emplace(sp.ind);
648+
649+
if (inds.size() > 1) {
650+
return true;
651+
}
642652
}
643653
}
644654
}
645655

646-
for (auto &[pt, map] : collapsed) {
647-
if (map.size() > 1) {
648-
return true;
649-
}
650-
}
656+
// for (auto &[pt, map] : collapsed) {
657+
// if (map.size() > 1) {
658+
// return true;
659+
// }
660+
// }
651661
}
652662

653663
for (itr = polyLines.begin(); itr != polyLines.end(); ++itr) {

0 commit comments

Comments
 (0)