Skip to content

Commit 1a9e40d

Browse files
Fix Shape.__eq__
1 parent 92e1488 commit 1a9e40d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cadquery/occ_impl/shapes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,10 +966,12 @@ def moved(self: T, loc: Location) -> T:
966966
return r
967967

968968
def __hash__(self) -> int:
969+
969970
return self.hashCode()
970971

971972
def __eq__(self, other) -> bool:
972-
return self.isSame(other)
973+
974+
return self.isSame(other) if isinstance(other, Shape) else False
973975

974976
def _bool_op(
975977
self,

0 commit comments

Comments
 (0)