Updating positions tests

This commit is contained in:
gumyr 2025-11-25 11:39:39 -05:00
parent 2d82b2ca5c
commit 82aa0aa367
2 changed files with 2 additions and 5 deletions

View file

@ -373,10 +373,7 @@ class Mixin1D(Shape[TOPODS]):
def _to_param(edge_wire: Mixin1D, value: float | VectorLike, name: str) -> float:
"""Convert a float or VectorLike into a curve parameter."""
if isinstance(value, (int, float)):
if edge_wire.is_forward:
return float(value)
else:
return 1.0 - float(value)
return float(value)
try:
point = Vector(value)
except TypeError as exc:

View file

@ -166,7 +166,7 @@ class TestMixin1D(unittest.TestCase):
def test_positions_deflection_failure(self):
e = Edge.make_circle(1.0)
with patch("build123d.edge.GCPnts_UniformDeflection") as MockDefl:
with patch("build123d.topology.one_d.GCPnts_UniformDeflection") as MockDefl:
instance = MockDefl.return_value
instance.IsDone.return_value = False
instance.NbPoints.return_value = 0