From 848501bf469e9a2d7929de135e1c68fb9da73465 Mon Sep 17 00:00:00 2001 From: Constantin Mateescu Date: Thu, 11 Feb 2021 17:51:18 +0200 Subject: [PATCH] Fixed ratio constraints. --- cython/README.md | 4 ++-- cython/python_solvespace/slvs.pyx | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cython/README.md b/cython/README.md index d34b7596..e511a5bb 100644 --- a/cython/README.md +++ b/cython/README.md @@ -24,10 +24,10 @@ Build and install the module: python setup.py install ``` -Run unit test: +Run unit tests: ```bash -python tests +python test ``` Uninstall the module: diff --git a/cython/python_solvespace/slvs.pyx b/cython/python_solvespace/slvs.pyx index 02d84dad..931726be 100644 --- a/cython/python_solvespace/slvs.pyx +++ b/cython/python_solvespace/slvs.pyx @@ -801,8 +801,7 @@ cdef class SolverSystem: if wp is _E_FREE_IN_3D: raise ValueError("this is a 2d constraint") if e1.is_line_2d() and e2.is_line_2d(): - self.add_constraint(SLVS_C_EQ_PT_LN_DISTANCES, wp, value, _E_NONE, - _E_NONE, e1, e2) + self.add_constraint(SLVS_C_LENGTH_RATIO, wp, value, _E_NONE, _E_NONE, e1, e2) else: raise TypeError(f"unsupported entities: {e1}, {e2}, {wp}")