+
+bool Model_ResultBody::isConnectedTopology()
+{
+ TDF_Label aDataLab = std::dynamic_pointer_cast<Model_Data>(data())->label();
+ if (!aDataLab.IsNull()) {
+ if (aDataLab.IsAttribute(kUpdateConnectedTopology)) { // recompute state
+ aDataLab.ForgetAttribute(kUpdateConnectedTopology);
+ GeomShapePtr aShape = shape();
+ if (aShape.get() && aShape->isConnectedTopology()) {
+ TDataStd_UAttribute::Set(aDataLab, kIsConnectedTopology);
+ } else {
+ aDataLab.ForgetAttribute(kIsConnectedTopology);
+ }
+ }
+ return aDataLab.IsAttribute(kIsConnectedTopology);
+ }
+ return false; // invalid case
+}