return !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE;
}
+bool GeomAPI_Shape::isWire() const
+{
+ const TopoDS_Shape& aShape = const_cast<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();
+ return !aShape.IsNull() && aShape.ShapeType() == TopAbs_WIRE;
+}
+
bool GeomAPI_Shape::isFace() const
{
const TopoDS_Shape& aShape = const_cast<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();
}
}
-bool GeomAPI_Shape::isSubShape(const std::shared_ptr<GeomAPI_Shape> theShape) const
+void GeomAPI_Shape::reverse()
+{
+ MY_SHAPE->Reverse();
+}
+
+bool GeomAPI_Shape::isSubShape(const std::shared_ptr<GeomAPI_Shape> theShape,
+ const bool theCheckOrientation) const
{
if(!theShape.get()) {
return false;
}
for(TopExp_Explorer anExp(*MY_SHAPE, aShapeToSearch.ShapeType()); anExp.More(); anExp.Next()) {
- if(aShapeToSearch.IsEqual(anExp.Current())) {
+ if(theCheckOrientation ?
+ aShapeToSearch.IsEqual(anExp.Current()) : aShapeToSearch.IsSame(anExp.Current())) {
return true;
}
}