Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

#include "BOPBuilderShapeToBRepBuilderShapeAdapter.h"

#include <BOPAlgo_BuilderShape.hxx>
#include <BRepAlgoAPI_BuilderAlgo.hxx>

BOPBuilderShapeToBRepBuilderShapeAdapter::BOPBuilderShapeToBRepBuilderShapeAdapter(BOPAlgo_BuilderShape& adaptee)
BOPBuilderShapeToBRepBuilderShapeAdapter::BOPBuilderShapeToBRepBuilderShapeAdapter(BRepAlgoAPI_BuilderAlgo & adaptee)
: _adaptee(adaptee)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
#include <BRepBuilderAPI_MakeShape.hxx>
#include "geoml_internal.h"

class BOPAlgo_BuilderShape;
class BRepAlgoAPI_BuilderAlgo ;

class BOPBuilderShapeToBRepBuilderShapeAdapter : public BRepBuilderAPI_MakeShape
{
public:
GEOML_EXPORT BOPBuilderShapeToBRepBuilderShapeAdapter(BOPAlgo_BuilderShape& adaptee);
GEOML_EXPORT BOPBuilderShapeToBRepBuilderShapeAdapter(BRepAlgoAPI_BuilderAlgo & adaptee);

GEOML_EXPORT const TopoDS_Shape& Shape() const;
GEOML_EXPORT operator TopoDS_Shape() const;
Expand All @@ -37,7 +37,7 @@ class BOPBuilderShapeToBRepBuilderShapeAdapter : public BRepBuilderAPI_MakeShape
GEOML_EXPORT Standard_Boolean IsDeleted(const TopoDS_Shape& S) override;

private:
BOPAlgo_BuilderShape& _adaptee;
BRepAlgoAPI_BuilderAlgo& _adaptee;
};

#endif // BOPBUILDERSHAPETOBREPBUILDERSHAPEADAPTER_H
13 changes: 8 additions & 5 deletions src/boolean_operations/CTrimShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "CTrimShape.h"

#include "CBooleanOperTools.h"
#include "GEOMAlgo_Splitter.hxx"
#include "BRepAlgoAPI_Splitter.hxx"
#include "BOPBuilderShapeToBRepBuilderShapeAdapter.h"
#include "common/CommonFunctions.h"
#include "geoml/error.h"
Expand Down Expand Up @@ -47,6 +47,7 @@
#include <Geom_Surface.hxx>
#include <BRepBuilderAPI_MakeShape.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <Standard_Version.hxx>
#if OCC_VERSION_HEX < VERSION_HEX_CODE(7,3,0)
#include <BOPCol_ListOfShape.hxx>
#endif
Expand Down Expand Up @@ -231,11 +232,13 @@ void CTrimShape::Perform()
}

PrepareFiller();
GEOMAlgo_Splitter splitter;
BRepAlgoAPI_Splitter splitter(*_dsfiller);
BOPBuilderShapeToBRepBuilderShapeAdapter splitAdapter(splitter);
splitter.AddArgument(_source->Shape());
splitter.AddTool(_tool->Shape());
splitter.PerformWithFiller(*_dsfiller);
TopTools_ListOfShape aLS;
aLS.Append(_source->Shape());
aLS.Append(_tool->Shape());
splitter.SetTools(aLS);
splitter.Build();

if (debug) {
WriteDebugShape(splitter.Shape(), "split");
Expand Down
Loading