Toponaming/Part: Fix all getBaseTopoShape calls. Tests and missing code.

This commit is contained in:
bgbsww
2024-04-25 16:54:14 -04:00
committed by Chris Hennes
parent bff1efd665
commit fa8f29aed4
19 changed files with 791 additions and 49 deletions

View File

@@ -66,9 +66,9 @@ Feature::Feature()
App::DocumentObjectExecReturn* Feature::recompute()
{
try {
auto baseShape = getBaseShape();
auto baseShape = getBaseTopoShape();
if (Suppressed.getValue()) {
this->Shape.setValue(baseShape);
this->Shape.setValue(baseShape.getShape());
return StdReturn;
}
}
@@ -106,9 +106,13 @@ TopoShape Feature::getSolid(const TopoShape& shape)
if (shape.isNull()) {
throw Part::NullShapeException("Null shape");
}
auto res = shape.getSubTopoShape(TopAbs_SOLID, 1);
res.fixSolidOrientation();
return res;
int count = shape.countSubShapes(TopAbs_SOLID);
if(count) {
auto res = shape.getSubTopoShape(TopAbs_SOLID,1);
res.fixSolidOrientation();
return res;
}
return shape;
}
int Feature::countSolids(const TopoDS_Shape& shape, TopAbs_ShapeEnum type)