diff --git a/src/build123d/topology.py b/src/build123d/topology.py index 6199bc16..3cf6e8c1 100644 --- a/src/build123d/topology.py +++ b/src/build123d/topology.py @@ -2393,7 +2393,9 @@ def filter_by( def axis_parallel_predicate(axis: Axis, tolerance: float): def pred(shape: Shape): if shape.is_planar_face: - assert shape.wrapped is not None and isinstance(shape, Face) + assert shape.wrapped is not None and isinstance( + shape.wrapped, TopoDS_Face + ) gp_pnt = gp_Pnt() surface_normal = gp_Vec() u_val, _, v_val, _ = BRepTools.UVBounds_s(shape.wrapped) @@ -2428,7 +2430,9 @@ def plane_parallel_predicate(plane: Plane, tolerance: float): def pred(shape: Shape): if shape.is_planar_face: - assert shape.wrapped is not None and isinstance(shape, Face) + assert shape.wrapped is not None and isinstance( + shape.wrapped, TopoDS_Face + ) gp_pnt: gp_Pnt = gp_Pnt() surface_normal: gp_Vec = gp_Vec() u_val, _, v_val, _ = BRepTools.UVBounds_s(shape.wrapped)