Toponaming: Fuse call makeElementRefine; remove deprecated refineSha… (#15897)
* Toponaming: Fuse call makeElementRefine; remove deprecated refineShapeIfActive * Part/Toponaming: import code for MultiFuse::execute() from LS3 * added expected values of testRefine Co-authored-by: Zheng, Lei <realthunder.dev@gmail.com> Co-authored-by: CalligaroV <vincenzo.calligaro@gmail.com> Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
This commit is contained in:
@@ -276,14 +276,7 @@ App::DocumentObjectExecReturn *MultiFuse::execute()
|
||||
}
|
||||
if (this->Refine.getValue()) {
|
||||
try {
|
||||
TopoDS_Shape oldShape = res.getShape();
|
||||
BRepBuilderAPI_RefineModel mkRefine(oldShape);
|
||||
res.setShape(mkRefine.Shape());
|
||||
ShapeHistory hist =
|
||||
buildHistory(mkRefine, TopAbs_FACE, res.getShape(), oldShape);
|
||||
for (auto& jt : history) {
|
||||
jt = joinHistory(jt, hist);
|
||||
}
|
||||
res = res.makeElementRefine();
|
||||
}
|
||||
catch (Standard_Failure&) {
|
||||
// do nothing
|
||||
|
||||
@@ -374,26 +374,6 @@ TopoShape Transformed::refineShapeIfActive(const TopoShape& oldShape) const
|
||||
return oldShape;
|
||||
}
|
||||
|
||||
// Deprecated, prefer the TopoShape method
|
||||
TopoDS_Shape Transformed::refineShapeIfActive(const TopoDS_Shape& oldShape) const
|
||||
{
|
||||
if (this->Refine.getValue()) {
|
||||
try {
|
||||
Part::BRepBuilderAPI_RefineModel mkRefine(oldShape);
|
||||
TopoDS_Shape resShape = mkRefine.Shape();
|
||||
if (!TopoShape(resShape).isClosed()) {
|
||||
return oldShape;
|
||||
}
|
||||
return resShape;
|
||||
}
|
||||
catch (Standard_Failure&) {
|
||||
return oldShape;
|
||||
}
|
||||
}
|
||||
|
||||
return oldShape;
|
||||
}
|
||||
|
||||
TopoDS_Shape Transformed::getRemainingSolids(const TopoDS_Shape& shape)
|
||||
{
|
||||
BRep_Builder builder;
|
||||
|
||||
Reference in New Issue
Block a user