Example #1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            string   name      = null;
            GH_Plane basePlane = null;

            if (!DA.GetData(0, ref name))
            {
                return;
            }
            if (!DA.GetData(1, ref basePlane))
            {
                return;
            }

            var robotSystem = RobotSystem.Load(name, basePlane.Value);;

            DA.SetData(0, new GH_RobotSystem(robotSystem));
        }
Example #2
0
        public TestProgram()
        {
            var robot = RobotSystem.Load("Bartlett-IRB120", Plane.WorldXY);

            var planeA = Plane.WorldYZ;
            var planeB = Plane.WorldYZ;

            planeA.Origin = new Point3d(300, 200, 610);
            planeB.Origin = new Point3d(300, -200, 610);
            var speed    = new Speed(300);
            var targetA  = new CartesianTarget(planeA, RobotConfigurations.Wrist, Motions.Joint);
            var targetB  = new CartesianTarget(planeB, null, Motions.Linear, speed: speed);
            var toolpath = new SimpleToolpath()
            {
                targetA, targetB
            };

            Program = new Program("TestProgram", robot, new[] { toolpath });
        }