-
Notifications
You must be signed in to change notification settings - Fork 5
Triangle can't be solved with two angles and one distance constraint #4
Comments
There might be some tricks about the program side than user interface. Technically, two line elements can use same point element as theirs joint without "same point" constraint. And some times the constraints should be increased or simplified. |
Thanks. I looked at the file saved by the SolveSpace GUI for this problem and identified the constraints it defines. It seems like it only constrains the points to be coincident, the line lengths and angles, and the fact that some of the points were dragged. This seems to be the same as what I define in my script above. Unfortunately I can't find anything different compared to how the GUI does it... |
I just noticed this discussion. There is an "other" property which belongs to the angle constraint. This is used to tell in which direction the angle is measure between two lines. If this could be exported in the Python API, then it would be possible to work with constraints like this. |
@henrikh I was actually re-disigned a new wrapper with Cython. And the SWIG wrapper might be deprecated after new wrapper has fully tested. The structure that exported in wrapper: https://github.com/KmolYuan/python-solvespace/blob/master/Cython/slvs.pxd#L90-L103 But the guide function ignored the "other" parameters, so it should be replaced by a new function: https://github.com/KmolYuan/python-solvespace/blob/master/Cython/slvs.pxd#L194-L204 The progress of Cython wrapper still left constraint methods and unit test scripts. I expect next week to finish these part. |
@KmolYuan: wow, that's cool! Looking forward to the Cython wrapper. |
Hi, I'm playing around with
python-solvespace
and it's great so far - thanks! One problem I found though is that it can't seem to solve the following file:This is a triangle with two constrained angles and one constrained length, and should therefore be fully constrained. Instead, I get the error "SLVS_RESULT_DIDNT_CONVERGE". In the SolveSpace GUI it is able to solve this as "OK".
Interestingly, setting two distance constraints and one angle constraint seems to work ok.
Do you have any idea what is wrong?
The text was updated successfully, but these errors were encountered: