From 1d2003ef089136d635363f3e6aa7a2f4893ce191 Mon Sep 17 00:00:00 2001 From: Bernhard Date: Wed, 21 Jan 2026 16:45:07 +0100 Subject: [PATCH] add a type validation step --- src/build123d/topology/shape_core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/build123d/topology/shape_core.py b/src/build123d/topology/shape_core.py index 3c06000..19575b9 100644 --- a/src/build123d/topology/shape_core.py +++ b/src/build123d/topology/shape_core.py @@ -1369,10 +1369,10 @@ class Shape(NodeMixin, Generic[TOPODS]): if not to_intersect: return None - # Runtime import to avoid circular imports. Allows type safe actions in helpers - from build123d.topology.helpers import convert_to_shapes - - shapes = convert_to_shapes(to_intersect) + # Validate input types + for obj in to_intersect: + if not isinstance(obj, (Shape, Vector, Location, Axis, Plane)): + raise ValueError(f"Unsupported type for intersect: {type(obj)}") # Chained iteration for AND semantics: c.intersect(s1, s2) = c ∩ s1 ∩ s2 common_set = ShapeList([self])