Finding Tangents to a Curve

 From:  bemfarmer
11632.17 
I spent some time working on tangents to two disjoint circles, and reviewing lots of forum posts, and several existing scripts.

Larry's code here:

https://moi3d.com/forum/index.php?webtag=MOI&msg=9916.22

provides short and simple code to select the "Roller" circle, arc Die circular arc, and the second "Roller" circle, in all views.

The center points are created. var cpoint = curves.item( i).conicFrame.origin;

I am wondering if cpoint.x, and cpoint.y, and curves.item(i).radius will yield the (x,y,0) coordinates, and the radius of each circle???
(In MoI5 beta???)

Or is some GetRadius, or evaluate... needed?

Or is var x = cp.distancex( cpoint).toFixed( digits);
var y = cp.distancey( cpoint).toFixed( digits);
var z = cp.distancez( cpoint).toFixed( digits);
needed??? (MoI4???)
And can the .toFixed(digits) be omitted???

It seems like cpoint is a "raw" point, not a Geometry point???
pointfactory can turn cpoint into a Geometry point.


- Brian

EDITED: 18 Jan by BEMFARMER