From 614d4de11d026803ca292e6fb290da06e4ec15f9 Mon Sep 17 00:00:00 2001 From: jdegenstein Date: Fri, 12 Jan 2024 10:55:43 -0600 Subject: [PATCH] topology.py -> add xor (^) location_at operator to the curve class --- src/build123d/topology.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/build123d/topology.py b/src/build123d/topology.py index 40fee042..798a8c5e 100644 --- a/src/build123d/topology.py +++ b/src/build123d/topology.py @@ -4253,14 +4253,18 @@ class Curve(Compound): _dim = 1 - def __matmul__(self, position: float): + def __matmul__(self, position: float) -> Vector: """Position on curve operator @ - only works if continuous""" return Wire.make_wire(self.edges()).position_at(position) - def __mod__(self, position: float): + def __mod__(self, position: float) -> Vector: """Tangent on wire operator % - only works if continuous""" return Wire.make_wire(self.edges()).tangent_at(position) + def __xor__(self, position: float) -> Location: + """Location on wire operator ^ - only works if continuous""" + return Wire.make_wire(self.edges()).location_at(position) + def wires(self) -> list[Wire]: """A list of wires created from the edges""" return Wire.combine(self.edges())