Hi, I’m trying to define some customize goal object for the Kangaroo solver.
Considering the Caculate
method, is there some way to Print
out variable information to the output?
public override void Calculate(List<KangarooSolver.Particle> p)
{
for (int i = 0; i < PIndex.Length; i++)
{
Point3d ThisPt = p[PIndex[i]].Position;
double t = new double();
_curve.ClosestPoint(ThisPt, out t);
Vector3d refDir = rV[i] - ThisPt;
Vector3d cDir = _curve.PointAt(t) - ThisPt;
Move[i] = cDir;
Weighting[i] = Strength;
**Print(Vector3d.Multiply(refDir, cDir).ToString());**
if (Vector3d.Multiply(refDir, cDir) <= 0)
{
Weighting[i] = Strength * 1;
}
}
Something like the Print
line above. (sorry hightight here doesn’t work)
The current c# component reports: Cannot access a non-static member of outer type 'Script_Instance' via nested type 'script_Instance.OnCurveMod'