private void CreateRackBoxes() { RackHeight = MiniloadInfo.Craneheight - MiniloadInfo.RackOffsetBottom + 0.5f; RackLength = MiniloadInfo.RailLength - MiniloadInfo.RackOffsetFront; LevelHeight = RackHeight / MiniloadInfo.RackLevels; BayLength = RackLength / MiniloadInfo.RackBays; foreach (DematicBox box in RackingBoxes) { Remove(box); Remove(box as Core.IEntity); box.Dispose(); } RackingBoxes.Clear(); DematicBoxInfo boxInfo = new DematicBoxInfo() { thickness = 0.01f, length = MiniloadInfo.RailLength - MiniloadInfo.RackOffsetFront, width = MiniloadInfo.RackWidth, height = RackHeight, transparency = MiniloadInfo.RackTransparency, boxColor = MiniloadInfo.RackColor }; DematicBox rack1 = new DematicBox(boxInfo); RackingBoxes.Add(rack1); Add(rack1, new Vector3(MiniloadInfo.RackOffsetFront + boxInfo.thickness + (RackLength / 2), MiniloadInfo.RackOffsetBottom, boxInfo.thickness + MiniloadInfo.AisleWidth / 2)); DematicBox rack2 = new DematicBox(boxInfo); RackingBoxes.Add(rack2); Add(rack2, new Vector3(MiniloadInfo.RackOffsetFront + boxInfo.thickness + (RackLength / 2), MiniloadInfo.RackOffsetBottom, -(boxInfo.width + boxInfo.thickness + MiniloadInfo.AisleWidth / 2))); }
private void CreateRackBoxes() { RackHeight = palletCraneInfo.Craneheight - palletCraneInfo.RackOffsetBottom + 0.5f; RackLength = palletCraneInfo.RailLength - palletCraneInfo.RackOffsetFront; LevelHeight = RackHeight / palletCraneInfo.RackLevels; BayLength = RackLength / palletCraneInfo.RackBays; foreach (var box in rackingBoxes) { Remove(box); Remove(box as Core.IEntity); box.Dispose(); } rackingBoxes.Clear(); var boxInfo = new DematicBoxInfo() { thickness = 0.01f, length = palletCraneInfo.RailLength - palletCraneInfo.RackOffsetFront, width = palletCraneInfo.RackWidth, height = RackHeight, transparency = palletCraneInfo.RackTransparency, boxColor = palletCraneInfo.RackColor }; var rack1 = new DematicBox(boxInfo); rackingBoxes.Add(rack1); Add(rack1, new Vector3(palletCraneInfo.RackOffsetFront + boxInfo.thickness + (RackLength / 2), palletCraneInfo.RackOffsetBottom, boxInfo.thickness + palletCraneInfo.AisleWidth / 2)); var rack2 = new DematicBox(boxInfo); rackingBoxes.Add(rack2); Add(rack2, new Vector3(palletCraneInfo.RackOffsetFront + boxInfo.thickness + (RackLength / 2), palletCraneInfo.RackOffsetBottom, -(boxInfo.width + boxInfo.thickness + palletCraneInfo.AisleWidth / 2))); }