Ejemplo n.º 1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            var            numbers = new List <double>();
            Plane          plane;
            GH_RobotSystem robotSystem = null;

            if (!DA.GetDataList(0, numbers))
            {
                return;
            }
            DA.GetData(1, ref robotSystem);

            if (robotSystem == null)
            {
                if (numbers.Count != 7)
                {
                    this.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "The list should be made out of 7 numbers."); return;
                }
                plane = RobotCellAbb.QuaternionToPlane(numbers[0], numbers[1], numbers[2], numbers[3], numbers[4], numbers[5], numbers[6]);
            }
            else
            {
                if (robotSystem.Value.Manufacturer == Manufacturers.ABB)
                {
                    if (numbers.Count != 7)
                    {
                        this.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "The list should be made out of 7 numbers."); return;
                    }
                }
                else
                {
                    if (numbers.Count != 6)
                    {
                        this.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, " The list should be made out of 6 numbers."); return;
                    }
                }

                plane = robotSystem.Value.NumbersToPlane(numbers.ToArray());
            }

            DA.SetData(0, plane);
        }
Ejemplo n.º 2
0
    internal RapidPostProcessor(RobotCellAbb robotCell, Program program)
    {
        _cell    = robotCell;
        _program = program;
        Code     = new List <List <List <string> > >();

        for (int i = 0; i < _cell.MechanicalGroups.Count; i++)
        {
            var groupCode = new List <List <string> >
            {
                MainModule(i)
            };

            for (int j = 0; j < program.MultiFileIndices.Count; j++)
            {
                groupCode.Add(SubModule(j, i));
            }

            Code.Add(groupCode);
        }
    }
Ejemplo n.º 3
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            double[]       numbers;
            GH_Plane       plane       = null;
            GH_RobotSystem robotSystem = null;

            if (!DA.GetData(0, ref plane))
            {
                return;
            }
            DA.GetData(1, ref robotSystem);

            if (robotSystem == null)
            {
                numbers = RobotCellAbb.PlaneToQuaternion(plane.Value);
            }
            else
            {
                numbers = robotSystem.Value.PlaneToNumbers(plane.Value);
            }

            DA.SetDataList(0, numbers);
        }
Ejemplo n.º 4
0
#pragma warning disable IDE0060
    internal RemoteAbb(RobotCellAbb cell)
    {
    }