#include <BOPAlgo_BOP.hxx>
#include <BOPAlgo_Builder.hxx>
#include <TopExp.hxx>
+#include <assert.h>
//#define DEB_SPLIT_TO_ZONES 1
//#define DEB_SPLIT_TO_ZONES_CHECK_PARTITION 1
anOutputSplitDataList.append(SDI);
}
+#ifndef NDEBUG
+ //check CutFaceByEdges method: ensure that SD.Face() edges fully covered by
+ //history map (OutOrSh2M)
+ if (!OutOrSh2M.IsEmpty())
+ {
+ TopTools_IndexedMapOfShape EE;
+ TopExp::MapShapes(SD.Face(), TopAbs_EDGE, EE);
+ int noncontNb = 0;
+ for (int i = 1; i <= EE.Extent(); i++)
+ {
+ const TopoDS_Shape& E = EE(i);
+ noncontNb += !OutOrSh2M.Contains(E);
+ }
+ //noncontNb > 0 => some problem with edge history
+ assert(noncontNb == 0);
+ }
+#endif
+
if(!theGroupsList.IsEmpty() )
{
SplitDataList ModifInpGroupList;
if (SData.Type != SplitData::Data_Edge)
ModifInpGroupList.append(SData); //add as is
const TopoDS_Shape& SData_sh = SData.Shape;
- const TopTools_ListOfShape& modif_ls = OutOrSh2M.FindFromKey(SData_sh);
+ TopTools_ListOfShape modif_ls;
+ if (!InterPolys.IsEmpty())
+ if (OutOrSh2M.Contains(SData_sh))
+ modif_ls = OutOrSh2M.FindFromKey(SData_sh);
+ //else TODO - show message that one of the object should be updated
+
+#ifndef NDEBUG
+ if (!InterPolys.IsEmpty() && OutOrSh2M.IsEmpty())
+ assert (true);
+#endif
if (modif_ls.IsEmpty())
ModifInpGroupList.append(SData); //non modified
else