/// <summary> /// Shows the specified tessellated solids in a Helix toolkit window. /// </summary> /// <param name="tessellatedSolids">The tessellated solids.</param> /// <param name="seconds">The seconds.</param> public static void ShowSequentially(IList <TessellatedSolid> tessellatedSolids, int seconds = 1) { //var models = new List<Visual3D>(); var window = new Window3DPlot(); var models = new ObservableCollection <Visual3D>(); var startLocation = window.WindowStartupLocation; foreach (var tessellatedSolid in tessellatedSolids) { var model = MakeModelVisual3D(tessellatedSolid); window.view1.Children.Add(model); window.view1.FitView(window.view1.Camera.LookDirection, window.view1.Camera.UpDirection); window.WindowStartupLocation = startLocation; window.Show(); Thread.Sleep(seconds * 1000); window.Hide(); //var size = new Size(400, 400); window.InvalidateVisual(); //window.Top = window.Top; //window.Left = window.Left; //window.UpdateLayout(); //window.view1.Items.Refresh(); //window.view1.UpdateLayout(); //window.Measure(size); //window.Arrange(new Rect(new System.Windows.PointLight(0, 0), size)); } window.Close(); }
/// <summary> /// Shows the specified tessellated solid in a Helix toolkit window. /// </summary> /// <param name="tessellatedSolid">The tessellated solid.</param> /// <param name="seconds">The seconds.</param> public static void Show(TessellatedSolid tessellatedSolid, int seconds = 0) { var window = new Window3DPlot(); window.view1.Children.Add(MakeModelVisual3D(tessellatedSolid)); window.view1.FitView(window.view1.Camera.LookDirection, window.view1.Camera.UpDirection); if (seconds > 0) { window.Show(); Thread.Sleep(seconds * 1000); window.Close(); } else { window.Show(); } }
/// <summary> /// Shows the specified tessellated solids in a Helix toolkit window. /// </summary> /// <param name="tessellatedSolids">The tessellated solids.</param> /// <param name="seconds">The seconds.</param> public static void Show(IList <TessellatedSolid> tessellatedSolids, int seconds = 0) { var window = new Window3DPlot(); var models = new List <Visual3D>(); foreach (var tessellatedSolid in tessellatedSolids) { var model = MakeModelVisual3D(tessellatedSolid); models.Add(model); window.view1.Children.Add(model); } window.view1.FitView(window.view1.Camera.LookDirection, window.view1.Camera.UpDirection); if (seconds > 0) { window.Show(); Thread.Sleep(seconds * 1000); window.Close(); } else { window.Show(); } }