public static InfoProgressPanel Create(string title, bool killable)
 {
     InfoProgressPanel p = new InfoProgressPanel();
     if (!killable)
         p.Visible = false;
     p.labelTitle.Text = title;
     p.timer.Start();
     return p;
 }
        public static InfoProgressPanel Create(string title, bool killable)
        {
            InfoProgressPanel p = new InfoProgressPanel();

            if (!killable)
            {
                p.Visible = false;
            }
            p.labelTitle.Text = title;
            p.timer.Start();
            return(p);
        }
Esempio n. 3
0
 public void DeepAnalysis(InfoProgressPanel ipp)
 {
     originalModel.ipp = ipp;
     originalModel.Analyse();
     if (ipp.IsKilled)
     {
         return;
     }
     originalModel.updateBad();
     if (originalModel.intersectingTriangles.Count > 0 || originalModel.badTriangles > 0 || originalModel.manifold == false || originalModel.manyShardEdges != 0 || originalModel.loopEdges != 0 || originalModel.normalsOriented == false)
     {
         if (repairedModel == null)
             repairedModel = originalModel.Copy();
         repairedModel.ipp = ipp;
         repairedModel.RepairUnobtrusive();
         repairedModel.Analyse();
         originalModel.Analyse();
         if (ipp.IsKilled)
         {
             originalModel.clear();
             repairedModel.clear();
             return;
         }
         repairedModel.updateBad();
         ShowRepaired(true);
         repairedModel.ipp = null;
     }
     originalModel.ipp = null;
 }
Esempio n. 4
0
 public void Load(string file,InfoProgressPanel ipp)
 {
     filename = file;
     DateTime lastModified2 = File.GetLastWriteTime(filename);
     lastModified = lastModified2.Ticks;
     originalModel.ipp = ipp;
     string lname = filename.ToLower();
     if (lname.EndsWith(".stl"))
         originalModel.importSTL(filename, Main.main.importScaleFactor);
     else if (lname.EndsWith(".obj"))
         originalModel.importObj(filename, Main.main.importScaleFactor);
     else if (lname.EndsWith(".3ds"))
         originalModel.import3Ds(filename, Main.main.importScaleFactor);
     FileInfo info = new FileInfo(file);
     name = info.Name;
     originalModel.AnalyseFast();
     if (ipp.IsKilled)
     {
         originalModel.clear();
         return;
     }
     /*
     if (ipp.IsKilled)
     {
         originalModel.clear();
         return;
     }
     originalModel.updateBad();
     if (originalModel.intersectingTriangles.Count>0 || originalModel.badTriangles>0 || originalModel.manifold == false || originalModel.manyShardEdges != 0 || originalModel.loopEdges != 0 || originalModel.normalsOriented==false)
     {
         if (repairedModel == null)
             repairedModel = originalModel.Copy();
         repairedModel.ipp = ipp;
         repairedModel.RepairUnobtrusive();
         repairedModel.Analyse();
         originalModel.Analyse();
         if (ipp.IsKilled)
         {
             originalModel.clear();
             repairedModel.clear();
             return;
         }
         repairedModel.updateBad();
         ShowRepaired(true);
         repairedModel.ipp = null;
     }*/
     originalModel.ipp = null;
 }