RigidBody Goal for custom Object

Hello, does anyone tried or knows how to pass an object to the Kangaroo solver other than a mesh? I currently have a custom class that encapsulates a few sets of geometry data and implements the Tranform() method. I would Ideally want to move it just with this method. I saw also some examples of custom goals but non had similar thing like the Rigid body object.

Hi @ankere

Can you clarify some more about what it is you want to do?
To transform any geometry to the plane of a rigid object from the Kangaroo solver you don’t necessarily need a custom goal.
RigidBody and RigidPointSet both have an output which gives the plane of the object, and using this with Show you can get the updated location/orientation of this from the solver output and then orient any other geometry to it like this:
orient_with_rigid_object.gh (9.0 KB)

1 Like

Thanks so much Daniel! That works wonders.

I was doing something similar but had problems because I’m trying to assemble a dome from some tree forks and straight branches so I had issues with my approach with the non forked data:

  Plane init = Plane.Unset;
  Plane end = Plane.Unset;
  if (initPts.Count == 2)
    init = new Plane(initPts[0], new Vector3d(initPts[0] - initPts[1]));
    end = new Plane(endPts[0], new Vector3d(endPts[0] - endPts[1]));
    init = new Plane(initPts[0], initPts[1], initPts[2]);
    end = new Plane(endPts[0], endPts[1], endPts[2]);

  IMember mem = members as Moose.IMember;
  mem = mem.Duplicate();
  mem.Transform(Transform.PlaneToPlane(init, end));

  A = mem;

But now it works much better… like it works. The last part is to figure out how to actually make the dome happen :slight_smile:

1 Like