mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-05 18:20:46 -08:00
Revert mode == Mode.INTERSECT iteration. pass Compound instead
This commit is contained in:
parent
c384df21c7
commit
5523a2184c
1 changed files with 1 additions and 7 deletions
|
|
@ -466,13 +466,7 @@ class Builder(ABC, Generic[ShapeT]):
|
||||||
elif mode == Mode.INTERSECT:
|
elif mode == Mode.INTERSECT:
|
||||||
if self._obj is None:
|
if self._obj is None:
|
||||||
raise RuntimeError("Nothing to intersect with")
|
raise RuntimeError("Nothing to intersect with")
|
||||||
intersections: ShapeList[Shape] = ShapeList()
|
combined = self._obj.intersect(Compound(typed[self._shape]))
|
||||||
for target in typed[self._shape]:
|
|
||||||
result = self._obj.intersect(target)
|
|
||||||
if result is None:
|
|
||||||
continue
|
|
||||||
intersections.extend(result)
|
|
||||||
combined = self._sub_class(intersections)
|
|
||||||
elif mode == Mode.REPLACE:
|
elif mode == Mode.REPLACE:
|
||||||
combined = self._sub_class(list(typed[self._shape]))
|
combined = self._sub_class(list(typed[self._shape]))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue