Poincaré disk Inversion script

 From:  bemfarmer
6550.7 
Hi Michael,
Is there a way to script getting the center point of a circle, without picking the center point with the mouse?
The center point needs to be the same data type as a picked center of a circle.

I have successfully created a 3 point circle with script:


var startPt = pointpicker.pt;
var radiusPt = startPt;
circlefactory.setInput( 0, startPt );
...
var endPt = pointpicker.pt;
circlefactory.setInput( 1, endPt );
...
circlefactory.setInput( 2, onPt );
circlefactory.update();
var invCircleObj = circlefactory.calculate();
var invCircle = invCircleObj.item(0);

// var centerPt = vM.createPoint( 0, 0, 0 );//Test: Right type, but wrong location.

// var centerPt = invCircle.center;//Test: centerPt is wrong data type.

// var centerPtxyz = invCircle.center;//
// var centerPt = vM.createPoint( centerPtxyz );//Does not work, parse error.

/* Does not work:
var xc = invCircle.center.pt.x;
var yc = invCircle.center.pt.y;
var zc = invCircle.center.pt.z;
var centerPt = vM.createPoint( xc, yc, zc );
*/

/* Does not work:
var xc = invCircle.center.x;
var yc = invCircle.center.y;
var zc = invCircle.center.z;
var centerPt = vM.createPoint( xc, yc, zc );
*/

var radiusValue = moi.vectorMath.distance( centerPt, radiusPt );//TEST, works for picked points.

(If it is not possible, I have added code to mouse pick the center of the newly created 3 pt circle.)

Thank you,
- Brian

Ps, I had a similar question about invCircle.radius, to get the radius value, but have the radius value
By vectorMath.