CadQuery / CQ-editor

CadQuery GUI editor based on PyQT
Apache License 2.0
723 stars 111 forks source link

show_object fails with TypeError #441

Closed lorenzncode closed 1 month ago

lorenzncode commented 1 month ago

This results in error (latest commit). No error with previous commit.

from cadquery.occ_impl.shapes import segment, vertex

e1 = segment((0, 0, 0), (10, 10, 10))
p1 = e1.positionAt(0.5)
v1 = vertex(p1)

show_object(v1)

image

lorenzncode commented 1 month ago

Potential fix - return NotImplemented on comparison with non-Vector?

https://github.com/lorenzncode/cadquery/blob/688683f9e1de777b3e95224dd94c312da17ee195/cadquery/occ_impl/geom.py#L232-L236

adam-urbanczyk commented 1 month ago

Thanks, actually it should be return False

adam-urbanczyk commented 1 month ago

Solved by https://github.com/CadQuery/cadquery/pull/1610