Example #1
0
        public static sharp.PackedItem PackedItemToPackedItem(clone.PackedItem pItem)
        {
            var originalDimensions = new Dimensions((uint)pItem.Item.Width, (uint)pItem.Item.Length, (uint)pItem.Item.Depth);
            var rotatedDimensions  = new Dimensions((uint)pItem.Width, (uint)pItem.Length, (uint)pItem.Depth);

            return(new sharp.PackedItem(ItemToItem(pItem.Item))
            {
                Position = new Position(pItem.X, pItem.Y, pItem.Z),
                Rotation = Rotator.GetRotation(originalDimensions, rotatedDimensions),
            });
        }
Example #2
0
 /// <summary>
 /// Add a packed item to this layer.
 /// </summary>
 /// <param name="packedItem"></param>
 public void Insert(PackedItem packedItem)
 {
     this.Items.Add(packedItem);
 }