Exemplo n.º 1
0
        private void btnExportSelected_Click(object sender, RoutedEventArgs e)
        {
            string fileName, formatId;

            if (!PromptFileSave(out fileName, out formatId))
            {
                return;
            }

            var selectedPerms = new List <IGeometryPermutation>();

            foreach (var parent in TreeViewItems.Zip(model.Regions.Except(InvalidRegions), (a, b) => new { Node = a, Region = b }))
            {
                if (parent.Node.IsChecked == false)
                {
                    continue;
                }

                foreach (var child in parent.Node.Items.Zip(parent.Region.Permutations.Except(InvalidPermutations), (a, b) => new { Node = a, Permutation = b }))
                {
                    if (child.Node.IsChecked == true)
                    {
                        selectedPerms.Add(child.Permutation);
                    }
                }
            }

            var masked = new MaskedGeometryModel(model, selectedPerms);

            ModelViewerPlugin.WriteModelFile(masked, fileName, formatId);
        }
Exemplo n.º 2
0
        private void btnExportSelected_Click(object sender, RoutedEventArgs e)
        {
            string fileName, formatId;

            if (!PromptFileSave(out fileName, out formatId))
            {
                return;
            }

            var masked = new MaskedGeometryModel(model, GetSelectedPermutations());

            ModelViewerPlugin.WriteModelFile(masked, fileName, formatId);
        }
Exemplo n.º 3
0
        private void btnExportSelected_Click(object sender, RoutedEventArgs e)
        {
            using (var model = renderGeometry.ReadGeometry(SelectedLod))
            {
                var writeModelFile = Substrate.GetSharedFunction <WriteModelFile>("Reclaimer.Plugins.ModelViewerPlugin.WriteModelFile");

                string fileName, formatId;
                if (!PromptFileSave(model, out fileName, out formatId))
                {
                    return;
                }

                var masked = new MaskedGeometryModel(model, GetSelectedPermutations(model));
                writeModelFile(masked, fileName, formatId);
            }
        }