/// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="da">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess da)
        {
            var parameters = new List <RhinoNestKernel.Nesting.RhinoNestObject>();

            //Declaration.
            var Object      = new List <Guid>();
            var orientation = new OrientationGoo();
            var criterion   = new CriterionGoo();
            var copies      = 0;
            var priority    = 0;

            //clear value and get the objects.
            if (!da.GetDataList(0, Object))
            {
                return;
            }
            da.GetData(1, ref copies);
            da.GetData(2, ref priority);
            da.GetData(3, ref orientation);
            da.GetData(4, ref criterion);

            var organizer = new RhinoNestKernel.Curves.OrganizeObjects(Object);
            var res       = organizer.Sort();

            foreach (var rhinoNestObject in organizer.Result)
            {
                rhinoNestObject.Parameters.Priority    = priority;
                rhinoNestObject.Parameters.Copies      = copies;
                rhinoNestObject.Parameters.Criterion   = criterion.Value.Constraint;
                rhinoNestObject.Parameters.Orientation = orientation.Value.Constraint;
                parameters.Add(rhinoNestObject);
            }
            //Put the list to Output.
            da.SetDataList(0, parameters);
        }
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="da">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess da)
        {
            var parameters = new List<RhinoNestKernel.Nesting.RhinoNestObject>();

            //Declaration.
            var Object = new List<Guid>();
            var orientation = new OrientationGoo();
            var criterion = new CriterionGoo();
            var copies = 0;
            var priority = 0;
            //clear value and get the objects.
            if (!da.GetDataList(0, Object)) return;
            da.GetData(1, ref copies);
            da.GetData(2, ref priority);
            da.GetData(3, ref orientation);
            da.GetData(4, ref criterion);

            var organizer = new RhinoNestKernel.Curves.OrganizeObjects(Object);
            var res = organizer.Sort();

            foreach (var rhinoNestObject in organizer.Result)
            {
                rhinoNestObject.Parameters.Priority = priority;
                rhinoNestObject.Parameters.Copies = copies;
                rhinoNestObject.Parameters.Criterion = criterion.Value.Constraint;
                rhinoNestObject.Parameters.Orientation = orientation.Value.Constraint;
                parameters.Add(rhinoNestObject);
            }
            //Put the list to Output.
            da.SetDataList(0, parameters);
        }