return aShape.ShapeType() == TopAbs_FACE;
}
+bool GeomAPI_Shape::isCompound() const
+{
+ const TopoDS_Shape& aShape = const_cast<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();
+ return aShape.ShapeType() == TopAbs_COMPOUND;
+}
+
bool GeomAPI_Shape::isSolid() const
{
const TopoDS_Shape& aShape = const_cast<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();
/// Returns whether the shape is a face
virtual bool isFace() const;
+ /// Returns whether the shape is a face
+ virtual bool isCompound() const;
+
/// Returns whether the shape is a solid
virtual bool isSolid() const;
MyEdgeTypes["circle"] = Circle;
MyEdgeTypes["solid"] = Solid;
MyEdgeTypes["face"] = Face;
+ MyEdgeTypes["compound"] = Compound;
}
std::string aType = std::string(theType.c_str());
if (MyEdgeTypes.find(aType) != MyEdgeTypes.end())
case Face:
aValid = theShape->isFace();
break;
+ case Compound:
+ aValid = theShape->isCompound();
+ break;
default: break;
}
}
Line,
Circle,
Solid,
- Face
+ Face,
+ Compound
};
public: