return !aShape.IsNull() && aShape.ShapeType() == TopAbs_SOLID;
}
+bool GeomAPI_Shape::isCompSolid() const
+{
+ const TopoDS_Shape& aShape = const_cast<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();
+ return !aShape.IsNull() && aShape.ShapeType() == TopAbs_COMPSOLID;
+}
+
GeomAPI_Shape::ShapeType GeomAPI_Shape::shapeType() const
{
const TopoDS_Shape& aShape = impl<TopoDS_Shape>();
GEOMAPI_EXPORT
virtual bool isSolid() const;
+ /// Returns whether the shape is a compsolid
+ GEOMAPI_EXPORT
+ virtual bool isCompSolid() const;
+
/// Returns the shape type
GEOMAPI_EXPORT
virtual ShapeType shapeType() const;
aValid = theShape->isVertex();
break;
case Solid:
- aValid = theShape->isSolid() || theShape->isCompoundOfSolids();
+ aValid = theShape->isSolid() || theShape->isCompSolid() ||
+ theShape->isCompoundOfSolids();
break;
case Face:
aValid = theShape->isFace();
}
}
#else
+ // Problem with MPV: At first time on creation it doesn't work because Part feature
+ // creation event will be sent after
if (aActivePartIndex.isValid())
aTreeView->setExpanded(aActivePartIndex, false);
XGUI_DataModel* aDataModel = aWorkshop->objectBrowser()->dataModel();