#include <BRepOffsetAPI_MakePipe.hxx>
#include <BRepOffsetAPI_MakePipeShell.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
+#include <BOPAlgo_ArgumentAnalyzer.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <gp_Lin.hxx>
aPipeBuilder->Build();
// Checking result.
- if(!aPipeBuilder->IsDone() || aPipeBuilder->Shape().IsNull()) {
+ if (!aPipeBuilder->IsDone() || aPipeBuilder->Shape().IsNull()) {
delete aPipeBuilder;
return;
}
+
+ // Check for self-interfering result
+ BOPAlgo_ArgumentAnalyzer aChecker;
+ aChecker.SetShape1(aPipeBuilder->Shape());
+ aChecker.SelfInterMode() = Standard_True;
+ aChecker.StopOnFirstFaulty() = Standard_True;
+ aChecker.Perform();
+ if (aChecker.HasFaulty()) {
+ myError = "Self-interfering result.";
+ delete aPipeBuilder;
+ return;
+ }
+
this->initialize(aPipeBuilder);
// Setting naming.