[TD]fix sketch location in view

This commit is contained in:
wandererfan
2023-10-02 11:01:02 -04:00
committed by WandererFan
parent 255e9eb434
commit ed72c03df3
5 changed files with 65 additions and 61 deletions

View File

@@ -367,3 +367,12 @@ std::pair<Base::Vector3d, Base::Vector3d> ShapeUtils::getEdgeEnds(TopoDS_Edge ed
return result;
}
//! check for shape is null or shape has no subshapes(vertex/edge/face/etc)
//! this handles the case of an empty compound which is not IsNull, but has no
//! content.
bool ShapeUtils::isShapeReallyNull(TopoDS_Shape shape)
{
// if the shape is null or it has no subshapes, then it is really null
return shape.IsNull() || !TopoDS_Iterator(shape).More();
}