From e202e6825c3b17ed0beaccb487444e016cbb066a Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 16 Sep 2015 19:11:45 +0300 Subject: [PATCH] Visualize CompSolid sub-shapes when compsolid shape(e.g. through Object Browser) is chosen. Extrusion(CompSolid), Boolean, Select extrusion. --- src/PartSet/PartSet_OperationPrs.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/PartSet/PartSet_OperationPrs.cpp b/src/PartSet/PartSet_OperationPrs.cpp index 66e146f96..146699459 100755 --- a/src/PartSet/PartSet_OperationPrs.cpp +++ b/src/PartSet/PartSet_OperationPrs.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -171,6 +172,22 @@ void addValue(const ObjectPtr& theObject, const GeomShapePtr& theShape, QMap >& theObjectShapes) { if (theObject.get()) { + ResultPtr aResult = std::dynamic_pointer_cast(theObject); + if (aResult.get()) { + ResultCompSolidPtr aCompsolidResult = std::dynamic_pointer_cast(theObject); + if (aCompsolidResult.get()) { + for(int i = 0; i < aCompsolidResult->numberOfSubs(); i++) { + ResultPtr aSubResult = aCompsolidResult->subResult(i); + if (aSubResult.get()) { + GeomShapePtr aShape; + addValue(aSubResult, aShape, theFeature, theObjectShapes); + } + } + return; + } + } + + GeomShapePtr aShape = theShape; if (!aShape.get()) { ResultPtr aResult = std::dynamic_pointer_cast(theObject); -- 2.39.2