예제 #1
0
 public void CalcScene()
 {
     m_sceneobject = new Object3d();
     foreach (Object3d obj in m_engine3d.m_objects)
     {
         m_sceneobject.Add(obj);
     }
 }
예제 #2
0
        /// <summary>
        /// I want to get rid of this function, need to replace the
        /// Slic3r model and the supportgenerator model
        /// </summary>
        public void CalcScene()
        {
            m_sceneobject = new Object3d();
            int idx = 0;

            foreach (Object3d obj in m_engine3d.m_objects)
            {
                m_sceneobject.Add(obj);
                if (idx == 0)                           // if this is the first object
                {
                    if (m_engine3d.m_objects.Count > 1) // if there is more than one object in the scene, generate a unique name
                    {
                        string scenename = obj.m_fullname;
                        scenename = Path.GetDirectoryName(obj.m_fullname) + m_pathsep + Path.GetFileNameWithoutExtension(obj.m_fullname) + "_scene.stl";
                        m_sceneobject.m_fullname = scenename;
                    }
                    else
                    {
                        m_sceneobject.m_fullname = obj.m_fullname;
                    }
                }
                idx++;
            }
        }