Exemple #1
0
        /// <summary>
        ///     The copy constructor.
        /// </summary>
        /// <param name="layer"></param>
        private MRecipeDeviceLayer(MRecipeDeviceLayer layer)
            : base(layer)
        {
            PatternFilePath           = string.IsNullOrWhiteSpace(layer.PatternFilePath) ? "" : (string)layer.PatternFilePath.Clone();
            ProcessParametersFilePath = string.IsNullOrWhiteSpace(layer.ProcessParametersFilePath) ? "" : (string)layer.ProcessParametersFilePath.Clone();
            TargetProcessMode         = string.IsNullOrWhiteSpace(layer.TargetProcessMode) ? "" : (string)layer.TargetProcessMode.Clone();
            TileSettings = (MTileSettings)layer.TileSettings.Clone();

            // clone tiles info
            TileDescriptions = new ObservableCollection <MTileDescription>();
            foreach (var tile in layer.TileDescriptions)
            {
                TileDescriptions.Add((MTileDescription)tile.Clone());
            }
        }
Exemple #2
0
        public static Matrix4x4 GetRelativeTransform(MRecipe recipe, MRecipeDeviceLayer layer)
        {
            if (layer.Parent?.Parent == null)
            {
                recipe.UpdateParents();
            }

            return(GeometricArithmeticModule.CombineTransformations(
                       // add layer's transform
                       layer.TransformInfo.ToMatrix4x4(),

                       // add device's transform
                       (layer.Parent as MRecipeBaseNode).TransformInfo.ToMatrix4x4(),

                       // add plate's transform
                       (layer.Parent.Parent as MRecipeBaseNode).TransformInfo.ToMatrix4x4()
                       ));
        }
Exemple #3
0
 public void AddLayer(MRecipeDeviceLayer layer)
 {
     layer.Parent = this;
     Layers.Add(layer);
 }
Exemple #4
0
 public MRecipeDevice(string nameIn, MRecipeDeviceLayer layerIn)
     : this(nameIn)
 {
     Layers.Add(layerIn);
 }