backport to occt < 6.9
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <BRepAlgoAPI_Section.hxx>
|
||||
# include <Standard_Version.hxx>
|
||||
#endif
|
||||
|
||||
#include "FeaturePartSection.h"
|
||||
@@ -47,10 +48,12 @@ short Section::mustExecute() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
BRepAlgoAPI_BooleanOperation *Section::makeOperation(const TopoDS_Shape& base, const TopoDS_Shape& tool) const
|
||||
BRepAlgoAPI_BooleanOperation* Section::makeOperation(const TopoDS_Shape& base, const TopoDS_Shape& tool) const
|
||||
{
|
||||
// Let's call algorithm computing a section operation:
|
||||
// return new BRepAlgoAPI_Section(base, tool);
|
||||
#if OCC_VERSION_HEX < 0x060900
|
||||
return new BRepAlgoAPI_Section(base, tool);
|
||||
#else
|
||||
bool approx = Approximation.getValue();
|
||||
BRepAlgoAPI_Section* mkSection = new BRepAlgoAPI_Section();
|
||||
mkSection->Init1(base);
|
||||
@@ -60,4 +63,5 @@ BRepAlgoAPI_BooleanOperation *Section::makeOperation(const TopoDS_Shape& base, c
|
||||
if (!mkSection->IsDone())
|
||||
throw Base::RuntimeError("Section failed");
|
||||
return mkSection;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user