Example #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);
        }
Example #2
0
        private void btnExportAll_Click(object sender, RoutedEventArgs e)
        {
            string fileName, formatId;

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

            ModelViewerPlugin.WriteModelFile(model, fileName, formatId);
        }
Example #3
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);
        }