#include <BOPAlgo_PaveFiller.hxx>
+#include <BOPAlgo_Alerts.hxx>
#include <BOPAlgo_Tools.hxx>
#include <BOPCol_NCVector.hxx>
#include <BOPCol_Parallel.hxx>
#include <BOPDS_PaveBlock.hxx>
#include <BOPDS_VectorOfInterfVE.hxx>
#include <BOPTools_AlgoTools.hxx>
+#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <gp_Pnt.hxx>
#include <IntTools_Context.hxx>
//
virtual void Perform() {
BOPAlgo_Algo::UserBreak();
- myFlag=myContext->ComputeVE (myV, myE, myT, myTolVNew, myFuzzyValue);
+ try
+ {
+ OCC_CATCH_SIGNALS
+
+ myFlag=myContext->ComputeVE (myV, myE, myT, myTolVNew, myFuzzyValue);
+ }
+ catch (Standard_Failure)
+ {
+ AddError(new BOPAlgo_AlertIntersectionFailed);
+ }
};
//
protected:
for (i = 0; i < aNbVE; ++i) {
const BOPAlgo_VertexEdge& aVESolver = aVVE(i);
if (aVESolver.Flag() != 0) {
+ if (aVESolver.HasErrors())
+ {
+ // Warn about failed intersection of sub-shapes
+ AddIntersectionFailedWarning(aVESolver.Vertex(), aVESolver.Edge());
+ }
continue;
}
//
}
}
}
+
+//=======================================================================
+// function: AddIntersectionFailedWarning
+// purpose:
+//=======================================================================
+void BOPAlgo_PaveFiller::AddIntersectionFailedWarning(const TopoDS_Shape& theS1,
+ const TopoDS_Shape& theS2)
+{
+ // Create the warn shape
+ TopoDS_Compound aWC;
+ BRep_Builder().MakeCompound(aWC);
+ BRep_Builder().Add(aWC, theS1);
+ BRep_Builder().Add(aWC, theS2);
+ // Add the warning
+ AddWarning(new BOPAlgo_AlertIntersectionOfPairOfShapesFailed(aWC));
+}
\ No newline at end of file