xibyte / jsketcher

Parametric 2D and 3D modeler written in pure javascript
http://web-cad.org
Other
1.45k stars 275 forks source link

[bug] Point on circle failing to put point on arc segment. #202

Open mmiscool opened 1 year ago

mmiscool commented 1 year ago

The attached sketch. Point on circle constraints not working. It acts weird with point sticking to an offset from the circle arc if you try dragging arround.

Screenshot 2023-03-18 1 09 36 AM

{"version":3,"objects":[{"id":"3","type":"Segment","role":null,"stage":0,"data":{"a":{"x":0,"y":0},"b":{"x":32.17905903666881,"y":120.09388326460643}}},{"id":"28","type":"Circle","role":null,"stage":0,"data":{"c":{"x":0,"y":0},"r":70}},{"id":"60","type":"Arc","role":null,"stage":0,"data":{"a":{"x":19.91504319661142,"y":45.85292925841167},"b":{"x":-4.5085401640912295,"y":42.70586967491557},"c":{"x":9.05457189591143,"y":33.792122356326715}}},{"id":"32","type":"Point","role":null,"stage":0,"data":{"x":14.608949663520246,"y":36.720237579416896}}],"dimensions":[],"labels":[],"stages":[{"constraints":[{"typeId":"PCoincident","objects":["3:A","ground/ORIGIN"],"stage":0,"annotations":[]},{"typeId":"Angle","objects":["3"],"constants":{"angle":"75"},"stage":0,"annotations":[{"offset":20}]},{"typeId":"PCoincident","objects":["28:C","ground/ORIGIN"],"stage":0,"annotations":[]},{"typeId":"RadiusLength","objects":["28"],"constants":{"length":"70/2"},"stage":0,"annotations":[{"angle":0.7853981633974483}]},{"typeId":"PointOnLine","objects":["60:C","3"],"stage":0,"annotations":[]},{"typeId":"PointOnCircle","objects":["32","60"],"stage":0,"annotations":[]},{"typeId":"RadiusLength","objects":["60"],"constants":{"length":"16.23"},"stage":0,"annotations":[{"angle":1.7373263377964059}]},{"typeId":"PointOnCircle","objects":["3:B","28"],"stage":0,"annotations":[]}],"generators":[]}],"constants":""}