diff --git a/src/Mod/OpenSCAD/OpenSCADFeatures.py b/src/Mod/OpenSCAD/OpenSCADFeatures.py index 6248f8bb8..869039efe 100644 --- a/src/Mod/OpenSCAD/OpenSCADFeatures.py +++ b/src/Mod/OpenSCAD/OpenSCADFeatures.py @@ -274,10 +274,7 @@ class RefineShape: def execute(self, fp): if fp.Base and fp.Base.Shape.isValid(): sh=fp.Base.Shape.removeSplitter() - if sh.Placement.isNull(): - fp.Shape=sh - else: - fp.Shape=sh.transformGeometry(sh.Placement.toMatrix()) + fp.Shape=sh class GetWire: '''return the first wire from a given shape''' diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index bd3746a26..349fd81db 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -1970,7 +1970,7 @@ TopoDS_Shape TopoShape::removeSplitter() const if (_Shape.ShapeType() == TopAbs_SOLID) { const TopoDS_Solid &solid = TopoDS::Solid(_Shape); - BRepTools_ReShape reshape; + BRepBuilderAPI_MakeSolid mkSolid; TopExp_Explorer it; for (it.Init(solid, TopAbs_SHELL); it.More(); it.Next()) { const TopoDS_Shell ¤tShell = TopoDS::Shell(it.Current()); @@ -1978,7 +1978,7 @@ TopoDS_Shape TopoShape::removeSplitter() const if (uniter.process()) { if (uniter.isModified()) { const TopoDS_Shell &newShell = uniter.getShell(); - reshape.Replace(currentShell, newShell); + mkSolid.Add(newShell); } } else { @@ -1986,7 +1986,7 @@ TopoDS_Shape TopoShape::removeSplitter() const return _Shape; } } - return reshape.Apply(solid); + return mkSolid.Solid(); } else if (_Shape.ShapeType() == TopAbs_SHELL) { const TopoDS_Shell& shell = TopoDS::Shell(_Shape); diff --git a/src/Mod/Part/App/modelRefine.cpp b/src/Mod/Part/App/modelRefine.cpp index 21170523f..c459defa2 100644 --- a/src/Mod/Part/App/modelRefine.cpp +++ b/src/Mod/Part/App/modelRefine.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -698,7 +699,7 @@ void Part::BRepBuilderAPI_RefineModel::Build() if (myShape.ShapeType() == TopAbs_SOLID) { const TopoDS_Solid &solid = TopoDS::Solid(myShape); - BRepTools_ReShape reshape; + BRepBuilderAPI_MakeSolid mkSolid; TopExp_Explorer it; for (it.Init(solid, TopAbs_SHELL); it.More(); it.Next()) { const TopoDS_Shell ¤tShell = TopoDS::Shell(it.Current()); @@ -706,7 +707,7 @@ void Part::BRepBuilderAPI_RefineModel::Build() if (uniter.process()) { if (uniter.isModified()) { const TopoDS_Shell &newShell = uniter.getShell(); - reshape.Replace(currentShell, newShell); + mkSolid.Add(newShell); LogModifications(uniter); } } @@ -714,7 +715,7 @@ void Part::BRepBuilderAPI_RefineModel::Build() Standard_Failure::Raise("Removing splitter failed"); } } - myShape = reshape.Apply(solid); + myShape = mkSolid.Solid(); } else if (myShape.ShapeType() == TopAbs_SHELL) { const TopoDS_Shell& shell = TopoDS::Shell(myShape);