Ejemplo n.º 1
0
        //------------------------------------------//
        public void addSlice(absSliceDataSource sliceData)
        {
            if (m_max_Layers < sliceData.getLayerCount())
            {
                m_max_Layers = sliceData.getLayerCount();
            }
            if (m_layerthickness != sliceData.getLayerThickness())
            {
                m_layerthickness = sliceData.getLayerThickness();
            }


            m_List.Add(sliceData);
        }
Ejemplo n.º 2
0
        //------------------------------------------//
        private void addSlice(ty_part partInfo)
        {
            if (partInfo.filename != "")
            {
                string tmp = "";

                try
                {
                    tmp = System.IO.Path.GetFileName(partInfo.filename);
                }
                catch (System.Exception e)
                {
                    m_error.addError("addSlice" + e.Message);
                    return;
                }

                string filename = "";


                if (System.IO.File.Exists(m_filePath + partInfo.filename))
                {
                    filename = m_filePath + partInfo.filename;
                }
                else if (System.IO.File.Exists(m_filePath + tmp))
                {
                    filename = m_filePath + tmp;
                }
                else if (System.IO.File.Exists(partInfo.filename))
                {
                    filename = partInfo.filename;
                }



                if (filename != "")
                {
                    //- open slice file
                    absSliceDataSource sliceClass = clHelper.OpenSliceFile(filename);

                    partInfo.sliceClass = sliceClass;

                    //int test = ((clSliFileReader)sliceClass).getLayerUpPosition(1);


                    if (m_max_Layers < sliceClass.getLayerCount())
                    {
                        m_max_Layers = sliceClass.getLayerCount();
                        m_partZMax   = partInfo; // Speichern des höchsten Bauteils für
                    }

                    partInfo.layerthikness = sliceClass.getLayerThickness();

                    //- diese klasse hat als Layer-Stärke die minimale Slise-Stärke aller Teile
                    m_layerthickness = Math.Min(m_layerthickness, partInfo.layerthikness);



                    m_List.Add(partInfo);
                }
                else
                {
                    m_error.addError("Can't find file: [" + partInfo.filename + "]");
                }
            }
        }