public bool SaveSelectedModelAs() { SaveFileDialog sf = new SaveFileDialog(); sf.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory + "Models"; if (sf.ShowDialog() == DialogResult.OK) { string name = sf.FileName; if (IOUtils.ExtractExtension(sf.FileName) == null) { sf.FileName = sf.FileName + ".obj"; } if (this.GLrender.RenderableObjects.Count > 0) { RenderableObject o = null; o = this.GLrender.RenderableObjects[this.GLrender.SelectedModelIndex]; if (o != null) { PointCloud pc = o.PointCloud; pc.ToObjFile(sf.FileName); } } else { System.Windows.Forms.MessageBox.Show("please switch to 3D Tab if scanning is in progress - (nothing to save) "); return(false); } } return(true); }
public bool SaveSelectedModel() { if (this.GLrender.RenderableObjects.Count > 0) { RenderableObject o = null; o = this.GLrender.RenderableObjects[this.GLrender.SelectedModelIndex]; if (o != null) { PointCloud pc = o.PointCloud; pc.ToObjFile(pc.FileNameLong); } } else { System.Windows.Forms.MessageBox.Show("please switch to 3D Tab if scanning is in progress - (nothing to save) "); return(false); } return(true); }