├── docs
└── SC_API_documentation.pdf
├── CCFE_Toolbox
├── Resources
│ ├── Export.png
│ ├── Image1.png
│ ├── Pipes.bmp
│ ├── pipe.png
│ ├── GetPipes.bmp
│ ├── ga_image.png
│ ├── ps_image.png
│ ├── va_image.png
│ ├── vg_image.png
│ ├── APIpython.png
│ ├── SceneGraph.png
│ ├── SketchTool.png
│ ├── cpec_image.png
│ ├── cps_image.png
│ ├── mtw_image.png
│ ├── mtw_image1.png
│ ├── tori_image.png
│ ├── void_Image.png
│ ├── CreateAssembly.png
│ ├── FindMatchingFaces.png
│ ├── PythonScripts
│ │ ├── Void_generator.scscript
│ │ ├── Geometry_assessor.scscript
│ │ ├── Mesh_tally_writer.scscript
│ │ ├── Volume_assessor.scscript
│ │ ├── Mesh_Tally_Checker.scscript
│ │ ├── Cylinder-plane_locator.scscript
│ │ ├── Cylinder-plane_splitter.scscript
│ │ └── Cylinder-cylinder_splitter.scscript
│ ├── asme_pipes.txt
│ └── Ribbon.xml
├── CCFE_Toolbox_Manifest.xml
├── CCFE_Commands
│ ├── StandardPipes.cs
│ ├── PipeSeperator.cs
│ ├── CylinderPlaneEdgeChecker.cs
│ ├── CylinderPlaneSeperator.cs
│ ├── MeshTallyChecker.cs
│ ├── VoidGenerator.cs
│ ├── VolumeAssessor.cs
│ ├── MaxSurfaces.cs
│ └── GeometryAssessor.cs
├── UI
│ ├── MeshTallyCheckerForm.cs
│ ├── Pipes_Radius.cs
│ ├── MaxSurfacesForm.cs
│ ├── VoidGeneratorForm.cs
│ ├── MeshTallyWriterForm.cs
│ ├── VolumeAssessorForm.cs
│ ├── MeshTallyWriterForm2.cs
│ ├── BodySelectForm.cs
│ ├── LostParticlesForm.cs
│ ├── MeshTallyCheckerForm.designer.cs
│ ├── GeometryAssessorForm.cs
│ ├── BodySelectForm.resx
│ ├── MaxSurfacesForm.resx
│ ├── Pipes_Radius.resx
│ ├── MeshTallyCheckerForm.resx
│ ├── MeshTallyWriterForm2.resx
│ ├── VoidGeneratorForm.resx
│ ├── PipeSimplificationForm.resx
│ ├── ToriSimplificationForm.resx
│ ├── MaxSurfacesForm.Designer.cs
│ ├── LostParticlesForm.resx
│ ├── MeshTallyWriterForm.resx
│ ├── VolumeAssessorForm.resx
│ ├── PipeSimplificationForm.cs
│ ├── VoidGeneratorForm.Designer.cs
│ ├── GeometryAssessorForm.resx
│ ├── Pipes_Radius.Designer.cs
│ └── VolumeAssessorForm.Designer.cs
├── Properties
│ ├── AssemblyInfo.cs
│ └── Settings.settings
├── CCFE_Toolbox_AddIn.cs
├── app.config
└── InstanceClasses
│ └── CommonSpaceClaimFunctions.cs
├── LICENSE
├── CCFE_Toolbox.sln
└── README.md
/docs/SC_API_documentation.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/docs/SC_API_documentation.pdf
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/Export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/Export.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/Image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/Image1.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/Pipes.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/Pipes.bmp
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/pipe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/pipe.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/GetPipes.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/GetPipes.bmp
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/ga_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/ga_image.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/ps_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/ps_image.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/va_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/va_image.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/vg_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/vg_image.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/APIpython.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/APIpython.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/SceneGraph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/SceneGraph.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/SketchTool.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/SketchTool.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/cpec_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/cpec_image.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/cps_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/cps_image.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/mtw_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/mtw_image.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/mtw_image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/mtw_image1.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/tori_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/tori_image.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/void_Image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/void_Image.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/CreateAssembly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/CreateAssembly.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/FindMatchingFaces.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/FindMatchingFaces.png
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/PythonScripts/Void_generator.scscript:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/PythonScripts/Void_generator.scscript
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/PythonScripts/Geometry_assessor.scscript:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/PythonScripts/Geometry_assessor.scscript
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/PythonScripts/Mesh_tally_writer.scscript:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/PythonScripts/Mesh_tally_writer.scscript
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/PythonScripts/Volume_assessor.scscript:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/PythonScripts/Volume_assessor.scscript
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/PythonScripts/Mesh_Tally_Checker.scscript:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/PythonScripts/Mesh_Tally_Checker.scscript
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/PythonScripts/Cylinder-plane_locator.scscript:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/PythonScripts/Cylinder-plane_locator.scscript
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/PythonScripts/Cylinder-plane_splitter.scscript:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/PythonScripts/Cylinder-plane_splitter.scscript
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/PythonScripts/Cylinder-cylinder_splitter.scscript:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ukaea/SpaceClaim_API_NeutronicsTools/HEAD/CCFE_Toolbox/Resources/PythonScripts/Cylinder-cylinder_splitter.scscript
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Toolbox_Manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 UK Atomic Energy Authority
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Commands/StandardPipes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.IO;
7 | using System.Reflection;
8 |
9 | namespace CCFE_Toolbox.CCFE_Commands
10 | {
11 | class StandardPipeDia
12 | {
13 | public static Dictionary> getStandardPipeDia()
14 | {
15 | //StreamReader FileReader = new StreamReader(@);
16 | string FileContents= CCFE_Toolbox.Properties.Resources.asme_pipes;
17 | //FileContents = FileReader.ReadToEnd();
18 | Dictionary> pipe_diameters = new Dictionary>();
19 |
20 | string[] lines = FileContents.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
21 |
22 | foreach (string line in lines)
23 | {
24 | string[] lineparts = line.Split(',');
25 | List dia = new List();
26 | dia.Add(Convert.ToDouble(lineparts[2])/2/1000.0);
27 | dia.Add(((Convert.ToDouble(lineparts[2])/2.0) - Convert.ToDouble(lineparts[3]))/1000.0);
28 | pipe_diameters.Add(lineparts[0] + lineparts[1], dia);
29 | }
30 |
31 | return (pipe_diameters);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/MeshTallyCheckerForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace CCFE_Toolbox.UI
11 | {
12 | public partial class MeshTallyCheckerForm : Form
13 | {
14 | public MeshTallyCheckerForm()
15 | {
16 | InitializeComponent();
17 | checkBox1.Enabled = false;
18 | checkBox1.Checked = false;
19 | checkBox2.Checked = true;
20 | }
21 |
22 |
23 | public bool Cut
24 | {
25 | get { return checkBox1.Checked; }
26 | }
27 |
28 | public bool Plane
29 | {
30 | get { return checkBox2.Checked; }
31 | }
32 |
33 |
34 | private void MeshTallyCheckerForm_Load(object sender, EventArgs e)
35 | {
36 |
37 | }
38 |
39 | private void checkBox1_CheckedChanged(object sender, EventArgs e)
40 | {
41 |
42 | }
43 |
44 | private void checkBox2_CheckedChanged(object sender, EventArgs e)
45 | {
46 | checkBox1.Enabled = (checkBox2.CheckState == CheckState.Checked);
47 | if (checkBox2.CheckState == CheckState.Unchecked)
48 | {
49 | checkBox1.Checked = false;
50 | }
51 | }
52 |
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/Pipes_Radius.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace CCFE_Toolbox.UI
12 | {
13 | public partial class Pipes_Radius : Form
14 | {
15 | public Pipes_Radius()
16 | {
17 | InitializeComponent();
18 | innerRadius.Enabled = false;
19 | }
20 |
21 | public bool hollow
22 | {
23 | get { return hollowCheck.Checked; }
24 | }
25 |
26 | public decimal outRadius
27 | {
28 | get { return outerRadius.Value; }
29 | }
30 |
31 | public decimal inRadius
32 | {
33 | get { return innerRadius.Value; }
34 | }
35 |
36 | private void label3_Click(object sender, EventArgs e)
37 | {
38 |
39 | }
40 |
41 | private void label3_Click_1(object sender, EventArgs e)
42 | {
43 |
44 | }
45 |
46 | private void label4_Click(object sender, EventArgs e)
47 | {
48 |
49 | }
50 |
51 | private void hollowCheck_CheckedChanged(object sender, EventArgs e)
52 | {
53 | if (hollowCheck.Checked)
54 | {
55 | innerRadius.Enabled = true;
56 | }
57 | else
58 | {
59 | innerRadius.Enabled = false;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/MaxSurfacesForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace CCFE_Toolbox.UI
12 | {
13 | public partial class MaxSurfacesForm : Form
14 | {
15 | public MaxSurfacesForm()
16 | {
17 | InitializeComponent();
18 | string[] colours = new string[] { "Blue", "Red", "Green", "Orange", "Black", "Yellow", "Salmon Pink" };
19 | comboBox1.Items.AddRange(colours);
20 | comboBox1.Text = "Red";
21 | comboBox1.Enabled = false;
22 | }
23 |
24 | public string ColourSelection
25 | {
26 | get { return comboBox1.Text; }
27 | }
28 |
29 | public bool ChangeColour
30 | {
31 | get { return checkBox1.Checked; }
32 | }
33 |
34 | public double MaxSurfaces
35 | {
36 | get { return (double)numericUpDown1.Value; }
37 | }
38 |
39 | private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
40 | {
41 |
42 | }
43 |
44 | private void numericUpDown1_ValueChanged(object sender, EventArgs e)
45 | {
46 |
47 | }
48 |
49 | private void checkBox1_CheckedChanged(object sender, EventArgs e)
50 | {
51 | comboBox1.Enabled = (checkBox1.CheckState == CheckState.Checked);
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/CCFE_Toolbox.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30320.27
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CCFE_Toolbox", "CCFE_Toolbox\CCFE_Toolbox.csproj", "{B529D8C7-515F-441D-927C-821AD95E7A55}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Debug|x64 = Debug|x64
12 | Release|Any CPU = Release|Any CPU
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {B529D8C7-515F-441D-927C-821AD95E7A55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {B529D8C7-515F-441D-927C-821AD95E7A55}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {B529D8C7-515F-441D-927C-821AD95E7A55}.Debug|x64.ActiveCfg = Debug|Any CPU
19 | {B529D8C7-515F-441D-927C-821AD95E7A55}.Debug|x64.Build.0 = Debug|Any CPU
20 | {B529D8C7-515F-441D-927C-821AD95E7A55}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {B529D8C7-515F-441D-927C-821AD95E7A55}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {B529D8C7-515F-441D-927C-821AD95E7A55}.Release|x64.ActiveCfg = Release|Any CPU
23 | {B529D8C7-515F-441D-927C-821AD95E7A55}.Release|x64.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {C991A8F8-9041-494B-9537-64177A084A27}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("CCFE_Toolbox")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("United Kingdom Atomic Energy Authority")]
12 | [assembly: AssemblyProduct("CCFE_Toolbox")]
13 | [assembly: AssemblyCopyright("Copyright © United Kingdom Atomic Energy Authority 2021")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("b529d8c7-515f-441d-927c-821ad95e7a55")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/asme_pipes.txt:
--------------------------------------------------------------------------------
1 | 6,10S,10.3,1.24
2 | 6,40S,10.3,1.73
3 | 6,80S,10.3,2.41
4 | 8,10S,13.7,1.65
5 | 8,40S,13.7,2.24
6 | 8,80S,13.7,3.02
7 | 10,10S,17.1,1.65
8 | 10,40S,17.1,2.31
9 | 10,80S,17.1,3.2
10 | 15,5S,21.3,1.65
11 | 15,10S,21.3,2.11
12 | 15,40S,21.3,2.77
13 | 15,80S,21.3,3.73
14 | 20,5S,26.7,1.65
15 | 20,10S,26.7,2.11
16 | 20,40S,26.7,2.87
17 | 20,80S,26.7,3.91
18 | 25,5S,33.4,1.65
19 | 25,10S,33.4,2.77
20 | 25,40S,33.4,3.38
21 | 25,80S,33.4,4.55
22 | 32,5S,42.2,1.65
23 | 32,10S,42.2,2.77
24 | 32,40S,42.2,3.56
25 | 32,80S,42.2,4.85
26 | 40,5S,48.3,1.65
27 | 40,10S,48.3,2.77
28 | 40,40S,48.3,3.68
29 | 40,80S,48.3,5.08
30 | 50,5S,60.3,1.65
31 | 50,10S,60.3,2.77
32 | 50,40S,60.3,3.91
33 | 50,80S,60.3,5.54
34 | 65,5S,73,2.11
35 | 65,10S,73,3.05
36 | 65,40S,73,5.16
37 | 65,80S,73,7.01
38 | 80,5S,88.9,2.11
39 | 80,10S,88.9,3.05
40 | 80,40S,88.9,5.49
41 | 80,80S,88.9,7.62
42 | 90,5S,101.6,2.11
43 | 90,10S,101.6,3.05
44 | 90,40S,101.6,5.74
45 | 90,80S,101.6,8.08
46 | 100,5S,114.3,2.11
47 | 100,10S,114.3,3.05
48 | 100,40S,114.3,6.02
49 | 100,80S,114.3,8.56
50 | 125,5S,141.3,2.77
51 | 125,10S,141.3,3.4
52 | 125,40S,141.3,6.55
53 | 125,80S,141.3,9.53
54 | 150,5S,168.3,2.77
55 | 150,10S,168.3,3.4
56 | 150,40S,168.3,7.11
57 | 150,80S,168.3,10.97
58 | 200,5S,219.1,2.77
59 | 200,10S,219.1,3.76
60 | 200,40S,219.1,8.18
61 | 200,80S,219.1,12.7
62 | 250,5S,273.1,3.4
63 | 250,10S,273.1,4.19
64 | 250,40S,273.1,9.27
65 | 250,80S,273.1,12.7
66 | 300,5S,323.9,3.96
67 | 300,10S,323.9,4.57
68 | 300,40S,323.9,9.53
69 | 300,80S,323.9,12.7
70 | 350,5S,355.6,3.96
71 | 350,10S,355.6,4.78
72 | 350,40S,355.6,9.53
73 | 350,80S,355.6,12.7
74 | 400,5S,406.4,4.19
75 | 400,10S,406.4,4.78
76 | 400,40S,406.4,9.53
77 | 400,80S,406.4,12.7
78 | 450,5S,457,4.19
79 | 450,10S,457,4.78
80 | 450,40S,457,9.53
81 | 450,80S,457,12.7
82 | 500,5S,508,4.78
83 | 500,10S,508,5.54
84 | 500,40S,508,9.53
85 | 500,80S,508,12.7
86 | 550,5S,559,4.78
87 | 550,10S,559,5.54
88 | 600,5S,610,5.54
89 | 600,10S,610,6.35
90 | 600,40S,610,9.53
91 | 600,80S,610,12.7
92 | 750,5S,762,6.35
93 | 750,10S,762,7.92
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/VoidGeneratorForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using System.IO;
11 |
12 | namespace CCFE_Toolbox.UI
13 | {
14 | public partial class VoidGeneratorForm : Form
15 | {
16 |
17 |
18 | public VoidGeneratorForm()
19 | {
20 | InitializeComponent();
21 | //button1.Click += new EventHandler(this.button1_Click);
22 | numericUpDown1.Value = 5;
23 | numericUpDown2.Value = 30;
24 |
25 |
26 | }
27 |
28 | public int Iterations
29 | {
30 | get { return (int)numericUpDown1.Value; }
31 | }
32 |
33 | public int MaxFaces
34 | {
35 | get { return (int)numericUpDown2.Value; }
36 | }
37 |
38 | private void VoidGeneratorForm_Load(object sender, EventArgs e)
39 | {
40 | /*
41 | DialogResult result = openFileDialog1.ShowDialog();
42 | if (result == DialogResult.OK)
43 | {
44 | string file = openFileDialog1.FileName;
45 | MessageBox.Show(file);
46 | }
47 | */
48 |
49 |
50 | /*
51 | DialogResult result = folderBrowserDialog1.ShowDialog();
52 | if (result == DialogResult.OK)
53 | {
54 | string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);
55 | MessageBox.Show("Files found: " + files.Length.ToString(), "Message");
56 | }
57 | */
58 | }
59 |
60 | private void cancelButton_Click(object sender, EventArgs e)
61 | {
62 |
63 | }
64 |
65 | private void okButton_Click(object sender, EventArgs e)
66 | {
67 |
68 | }
69 |
70 | private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
71 | {
72 |
73 | }
74 |
75 | private void numericUpDown1_ValueChanged(object sender, EventArgs e)
76 | {
77 |
78 | }
79 |
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Toolbox_AddIn.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Diagnostics;
5 | using System.IO;
6 | using SpaceClaim.Api.V18.Extensibility;
7 | using System.Windows.Forms;
8 | using SpaceClaim.Api.V18.Geometry;
9 |
10 |
11 | namespace CCFE_Toolbox
12 | {
13 | class CCFE_Toolbox_AddIn : SpaceClaim.Api.V18.Extensibility.AddIn, SpaceClaim.Api.V18.Extensibility.IExtensibility, SpaceClaim.Api.V18.Extensibility.ICommandExtensibility, SpaceClaim.Api.V18.Extensibility.IRibbonExtensibility
14 | {
15 |
16 | readonly SpaceClaim.Api.V18.Extensibility.CommandCapsule[] capsules = new[]
17 | {
18 | new SpaceClaim.Api.V18.Extensibility.CommandCapsule("CCFE_Toolbox.C#.V18.RibbonTab", Properties.Resources.RibbonTabText),
19 | new SpaceClaim.Api.V18.Extensibility.CommandCapsule("CCFE_Toolbox.C#.V18.PartGroup", Properties.Resources.PartGroupText),
20 | new CCFE_Commands.Export(),
21 | new CCFE_Commands.Pipes_simp(),
22 | new CCFE_Commands.Tori_simp(),
23 | new CCFE_Commands.BodySelect(),
24 | new CCFE_Commands.LostParticles(),
25 | new CCFE_Commands.MaxSurfaces(),
26 | new CCFE_Commands.CylinderPlaneSeperator(),
27 | new CCFE_Commands.CylinderPlaneEdgeChecker(),
28 | new CCFE_Commands.PipeSeperator(),
29 | new CCFE_Commands.VoidGenerator(),
30 | new CCFE_Commands.MeshTallyWriter(),
31 | new CCFE_Commands.GeometryAssessor(),
32 | new CCFE_Commands.VolumeAssessor(),
33 | new CCFE_Commands.MeshTallyChecker()
34 |
35 | };
36 |
37 | #region IExtensibility members
38 | public bool Connect()
39 | {
40 | // Initilization for add-in
41 | SpaceClaim.Api.V18.Unsupported.JournalMethods.RecordAutoLoadAddIn("SampleAddIn.C#.V18.RibbonTab", Properties.Resources.AddInManifestInfo);
42 |
43 | return true;
44 | }
45 |
46 | public void Disconnect()
47 | {
48 |
49 | }
50 |
51 | #endregion
52 |
53 | #region ICommandExtensibility members
54 |
55 | public void Initialize()
56 | {
57 | foreach (SpaceClaim.Api.V18.Extensibility.CommandCapsule capsule in capsules)
58 | capsule.Initialize();
59 |
60 |
61 | // Insert commands here for the context menu
62 | }
63 |
64 | #endregion
65 |
66 | #region IRibbonExtensibility members
67 |
68 | public string GetCustomUI()
69 | {
70 | return Properties.Resources.Ribbon;
71 | }
72 |
73 | #endregion
74 | }
75 |
76 |
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 0
7 |
8 |
9 | False
10 |
11 |
12 | 0
13 |
14 |
15 | 0
16 |
17 |
18 | 0
19 |
20 |
21 | False
22 |
23 |
24 | False
25 |
26 |
27 | 0
28 |
29 |
30 | 0
31 |
32 |
33 | False
34 |
35 |
36 | 0
37 |
38 |
39 | 0
40 |
41 |
42 | 0
43 |
44 |
45 | 0
46 |
47 |
48 | 0
49 |
50 |
51 | 1
52 |
53 |
54 | False
55 |
56 |
57 | False
58 |
59 |
60 | False
61 |
62 |
63 | False
64 |
65 |
66 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Commands/PipeSeperator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Drawing;
8 | using System.Diagnostics;
9 | using SpaceClaim.Api.V18.Extensibility;
10 | using SpaceClaim.Api.V18.Geometry;
11 | using SpaceClaim.Api.V18.Modeler;
12 | using System.Xml.Serialization;
13 | using CCFE_Toolbox.Properties;
14 | using System.Windows.Forms;
15 | using SpaceClaim.Api.V18;
16 | using SpaceClaim.Api.V18.Display;
17 | using Point = SpaceClaim.Api.V18.Geometry.Point;
18 | using SpaceClaim.Api.V18.Scripting;
19 | using System.Text.RegularExpressions;
20 |
21 | namespace CCFE_Toolbox.CCFE_Commands
22 | {
23 | //class ScriptClass :
24 |
25 | class PipeSeperator : CommandCapsule
26 | {
27 | // This command name must match that in the Ribbon.xml file
28 | //----------------------------------------------------------
29 | public bool first = true;
30 | public string directory = @"C:\ProgramData\SpaceClaim\AddIns\Samples\V18\CCFE_Toolkit\Resources\PythonScripts\Cylinder-cylinder_splitter.scscript";
31 | public const string CommandName = "CCFE_Toolbox.C#.V18.PS";
32 |
33 | public PipeSeperator() : base(CommandName, Resources.PiSepText, Resources.ps_image, Resources.PiSepHint)
34 | {
35 |
36 | }
37 |
38 | //protected override void OnUpdate(Command command)
39 | //{
40 | /*
41 | if (first)
42 | {
43 | directory = Directory.GetCurrentDirectory();
44 | first = false;
45 | }
46 | */
47 | //Window window = Window.ActiveWindow;
48 | //command.IsEnabled = window != null && SelectionAllBodies(window);
49 | //}
50 | protected override void OnExecute(Command command, ExecutionContext context, Rectangle buttonRect)
51 | {
52 | if (File.Exists(directory))
53 | {
54 |
55 | // Instance common functions class
56 | InstanceClasses.CommonSpaceClaimFunctions FunctionsClass = new InstanceClasses.CommonSpaceClaimFunctions();
57 |
58 | // Variables
59 | Window window = Window.ActiveWindow;
60 | Document doc = window.Document;
61 | Part rootPart = doc.MainPart;
62 |
63 | // Run the script
64 | SpaceClaim.Api.V18.Application.RunScript(directory);
65 | }
66 | else
67 | {
68 | MessageBox.Show("ERROR: Script not found.");
69 | }
70 | }
71 |
72 | public bool SelectionAllBodies(Window window)
73 | {
74 | ICollection docObjects = window.ActiveContext.Selection;
75 | if (docObjects.Count == 0)
76 | {
77 | return true;
78 | }
79 | foreach (IDocObject obj in docObjects)
80 | {
81 | var body = obj as IDesignBody;
82 | if (body == null)
83 | {
84 | return false;
85 | }
86 | }
87 | return true;
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Commands/CylinderPlaneEdgeChecker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Drawing;
8 | using System.Diagnostics;
9 | using SpaceClaim.Api.V18.Extensibility;
10 | using SpaceClaim.Api.V18.Geometry;
11 | using SpaceClaim.Api.V18.Modeler;
12 | using System.Xml.Serialization;
13 | using CCFE_Toolbox.Properties;
14 | using System.Windows.Forms;
15 | using SpaceClaim.Api.V18;
16 | using SpaceClaim.Api.V18.Display;
17 | using Point = SpaceClaim.Api.V18.Geometry.Point;
18 | using SpaceClaim.Api.V18.Scripting;
19 | using System.Text.RegularExpressions;
20 |
21 | namespace CCFE_Toolbox.CCFE_Commands
22 | {
23 | //class ScriptClass :
24 |
25 | class CylinderPlaneEdgeChecker : CommandCapsule
26 | {
27 | // This command name must match that in the Ribbon.xml file
28 | //----------------------------------------------------------
29 | public bool first = true;
30 | public string directory = @"C:\ProgramData\SpaceClaim\AddIns\Samples\V18\CCFE_Toolkit\Resources\PythonScripts\Cylinder-plane_locator.scscript";
31 | public const string CommandName = "CCFE_Toolbox.C#.V18.CPEC";
32 |
33 | public CylinderPlaneEdgeChecker() : base(CommandName, Resources.CylPlEdChText, Resources.cpec_image, Resources.CylPlEdChHint)
34 | {
35 |
36 | }
37 |
38 | //protected override void OnUpdate(Command command)
39 | //{
40 | /*
41 | if (first)
42 | {
43 | directory = Directory.GetCurrentDirectory();
44 | first = false;
45 | }
46 | */
47 | //Window window = Window.ActiveWindow;
48 | //command.IsEnabled = window != null && SelectionAllBodies(window);
49 | //}
50 | protected override void OnExecute(Command command, ExecutionContext context, Rectangle buttonRect)
51 | {
52 | if (File.Exists(directory))
53 | {
54 |
55 | // Instance common functions class
56 | InstanceClasses.CommonSpaceClaimFunctions FunctionsClass = new InstanceClasses.CommonSpaceClaimFunctions();
57 |
58 | // Variables
59 | Window window = Window.ActiveWindow;
60 | Document doc = window.Document;
61 | Part rootPart = doc.MainPart;
62 |
63 |
64 | // Run the script
65 | SpaceClaim.Api.V18.Application.RunScript(directory);
66 | }
67 | else
68 | {
69 | MessageBox.Show("ERROR: Script not found.");
70 | }
71 |
72 | }
73 |
74 | public bool SelectionAllBodies(Window window)
75 | {
76 | ICollection docObjects = window.ActiveContext.Selection;
77 | if (docObjects.Count == 0)
78 | {
79 | return true;
80 | }
81 | foreach (IDocObject obj in docObjects)
82 | {
83 | var body = obj as IDesignBody;
84 | if (body == null)
85 | {
86 | return false;
87 | }
88 | }
89 | return true;
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Commands/CylinderPlaneSeperator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Drawing;
8 | using System.Diagnostics;
9 | using SpaceClaim.Api.V18.Extensibility;
10 | using SpaceClaim.Api.V18.Geometry;
11 | using SpaceClaim.Api.V18.Modeler;
12 | using System.Xml.Serialization;
13 | using CCFE_Toolbox.Properties;
14 | using System.Windows.Forms;
15 | using SpaceClaim.Api.V18;
16 | using SpaceClaim.Api.V18.Display;
17 | using Point = SpaceClaim.Api.V18.Geometry.Point;
18 | using SpaceClaim.Api.V18.Scripting;
19 | using System.Text.RegularExpressions;
20 |
21 | namespace CCFE_Toolbox.CCFE_Commands
22 | {
23 | //class ScriptClass :
24 |
25 | class CylinderPlaneSeperator : CommandCapsule
26 | {
27 | // This command name must match that in the Ribbon.xml file
28 | //----------------------------------------------------------
29 | public bool first = true;
30 | public string directory = @"C:\ProgramData\SpaceClaim\AddIns\Samples\V18\CCFE_Toolkit\Resources\PythonScripts\Cylinder-plane_splitter.scscript";
31 | public const string CommandName = "CCFE_Toolbox.C#.V18.CPS";
32 |
33 | public CylinderPlaneSeperator() : base(CommandName, Resources.CylPlSepText, Resources.cps_image, Resources.CylPlSepHint)
34 | {
35 |
36 | }
37 |
38 | //protected override void OnUpdate(Command command)
39 | //{
40 | /*
41 | if (first)
42 | {
43 | directory = Directory.GetCurrentDirectory();
44 | first = false;
45 | }
46 | */
47 | //Window window = Window.ActiveWindow;
48 | //command.IsEnabled = window != null && SelectionAllBodies(window);
49 | //}
50 | protected override void OnExecute(Command command, ExecutionContext context, Rectangle buttonRect)
51 | {
52 | if (File.Exists(directory))
53 | {
54 |
55 | // Instance common functions class
56 | InstanceClasses.CommonSpaceClaimFunctions FunctionsClass = new InstanceClasses.CommonSpaceClaimFunctions();
57 |
58 | // Variables
59 | Window window = Window.ActiveWindow;
60 | Document doc = window.Document;
61 | Part rootPart = doc.MainPart;
62 |
63 |
64 | // Run the cylinder plane seperator script
65 | SpaceClaim.Api.V18.Application.RunScript(directory);
66 | }
67 | else
68 | {
69 | MessageBox.Show("ERROR: Script not found.");
70 | }
71 | }
72 |
73 | public bool SelectionAllBodies(Window window)
74 | {
75 | ICollection docObjects = window.ActiveContext.Selection;
76 | if (docObjects.Count == 0)
77 | {
78 | return true;
79 | }
80 | foreach (IDocObject obj in docObjects)
81 | {
82 | var body = obj as IDesignBody;
83 | if (body == null)
84 | {
85 | return false;
86 | }
87 | }
88 | return true;
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/MeshTallyWriterForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using System.IO;
11 |
12 | namespace CCFE_Toolbox.UI
13 | {
14 | public partial class MeshTallyWriterForm : Form
15 | {
16 |
17 |
18 | public MeshTallyWriterForm()
19 | {
20 | InitializeComponent();
21 | //button1.Click += new EventHandler(this.button1_Click);
22 | numericUpDown1.Value = 1;
23 | textBox1.Text = Environment.CurrentDirectory+@"\meshcard.txt";
24 | //textBox1.Text = Environment.CurrentDirectory;
25 |
26 |
27 | }
28 |
29 | public string FileName
30 | {
31 | get { return textBox1.Text; }
32 | }
33 |
34 | public int MeshQuantity
35 | {
36 | get { return (int)numericUpDown1.Value; }
37 | }
38 |
39 | private void MeshTallyWriterForm_Load(object sender, EventArgs e)
40 | {
41 | /*
42 | DialogResult result = openFileDialog1.ShowDialog();
43 | if (result == DialogResult.OK)
44 | {
45 | string file = openFileDialog1.FileName;
46 | MessageBox.Show(file);
47 | }
48 | */
49 |
50 |
51 | /*
52 | DialogResult result = folderBrowserDialog1.ShowDialog();
53 | if (result == DialogResult.OK)
54 | {
55 | string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);
56 | MessageBox.Show("Files found: " + files.Length.ToString(), "Message");
57 | }
58 | */
59 | }
60 |
61 | private void cancelButton_Click(object sender, EventArgs e)
62 | {
63 |
64 | }
65 |
66 | private void okButton_Click(object sender, EventArgs e)
67 | {
68 |
69 | }
70 |
71 | private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
72 | {
73 |
74 | }
75 |
76 | private void folderBrowserDialog1_HelpRequest(object sender, EventArgs e)
77 | {
78 |
79 | }
80 |
81 | private void textBox1_TextChanged(object sender, EventArgs e)
82 | {
83 |
84 | }
85 |
86 | private void button1_Click(object sender, EventArgs e)
87 | {
88 | DialogResult result = saveFileDialog1.ShowDialog();
89 | if (result == DialogResult.OK)
90 | {
91 | string file = saveFileDialog1.FileName;
92 | //MessageBox.Show(file);
93 | textBox1.Text = file;
94 | }
95 | }
96 |
97 | private void numericUpDown1_ValueChanged(object sender, EventArgs e)
98 | {
99 |
100 | }
101 |
102 | private void label1_Click(object sender, EventArgs e)
103 | {
104 |
105 | }
106 |
107 | private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
108 | {
109 |
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/VolumeAssessorForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using System.IO;
11 |
12 | namespace CCFE_Toolbox.UI
13 | {
14 | public partial class VolumeAssessorForm : Form
15 | {
16 | public VolumeAssessorForm()
17 | {
18 | InitializeComponent();
19 | //button1.Click += new EventHandler(this.button1_Click);
20 | numericUpDown1.Enabled = true;
21 | textBox1.Text = Environment.CurrentDirectory + @"\VolumeAssessment.txt";
22 | }
23 |
24 | public string FileName
25 | {
26 | get { return textBox1.Text; }
27 | }
28 |
29 | public double Depth
30 | {
31 | get { return (double)numericUpDown1.Value; }
32 | }
33 |
34 | private void VolumeAssessorForm_Load(object sender, EventArgs e)
35 | {
36 | /*
37 | DialogResult result = openFileDialog1.ShowDialog();
38 | if (result == DialogResult.OK)
39 | {
40 | string file = openFileDialog1.FileName;
41 | MessageBox.Show(file);
42 | }
43 | */
44 |
45 |
46 | /*
47 | DialogResult result = folderBrowserDialog1.ShowDialog();
48 | if (result == DialogResult.OK)
49 | {
50 | string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);
51 | MessageBox.Show("Files found: " + files.Length.ToString(), "Message");
52 | }
53 | */
54 | }
55 |
56 | private void cancelButton_Click(object sender, EventArgs e)
57 | {
58 |
59 | }
60 |
61 | private void okButton_Click(object sender, EventArgs e)
62 | {
63 |
64 | }
65 |
66 | private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
67 | {
68 |
69 | }
70 |
71 | private void folderBrowserDialog1_HelpRequest(object sender, EventArgs e)
72 | {
73 |
74 | }
75 |
76 | private void textBox1_TextChanged(object sender, EventArgs e)
77 | {
78 |
79 | }
80 |
81 | private void button1_Click(object sender, EventArgs e)
82 | {
83 | DialogResult result = saveFileDialog1.ShowDialog();
84 | if (result == DialogResult.OK)
85 | {
86 | string file = saveFileDialog1.FileName;
87 | //MessageBox.Show(file);
88 | textBox1.Text = file;
89 | }
90 | }
91 |
92 | private void checkBox1_CheckedChanged(object sender, EventArgs e)
93 | {
94 |
95 | }
96 |
97 | private void numericUpDown1_ValueChanged(object sender, EventArgs e)
98 | {
99 |
100 | }
101 |
102 | private void label1_Click(object sender, EventArgs e)
103 | {
104 |
105 | }
106 |
107 | private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
108 | {
109 |
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | 0
12 |
13 |
14 | False
15 |
16 |
17 | 0
18 |
19 |
20 | 0
21 |
22 |
23 | 0
24 |
25 |
26 | False
27 |
28 |
29 | False
30 |
31 |
32 | 0
33 |
34 |
35 | 0
36 |
37 |
38 | False
39 |
40 |
41 | 0
42 |
43 |
44 | 0
45 |
46 |
47 | 0
48 |
49 |
50 | 0
51 |
52 |
53 | 0
54 |
55 |
56 | 1
57 |
58 |
59 | False
60 |
61 |
62 | False
63 |
64 |
65 | False
66 |
67 |
68 | False
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/MeshTallyWriterForm2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using System.IO;
11 |
12 | namespace CCFE_Toolbox.UI
13 | {
14 | public partial class MeshTallyWriterForm2 : Form
15 | {
16 |
17 |
18 | public MeshTallyWriterForm2()
19 | {
20 | InitializeComponent();
21 | //button1.Click += new EventHandler(this.button1_Click);
22 | string[] particles = new string[] { "p", "n" };
23 | comboBox1.Items.AddRange(particles);
24 | comboBox1.Text = "n";
25 | numericUpDownt.Value = 14;
26 | numericUpDownx.Value = 1;
27 | numericUpDowny.Value = 1;
28 | numericUpDownz.Value = 1;
29 | }
30 |
31 | public string ParticleSelection
32 | {
33 | get { return comboBox1.Text; }
34 | }
35 |
36 | public int TallyNumber
37 | {
38 | get { return (int)numericUpDownt.Value; }
39 | }
40 |
41 | public double XResolution
42 | {
43 | get { return (double)numericUpDownx.Value; }
44 | }
45 |
46 | public double YResolution
47 | {
48 | get { return (double)numericUpDowny.Value; }
49 | }
50 |
51 | public double ZResolution
52 | {
53 | get { return (double)numericUpDownz.Value; }
54 | }
55 |
56 | private void MeshTallyWriterForm2_Load(object sender, EventArgs e)
57 | {
58 | /*
59 | DialogResult result = openFileDialog1.ShowDialog();
60 | if (result == DialogResult.OK)
61 | {
62 | string file = openFileDialog1.FileName;
63 | MessageBox.Show(file);
64 | }
65 | */
66 |
67 |
68 | /*
69 | DialogResult result = folderBrowserDialog1.ShowDialog();
70 | if (result == DialogResult.OK)
71 | {
72 | string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);
73 | MessageBox.Show("Files found: " + files.Length.ToString(), "Message");
74 | }
75 | */
76 | }
77 |
78 | private void cancelButton_Click(object sender, EventArgs e)
79 | {
80 |
81 | }
82 |
83 | private void okButton_Click(object sender, EventArgs e)
84 | {
85 |
86 | }
87 |
88 | private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
89 | {
90 |
91 | }
92 |
93 | private void folderBrowserDialog1_HelpRequest(object sender, EventArgs e)
94 | {
95 |
96 | }
97 |
98 | private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
99 | {
100 |
101 | }
102 |
103 | private void numericUpDownt_ValueChanged(object sender, EventArgs e)
104 | {
105 |
106 | }
107 |
108 | private void numericUpDownx_ValueChanged(object sender, EventArgs e)
109 | {
110 |
111 | }
112 |
113 | private void numericUpDowny_ValueChanged(object sender, EventArgs e)
114 | {
115 |
116 | }
117 |
118 | private void numericUpDownz_ValueChanged(object sender, EventArgs e)
119 | {
120 |
121 | }
122 |
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/BodySelectForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace CCFE_Toolbox.UI
12 | {
13 | public partial class BodySelectForm : Form
14 | {
15 | public BodySelectForm()
16 | {
17 | InitializeComponent();
18 |
19 | numericUpDown2.Enabled = false;
20 | numericUpDown1.Enabled = false;
21 | numericUpDown3.Enabled = false;
22 | }
23 |
24 | public bool LocateCone
25 | {
26 | get { return checkBox5.Checked; }
27 | }
28 |
29 | public bool LocateTori
30 | {
31 | get { return checkBox3.Checked; }
32 | }
33 |
34 | public bool LocateHoles
35 | {
36 | get { return checkBox1.Checked; }
37 | }
38 |
39 | public bool LocateVolume
40 | {
41 | get { return checkBox2.Checked; }
42 | }
43 |
44 | public bool LocateFace
45 | {
46 | get { return checkBox4.Checked; }
47 | }
48 |
49 | public double minRadius
50 | {
51 | get { return (double)numericUpDown2.Value; }
52 | }
53 |
54 | public double minVolume
55 | {
56 | get { return (double)numericUpDown1.Value; }
57 | }
58 |
59 | public double minFace
60 | {
61 | get { return (double)numericUpDown3.Value; }
62 | }
63 |
64 | private void groupBox1_Enter(object sender, EventArgs e)
65 | {
66 |
67 | }
68 |
69 | private void radioButton3_CheckedChanged(object sender, EventArgs e)
70 | {
71 |
72 | }
73 |
74 | private void radioButton1_CheckedChanged(object sender, EventArgs e)
75 | {
76 |
77 | }
78 |
79 | private void radioButton2_CheckedChanged(object sender, EventArgs e)
80 | {
81 |
82 | }
83 |
84 | private void numericUpDown1_ValueChanged(object sender, EventArgs e)
85 | {
86 |
87 | }
88 |
89 | private void checkBox1_CheckedChanged(object sender, EventArgs e)
90 | {
91 | numericUpDown2.Enabled = (checkBox1.CheckState == CheckState.Checked);
92 | }
93 |
94 | private void checkBox2_CheckedChanged(object sender, EventArgs e)
95 | {
96 |
97 | numericUpDown1.Enabled = (checkBox2.CheckState == CheckState.Checked);
98 | }
99 |
100 | private void checkBox3_CheckedChanged(object sender, EventArgs e)
101 | {
102 |
103 | }
104 |
105 | private void numericUpDown2_ValueChanged(object sender, EventArgs e)
106 | {
107 |
108 | }
109 |
110 | private void okButton_Click(object sender, EventArgs e)
111 | {
112 |
113 | }
114 |
115 | private void cancelButton_Click(object sender, EventArgs e)
116 | {
117 |
118 | }
119 |
120 | private void checkBox4_CheckedChanged(object sender, EventArgs e)
121 | {
122 | numericUpDown3.Enabled = (checkBox4.CheckState == CheckState.Checked);
123 | }
124 |
125 | private void numericUpDown3_ValueChanged(object sender, EventArgs e)
126 | {
127 |
128 | }
129 |
130 | private void checkBox5_CheckedChanged(object sender, EventArgs e)
131 | {
132 |
133 | }
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/LostParticlesForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using System.IO;
11 |
12 | namespace CCFE_Toolbox.UI
13 | {
14 | public partial class LostParticlesForm : Form
15 | {
16 |
17 |
18 | public LostParticlesForm()
19 | {
20 | InitializeComponent();
21 | //button1.Click += new EventHandler(this.button1_Click);
22 | numericUpDown1.Enabled = false;
23 | string[] colours = new string[] { "Blue", "Red", "Green", "Orange", "Black", "Yellow", "Salmon Pink" };
24 | comboBox1.Items.AddRange(colours);
25 | comboBox1.Text = "Green";
26 | }
27 |
28 | public string FileName
29 | {
30 | get { return textBox1.Text; }
31 | }
32 |
33 | public bool ShowVectors
34 | {
35 | get { return checkBox1.Checked; }
36 | }
37 |
38 | public double MaxParticle
39 | {
40 | get { return (double)numericUpDown1.Value; }
41 | }
42 |
43 | public bool MaxParticleBool
44 | {
45 | get { return checkBox2.Checked; }
46 | }
47 |
48 | public string ColourSelection
49 | {
50 | get { return comboBox1.Text; }
51 | }
52 |
53 | private void LostParticlesForm_Load(object sender, EventArgs e)
54 | {
55 | /*
56 | DialogResult result = openFileDialog1.ShowDialog();
57 | if (result == DialogResult.OK)
58 | {
59 | string file = openFileDialog1.FileName;
60 | MessageBox.Show(file);
61 | }
62 | */
63 |
64 |
65 | /*
66 | DialogResult result = folderBrowserDialog1.ShowDialog();
67 | if (result == DialogResult.OK)
68 | {
69 | string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);
70 | MessageBox.Show("Files found: " + files.Length.ToString(), "Message");
71 | }
72 | */
73 | }
74 |
75 | private void cancelButton_Click(object sender, EventArgs e)
76 | {
77 |
78 | }
79 |
80 | private void okButton_Click(object sender, EventArgs e)
81 | {
82 |
83 | }
84 |
85 | private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
86 | {
87 |
88 | }
89 |
90 | private void folderBrowserDialog1_HelpRequest(object sender, EventArgs e)
91 | {
92 |
93 | }
94 |
95 | private void textBox1_TextChanged(object sender, EventArgs e)
96 | {
97 |
98 | }
99 |
100 | private void button1_Click(object sender, EventArgs e)
101 | {
102 | DialogResult result = openFileDialog1.ShowDialog();
103 | if (result == DialogResult.OK)
104 | {
105 | string file = openFileDialog1.FileName;
106 | //MessageBox.Show(file);
107 | textBox1.Text = file;
108 | }
109 | }
110 |
111 | private void checkBox1_CheckedChanged(object sender, EventArgs e)
112 | {
113 |
114 | }
115 |
116 | private void checkBox2_CheckedChanged(object sender, EventArgs e)
117 | {
118 | numericUpDown1.Enabled = (checkBox2.CheckState == CheckState.Checked);
119 | }
120 |
121 | private void numericUpDown1_ValueChanged(object sender, EventArgs e)
122 | {
123 |
124 | }
125 |
126 | private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
127 | {
128 |
129 | }
130 |
131 | private void label1_Click(object sender, EventArgs e)
132 | {
133 |
134 | }
135 |
136 | private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
137 | {
138 |
139 | }
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Commands/MeshTallyChecker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Drawing;
8 | using System.Diagnostics;
9 | using SpaceClaim.Api.V18.Extensibility;
10 | using SpaceClaim.Api.V18.Geometry;
11 | using SpaceClaim.Api.V18.Modeler;
12 | using System.Xml.Serialization;
13 | using CCFE_Toolbox.Properties;
14 | using System.Windows.Forms;
15 | using SpaceClaim.Api.V18;
16 | using SpaceClaim.Api.V18.Display;
17 | using Point = SpaceClaim.Api.V18.Geometry.Point;
18 | using SpaceClaim.Api.V18.Scripting;
19 | using System.Text.RegularExpressions;
20 |
21 | namespace CCFE_Toolbox.CCFE_Commands
22 | {
23 | //class ScriptClass :
24 |
25 | class MeshTallyChecker : CommandCapsule
26 | {
27 | // This command name must match that in the Ribbon.xml file
28 | //----------------------------------------------------------
29 | public bool first = true;
30 | public string directory = @"C:\ProgramData\SpaceClaim\AddIns\Samples\V18\CCFE_Toolkit\Resources\PythonScripts\Mesh_tally_checker.scscript";
31 | public const string CommandName = "CCFE_Toolbox.C#.V18.MTC";
32 |
33 | public MeshTallyChecker() : base(CommandName, Resources.MTCText, Resources.mtc_image, Resources.MTCHint)
34 | {
35 |
36 | }
37 |
38 | //protected override void OnUpdate(Command command)
39 | //{
40 | /*
41 | if (first)
42 | {
43 | directory = Directory.GetCurrentDirectory();
44 | first = false;
45 | }
46 | */
47 | //Window window = Window.ActiveWindow;
48 | //command.IsEnabled = window != null && SelectionAllBodies(window);
49 | //}
50 | protected override void OnExecute(Command command, ExecutionContext context, Rectangle buttonRect)
51 | {
52 | if (File.Exists(directory))
53 | {
54 |
55 | // Instance common functions class
56 | InstanceClasses.CommonSpaceClaimFunctions FunctionsClass = new InstanceClasses.CommonSpaceClaimFunctions();
57 |
58 | // Variables
59 | Window window = Window.ActiveWindow;
60 | Document doc = window.Document;
61 | Part rootPart = doc.MainPart;
62 |
63 | // Dialogue variables
64 | bool planes;
65 | bool cut;
66 |
67 | // Get whether to include planes and cuts via user input
68 | using (var dialogue = new UI.MeshTallyCheckerForm())
69 | {
70 | if (dialogue.ShowDialog() != DialogResult.OK)
71 | return;
72 |
73 | var nameAndRendering = new List>();
74 | var partToGraphic = new Dictionary();
75 |
76 | var style = new GraphicStyle
77 | {
78 | EnableDepthBuffer = true
79 | };
80 |
81 | planes = dialogue.Plane;
82 | cut = dialogue.Cut;
83 | }
84 |
85 | if (window == null)
86 | return;
87 |
88 | // To pass args to python script
89 | var scriptParams = new Dictionary();
90 | scriptParams.Add("planes", planes);
91 | scriptParams.Add("cut", cut);
92 |
93 | // Run the script
94 | SpaceClaim.Api.V18.Application.RunScript(directory, scriptParams);
95 | }
96 | else
97 | {
98 | MessageBox.Show("ERROR: Script not found.");
99 | }
100 | }
101 |
102 | public bool SelectionAllBodies(Window window)
103 | {
104 | ICollection docObjects = window.ActiveContext.Selection;
105 | if (docObjects.Count == 0)
106 | {
107 | return true;
108 | }
109 | foreach (IDocObject obj in docObjects)
110 | {
111 | var body = obj as IDesignBody;
112 | if (body == null)
113 | {
114 | return false;
115 | }
116 | }
117 | return true;
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Commands/VoidGenerator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Drawing;
8 | using System.Diagnostics;
9 | using SpaceClaim.Api.V18.Extensibility;
10 | using SpaceClaim.Api.V18.Geometry;
11 | using SpaceClaim.Api.V18.Modeler;
12 | using System.Xml.Serialization;
13 | using CCFE_Toolbox.Properties;
14 | using System.Windows.Forms;
15 | using SpaceClaim.Api.V18;
16 | using SpaceClaim.Api.V18.Display;
17 | using Point = SpaceClaim.Api.V18.Geometry.Point;
18 | using SpaceClaim.Api.V18.Scripting;
19 | using System.Text.RegularExpressions;
20 |
21 | namespace CCFE_Toolbox.CCFE_Commands
22 | {
23 | //class ScriptClass :
24 |
25 | class VoidGenerator : CommandCapsule
26 | {
27 | // This command name must match that in the Ribbon.xml file
28 | //----------------------------------------------------------
29 | public bool first = true;
30 | public string directory = @"C:\ProgramData\SpaceClaim\AddIns\Samples\V18\CCFE_Toolkit\Resources\PythonScripts\Void_generator.scscript";
31 | public const string CommandName = "CCFE_Toolbox.C#.V18.VG";
32 |
33 | public VoidGenerator() : base(CommandName, Resources.VoiGenText, Resources.vg_image, Resources.VoiGenHint)
34 | {
35 |
36 | }
37 |
38 | //protected override void OnUpdate(Command command)
39 | //{
40 | /*
41 | if (first)
42 | {
43 | directory = Directory.GetCurrentDirectory();
44 | first = false;
45 | }
46 | */
47 | //Window window = Window.ActiveWindow;
48 | //command.IsEnabled = window != null && SelectionAllBodies(window);
49 | //}
50 | protected override void OnExecute(Command command, ExecutionContext context, Rectangle buttonRect)
51 | {
52 | if (File.Exists(directory))
53 | {
54 | // Instance common functions class
55 | InstanceClasses.CommonSpaceClaimFunctions FunctionsClass = new InstanceClasses.CommonSpaceClaimFunctions();
56 |
57 | // Variables
58 | Window window = Window.ActiveWindow;
59 | Document doc = window.Document;
60 | Part rootPart = doc.MainPart;
61 |
62 | // Dialogue variables
63 | int iterations;
64 | int maxfaces;
65 |
66 | // Get iterations & max faces via user input
67 | using (var dialogue = new UI.VoidGeneratorForm())
68 | {
69 | if (dialogue.ShowDialog() != DialogResult.OK)
70 | return;
71 |
72 | var nameAndRendering = new List>();
73 | var partToGraphic = new Dictionary();
74 |
75 | var style = new GraphicStyle
76 | {
77 | EnableDepthBuffer = true
78 | };
79 |
80 | iterations = dialogue.Iterations;
81 | maxfaces = dialogue.MaxFaces;
82 |
83 | }
84 | if (window == null)
85 | return;
86 |
87 | // To pass args to python script
88 | var scriptParams = new Dictionary();
89 | scriptParams.Add("iter", iterations);
90 | scriptParams.Add("mf", maxfaces);
91 |
92 | // Run the script
93 | SpaceClaim.Api.V18.Application.RunScript(directory, scriptParams);
94 | MessageBox.Show("Script called successfully");
95 | }
96 | else
97 | {
98 | MessageBox.Show("ERROR: Script not found.");
99 | }
100 | }
101 |
102 | public bool SelectionAllBodies(Window window)
103 | {
104 | ICollection docObjects = window.ActiveContext.Selection;
105 | if (docObjects.Count == 0)
106 | {
107 | return true;
108 | }
109 | foreach (IDocObject obj in docObjects)
110 | {
111 | var body = obj as IDesignBody;
112 | if (body == null)
113 | {
114 | return false;
115 | }
116 | }
117 | return true;
118 | }
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Commands/VolumeAssessor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Drawing;
8 | using System.Diagnostics;
9 | using SpaceClaim.Api.V18.Extensibility;
10 | using SpaceClaim.Api.V18.Geometry;
11 | using SpaceClaim.Api.V18.Modeler;
12 | using System.Xml.Serialization;
13 | using CCFE_Toolbox.Properties;
14 | using System.Windows.Forms;
15 | using SpaceClaim.Api.V18;
16 | using SpaceClaim.Api.V18.Display;
17 | using Point = SpaceClaim.Api.V18.Geometry.Point;
18 | using SpaceClaim.Api.V18.Scripting;
19 | using System.Text.RegularExpressions;
20 |
21 | namespace CCFE_Toolbox.CCFE_Commands
22 | {
23 | //class ScriptClass :
24 |
25 | class VolumeAssessor : CommandCapsule
26 | {
27 | // This command name must match that in the Ribbon.xml file
28 | //----------------------------------------------------------
29 | public bool first = true;
30 | public string directory = @"C:\ProgramData\SpaceClaim\AddIns\Samples\V18\CCFE_Toolkit\Resources\PythonScripts\Volume_assessor.scscript";
31 | public const string CommandName = "CCFE_Toolbox.C#.V18.VA";
32 |
33 | public VolumeAssessor() : base(CommandName, Resources.VAText, Resources.va_image, Resources.VAHint)
34 | {
35 |
36 | }
37 |
38 | //protected override void OnUpdate(Command command)
39 | //{
40 | /*
41 | if (first)
42 | {
43 | directory = Directory.GetCurrentDirectory();
44 | first = false;
45 | }
46 | */
47 | //Window window = Window.ActiveWindow;
48 | //command.IsEnabled = window != null && SelectionAllBodies(window);
49 | //}
50 | protected override void OnExecute(Command command, ExecutionContext context, Rectangle buttonRect)
51 | {
52 | if (File.Exists(directory))
53 | {
54 | // Instance common functions class
55 | InstanceClasses.CommonSpaceClaimFunctions FunctionsClass = new InstanceClasses.CommonSpaceClaimFunctions();
56 |
57 | // Variables
58 | Window window = Window.ActiveWindow;
59 | Document doc = window.Document;
60 | Part rootPart = doc.MainPart;
61 |
62 | // Dialogue variables
63 | string filePath;
64 | double depth;
65 |
66 | // Get save location & tree depth via user input
67 | using (var dialogue = new UI.VolumeAssessorForm())
68 | {
69 |
70 | if (dialogue.ShowDialog() != DialogResult.OK)
71 | return;
72 |
73 | var nameAndRendering = new List>();
74 | var partToGraphic = new Dictionary();
75 |
76 | var style = new GraphicStyle
77 | {
78 | EnableDepthBuffer = true
79 | };
80 |
81 | filePath = dialogue.FileName;
82 | depth = dialogue.Depth;
83 |
84 | }
85 |
86 | if (window == null)
87 | return;
88 |
89 | // To pass args to python script
90 | var scriptParams = new Dictionary();
91 | scriptParams.Add("d", depth);
92 | scriptParams.Add("filepath", filePath);
93 |
94 | // Run the script w/ args
95 | SpaceClaim.Api.V18.Application.RunScript(directory, scriptParams);
96 |
97 | // show txt output
98 | Process.Start(filePath);
99 | }
100 | else
101 | {
102 | MessageBox.Show("ERROR: Script not found.");
103 | }
104 | }
105 |
106 | public bool SelectionAllBodies(Window window)
107 | {
108 | ICollection docObjects = window.ActiveContext.Selection;
109 | if (docObjects.Count == 0)
110 | {
111 | return true;
112 | }
113 | foreach (IDocObject obj in docObjects)
114 | {
115 | var body = obj as IDesignBody;
116 | if (body == null)
117 | {
118 | return false;
119 | }
120 | }
121 | return true;
122 | }
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/MeshTallyCheckerForm.designer.cs:
--------------------------------------------------------------------------------
1 | namespace CCFE_Toolbox.UI
2 | {
3 | partial class MeshTallyCheckerForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.okButton = new System.Windows.Forms.Button();
32 | this.cancelButton = new System.Windows.Forms.Button();
33 | this.checkBox1 = new System.Windows.Forms.CheckBox();
34 | this.checkBox2 = new System.Windows.Forms.CheckBox();
35 | this.SuspendLayout();
36 | //
37 | // okButton
38 | //
39 | this.okButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
40 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
41 | this.okButton.Location = new System.Drawing.Point(135, 215);
42 | this.okButton.Name = "okButton";
43 | this.okButton.Size = new System.Drawing.Size(75, 23);
44 | this.okButton.TabIndex = 8;
45 | this.okButton.Text = "OK";
46 | this.okButton.UseVisualStyleBackColor = true;
47 | //
48 | // cancelButton
49 | //
50 | this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
51 | this.cancelButton.Location = new System.Drawing.Point(223, 215);
52 | this.cancelButton.Name = "cancelButton";
53 | this.cancelButton.Size = new System.Drawing.Size(75, 23);
54 | this.cancelButton.TabIndex = 9;
55 | this.cancelButton.Text = "Cancel";
56 | this.cancelButton.UseVisualStyleBackColor = true;
57 | //
58 | // checkBox1
59 | //
60 | this.checkBox1.AutoSize = true;
61 | this.checkBox1.Location = new System.Drawing.Point(66, 134);
62 | this.checkBox1.Name = "checkBox1";
63 | this.checkBox1.Size = new System.Drawing.Size(142, 17);
64 | this.checkBox1.TabIndex = 12;
65 | this.checkBox1.Text = "Split mesh into resolution";
66 | this.checkBox1.UseVisualStyleBackColor = true;
67 | this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
68 | //
69 | // checkBox2
70 | //
71 | this.checkBox2.AutoSize = true;
72 | this.checkBox2.Location = new System.Drawing.Point(66, 74);
73 | this.checkBox2.Name = "checkBox2";
74 | this.checkBox2.Size = new System.Drawing.Size(186, 17);
75 | this.checkBox2.TabIndex = 15;
76 | this.checkBox2.Text = "Add planes to represent resolution";
77 | this.checkBox2.UseVisualStyleBackColor = true;
78 | this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
79 | //
80 | // MeshTallyCheckerForm
81 | //
82 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
83 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
84 | this.ClientSize = new System.Drawing.Size(311, 250);
85 | this.Controls.Add(this.checkBox2);
86 | this.Controls.Add(this.checkBox1);
87 | this.Controls.Add(this.cancelButton);
88 | this.Controls.Add(this.okButton);
89 | this.Name = "MeshTallyCheckerForm";
90 | this.ShowIcon = false;
91 | this.Text = "Mesh Tally Checker";
92 | this.Load += new System.EventHandler(this.MeshTallyCheckerForm_Load);
93 | this.ResumeLayout(false);
94 | this.PerformLayout();
95 |
96 | }
97 |
98 | #endregion
99 |
100 | private System.Windows.Forms.Button okButton;
101 | private System.Windows.Forms.Button cancelButton;
102 | private System.Windows.Forms.CheckBox checkBox1;
103 | private System.Windows.Forms.CheckBox checkBox2;
104 | }
105 | }
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/GeometryAssessorForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using System.IO;
11 |
12 | namespace CCFE_Toolbox.UI
13 | {
14 | public partial class GeometryAssessorForm : Form
15 | {
16 | public GeometryAssessorForm()
17 | {
18 | InitializeComponent();
19 | //button1.Click += new EventHandler(this.button1_Click);
20 | textBox1.Text = Environment.CurrentDirectory + @"\GeometryAssessment.txt";
21 | }
22 |
23 | public string FileName
24 | {
25 | get { return textBox1.Text; }
26 | }
27 |
28 | public Color color1
29 | {
30 | get { return colorDialog1.Color; }
31 | }
32 |
33 | public Color color2
34 | {
35 | get { return colorDialog2.Color; }
36 | }
37 |
38 | public Color color3
39 | {
40 | get { return colorDialog3.Color; }
41 | }
42 |
43 | public Color color4
44 | {
45 | get { return colorDialog4.Color; }
46 | }
47 |
48 | public Color color5
49 | {
50 | get { return colorDialog5.Color; }
51 | }
52 |
53 | private void GeometryAssessorForm_Load(object sender, EventArgs e)
54 | {
55 | /*
56 | DialogResult result = openFileDialog1.ShowDialog();
57 | if (result == DialogResult.OK)
58 | {
59 | string file = openFileDialog1.FileName;
60 | MessageBox.Show(file);
61 | }
62 | */
63 |
64 |
65 | /*
66 | DialogResult result = folderBrowserDialog1.ShowDialog();
67 | if (result == DialogResult.OK)
68 | {
69 | string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);
70 | MessageBox.Show("Files found: " + files.Length.ToString(), "Message");
71 | }
72 | */
73 | }
74 |
75 | private void cancelButton_Click(object sender, EventArgs e)
76 | {
77 |
78 | }
79 |
80 | private void okButton_Click(object sender, EventArgs e)
81 | {
82 |
83 | }
84 |
85 | private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
86 | {
87 |
88 | }
89 |
90 | private void folderBrowserDialog1_HelpRequest(object sender, EventArgs e)
91 | {
92 |
93 | }
94 |
95 | private void textBox1_TextChanged(object sender, EventArgs e)
96 | {
97 |
98 | }
99 |
100 | private void button1_Click(object sender, EventArgs e)
101 | {
102 | DialogResult result = saveFileDialog1.ShowDialog();
103 | if (result == DialogResult.OK)
104 | {
105 | string file = saveFileDialog1.FileName;
106 | //MessageBox.Show(file);
107 | textBox1.Text = file;
108 | }
109 | }
110 |
111 | private void button2_Click(object sender, EventArgs e)
112 | {
113 | DialogResult result = colorDialog1.ShowDialog();
114 |
115 | // Update the color
116 | if (result == DialogResult.OK)
117 | {
118 | button2.BackColor = colorDialog1.Color;
119 | }
120 | }
121 |
122 | private void button3_Click(object sender, EventArgs e)
123 | {
124 | DialogResult result = colorDialog2.ShowDialog();
125 |
126 | // Update the color
127 | if (result == DialogResult.OK)
128 | {
129 | button3.BackColor = colorDialog2.Color;
130 | }
131 | }
132 |
133 | private void button4_Click(object sender, EventArgs e)
134 | {
135 | DialogResult result = colorDialog3.ShowDialog();
136 |
137 | // Update the color
138 | if (result == DialogResult.OK)
139 | {
140 | button4.BackColor = colorDialog3.Color;
141 | }
142 | }
143 |
144 | private void button5_Click(object sender, EventArgs e)
145 | {
146 | DialogResult result = colorDialog4.ShowDialog();
147 |
148 | // Update the color
149 | if (result == DialogResult.OK)
150 | {
151 | button5.BackColor = colorDialog4.Color;
152 | }
153 | }
154 |
155 | private void button6_Click(object sender, EventArgs e)
156 | {
157 | DialogResult result = colorDialog5.ShowDialog();
158 |
159 | // Update the color
160 | if (result == DialogResult.OK)
161 | {
162 | button6.BackColor = colorDialog5.Color;
163 | }
164 | }
165 |
166 | private void label1_Click(object sender, EventArgs e)
167 | {
168 |
169 | }
170 |
171 | private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
172 | {
173 |
174 | }
175 | }
176 | }
177 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/InstanceClasses/CommonSpaceClaimFunctions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Drawing;
8 | using System.Diagnostics;
9 | using SpaceClaim.Api.V18.Extensibility;
10 | using SpaceClaim.Api.V18.Geometry;
11 | using SpaceClaim.Api.V18.Modeler;
12 | using System.Xml.Serialization;
13 | using CCFE_Toolbox.Properties;
14 | using System.Windows.Forms;
15 | using SpaceClaim.Api.V18;
16 | using Point = SpaceClaim.Api.V18.Geometry.Point;
17 |
18 | namespace CCFE_Toolbox.InstanceClasses
19 | {
20 | class CommonSpaceClaimFunctions
21 | {
22 | public List GatherAllBodies(IPart part)
23 | {
24 | var allBodies = new List();
25 | allBodies.AddRange(part.GetDescendants());
26 | return allBodies;
27 | }
28 |
29 | public List GatherAllVisibleBodies(IPart part, Window window)
30 | {
31 | List allBodies = new List();
32 | var tempList = new List();
33 | tempList.AddRange(part.GetDescendants());
34 | foreach (IDesignBody body in tempList)
35 | {
36 | if (CheckIfVisible(body, window))
37 | {
38 | allBodies.Add(body);
39 | }
40 | }
41 | return allBodies;
42 | }
43 |
44 | public List GatherSelectionBodies(InteractionContext context )
45 | {
46 | var iBodies = new List();
47 | var selection = context.Selection;
48 | foreach (IDesignBody body in selection)
49 | {
50 | iBodies.Add(body);
51 | }
52 | return iBodies;
53 | }
54 |
55 | public List CopyIDesign(List iDesBods)
56 | {
57 | var bodies = new List();
58 | foreach (IDesignBody bod in iDesBods)
59 | {
60 | DesignBody master = bod.Master;
61 | Matrix masterTrans = bod.TransformToMaster;
62 | Matrix reverseTrans = masterTrans.Inverse;
63 | Body copy = master.Shape.Copy();
64 | copy.Transform(reverseTrans);
65 | bodies.Add(copy);
66 | }
67 |
68 | return bodies;
69 | }
70 |
71 | public List CopyIDesignAndTransforms(List iDesBods, out List transforms)
72 | {
73 | transforms = new List();
74 | var bodies = new List();
75 | foreach (IDesignBody bod in iDesBods)
76 | {
77 | DesignBody master = bod.Master;
78 | Matrix masterTrans = bod.TransformToMaster;
79 | transforms.Add(masterTrans);
80 | Matrix reverseTrans = masterTrans.Inverse;
81 | Body copy = master.Shape.Copy();
82 | copy.Transform(reverseTrans);
83 | bodies.Add(copy);
84 | }
85 |
86 | return bodies;
87 | }
88 |
89 | public Body CreateRectBody(Part part, double length, double width, double height, PointUV UVPoint, Plane plane)
90 | {
91 | Debug.Assert(part != null, "part != null");
92 | Body body = Body.ExtrudeProfile(new RectangleProfile(plane, length, width, UVPoint), height);
93 | return body;
94 | }
95 |
96 | public DesignBody CreateDesignBody(Part part, Body body)
97 | {
98 | DesignBody desBodyMaster = DesignBody.Create(part, Resources.Block, body);
99 |
100 | return desBodyMaster;
101 | }
102 |
103 | public void FileWriter(string path, string words)
104 | {
105 | using (StreamWriter sw = File.AppendText(path))
106 | {
107 | sw.WriteLine(words);
108 | }
109 | }
110 |
111 | public void ColourFace(Face face, DesignBody desBody)
112 | {
113 | var desFace = desBody.GetDesignFace(face);
114 | desFace.SetColor(null, Color.Magenta);
115 | }
116 |
117 | public void SetFaceTranslucent (Face face, DesignBody desBody)
118 | {
119 | // Get face current colour
120 | var bodyColour = desBody.GetColor(null);
121 | var otherColour = Color.FromArgb(173, bodyColour.Value.R, bodyColour.Value.G, bodyColour.Value.B);
122 | var desFace = desBody.GetDesignFace(face);
123 | desFace.SetColor(null, otherColour);
124 | }
125 |
126 | public bool CheckIfVisible (IHasVisibility obj, Window window)
127 | {
128 | var context = window.Scene as IAppearanceContext;
129 | return obj.IsVisible(context);
130 | }
131 |
132 | public List> ReturnMonikers (List iBodies)
133 | {
134 | List> monikers = new List>();
135 | foreach(IDesignBody iBody in iBodies)
136 | {
137 | monikers.Add(iBody.Moniker);
138 | }
139 | return monikers;
140 | }
141 |
142 |
143 | }
144 | }
145 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Commands/MaxSurfaces.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Drawing;
8 | using System.Diagnostics;
9 | using SpaceClaim.Api.V18.Extensibility;
10 | using SpaceClaim.Api.V18.Geometry;
11 | using SpaceClaim.Api.V18.Modeler;
12 | using System.Xml.Serialization;
13 | using CCFE_Toolbox.Properties;
14 | using System.Windows.Forms;
15 | using SpaceClaim.Api.V18;
16 | using SpaceClaim.Api.V18.Display;
17 | using Point = SpaceClaim.Api.V18.Geometry.Point;
18 | using SpaceClaim.Api.V18.Scripting;
19 | using System.Text.RegularExpressions;
20 |
21 | namespace CCFE_Toolbox.CCFE_Commands
22 | {
23 | class MaxSurfaces : CommandCapsule
24 | {
25 | // This command name must match that in the Ribbon.xml file
26 | //----------------------------------------------------------
27 |
28 | public const string CommandName = "CCFE_Toolbox.C#.V18.MaxSurfaces";
29 |
30 | public MaxSurfaces() : base(CommandName, Resources.MaxSurfaceText, Resources.SceneGraph, Resources.MaxSurfaceHint)
31 | {
32 |
33 | }
34 |
35 | protected override void OnUpdate(Command command)
36 | {
37 | command.IsEnabled = Window.ActiveWindow != null;
38 | }
39 | protected override void OnExecute(Command command, ExecutionContext context, Rectangle buttonRect)
40 | {
41 | /*
42 | * Max Surface Tool
43 | * A. Burns 06/11/2017
44 | * Read user inuput max surfaces per body
45 | * Hightlight body with greater number of faces
46 | * Optionally can chnage the bodies colour
47 | * as well as highlighting
48 | */
49 |
50 |
51 |
52 | // Instance common functions class
53 | InstanceClasses.CommonSpaceClaimFunctions FunctionsClass = new InstanceClasses.CommonSpaceClaimFunctions();
54 |
55 | // Essential Variables
56 | Window window = Window.ActiveWindow;
57 | Document doc = window.Document;
58 | Part rootPart = doc.MainPart;
59 | InteractionContext interContext = window.ActiveContext;
60 |
61 | // Other Variables
62 | List allBodies = new List();
63 | List ifinalFacesList = new List();
64 | window.SetTool(new ToolClass());
65 |
66 | int faceCount;
67 | int maxFaces;
68 | bool changeColours;
69 | string colourString;
70 |
71 | using (var dialogue = new UI.MaxSurfacesForm())
72 | {
73 | if (dialogue.ShowDialog() != DialogResult.OK)
74 | return;
75 |
76 | var nameAndRendering = new List>();
77 | var partToGraphic = new Dictionary();
78 |
79 | var style = new GraphicStyle
80 | {
81 | EnableDepthBuffer = true
82 | };
83 |
84 | maxFaces = (int)dialogue.MaxSurfaces;
85 | changeColours = dialogue.ChangeColour;
86 | colourString = dialogue.ColourSelection;
87 | }
88 |
89 | if (window == null)
90 | return;
91 |
92 | allBodies.AddRange(FunctionsClass.GatherAllVisibleBodies(rootPart, window));
93 |
94 |
95 | foreach (IDesignBody iDesBody in allBodies)
96 | {
97 | DesignBody desBody = iDesBody.Master;
98 | Body body = desBody.Shape.Copy();
99 |
100 | var faces = body.Faces;
101 | var iFaces = iDesBody.Faces;
102 | // ifinalFacesList.AddRange(iDesBody.Faces);
103 | faceCount = faces.Count;
104 |
105 | if (faceCount > maxFaces)
106 | {
107 | window.ActiveTool.CreateIndicator(iFaces);
108 | if (changeColours)
109 | {
110 | if (colourString == "Blue")
111 | {
112 | desBody.SetColor(null, Color.Blue);
113 | }
114 | else if (colourString == "Red")
115 | {
116 | desBody.SetColor(null, Color.Red);
117 | }
118 | else if (colourString == "Green")
119 | {
120 | desBody.SetColor(null, Color.Green);
121 | }
122 | else if (colourString == "Orange")
123 | {
124 | desBody.SetColor(null, Color.Orange);
125 | }
126 | else if (colourString == "Black")
127 | {
128 | desBody.SetColor(null, Color.Black);
129 | }
130 | else if (colourString == "Yellow")
131 | {
132 | desBody.SetColor(null, Color.Yellow);
133 | }
134 | else if (colourString == "Salmon Pink")
135 | {
136 | desBody.SetColor(null, Color.Salmon);
137 | }
138 | }
139 | }
140 |
141 | }
142 | }
143 | }
144 | }
145 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SpaceClaim API Neutronics Tools
2 |
3 | Copyright 2021 United Kingdom Atomic Energy Agency (UKAEA)
4 | license: [MIT](LICENSE)
5 |
6 | This repository contains a set of tools designed the increase the efficiency of the preparation of CAD models for neutronics analysis. The tools
7 | automate many of the tasks typically undertaken to simply a detailed CAD model to a level suitable for particle transport. Install instructions
8 | for inclusion of the tools as an additional tab in the SpaceClaim GUI is provided below. The tools are designed to aid the user produce a CAD
9 | model suitable for conversion in software such as SuperMC or McCAD.
10 |
11 | It is expected that user of these tools has some level of competency using SpaceClaim. The tools do not fix broken CAD models nor is that their
12 | intended purpose. In any case, the tools will likely not work with poorly defined geometry.
13 |
14 | [More extensive documentation including installation instructions can be found here](docs)
15 |
16 | ## Development
17 |
18 | The tools have been produced using a combination of the C# API and python scripting available in ANSYS SpaceClaim. All tools exist in a single ribbon which is added when the tools are compiled.
19 |
20 | Feedback on existing tools or proposals for new tools welcome.
21 |
22 | ## Included Tools and Purpose
23 |
24 | | Tool | Purpose |
25 | | ------ | ------ |
26 | | Body Select | Highlights cones or tori, identifies small volumes (user input) and small rounds (user input) |
27 | | Export | Saves bodies of different colour in geometry as separate .sat files |
28 | | Lost particles | Plots MCNP lost particles on geometry|
29 | | Max surfaces | Highlights all bodies with a number of surfaces exceeding user input |
30 | | Pipe tools | Automates simplification of pipe networks |
31 | | Tori tools | Simplifies complex tori to cylindrical bodies |
32 | | Cylinder-plane locator | Identifies a shared edge between and plane and cylinder in a single body |
33 | | Cylinder-plane splitter | Splits a body along cylinder-plane edge |
34 | | Geometry assessor | Selects tori, cones, bodies with shared edges between higher order surfaces |
35 | | Mesh tally writer | Writes the MCNP definition for a mesh tally based on geometry |
36 | | Mesh tally checker | Plots simple mesh tallies from MCNP |
37 | | Cylinder Cylinder splitter | Splits along edge between two different cylinders |
38 | | Void generator | Creates void cells for geometry to define reciprocal space |
39 | | Volume assessor | Calculates volume of all solids in structure tree |
40 |
41 | ## Installation
42 |
43 | To compile and install the CCFE SpaceClaim tools it is recommended that Visual Studios Community edition (which is free to use on opensource projects) is installed. This provides a relatively quick and easy way to compile and install the tools into SpaceClaim.
44 |
45 | These instructions use Visual Studios 2019, but should be relatively similar for all versions of Visual Studios. It should be noted that .NET Framework version 4 or later is required.
46 |
47 | First you will need to clone the github repository by clicking on clone repository in the File menu:
48 |
49 | 
50 |
51 | Enter the github address of the repository in the first box and the local location of the folder you want to store the repository in the second box:
52 |
53 | 
54 |
55 | Once cloned you will need to re-point the project to the SpaceClaim API Library. This can be done by deleting **SpaceClaim.Api.V16** and **SpaceClaim.Api.V16.Scripting** from the **‘References’** in the **‘Solution Explorer’**.
56 |
57 | 
58 |
59 | And then re-adding them by right-clicking on References and selecting **‘Add Reference’**:
60 |
61 | 
62 |
63 | Click browse and navigate to *C:\Program Files\ANSYS Inc\v192\scdm\SpaceClaim.Api.V16* (or the location SpaceClaim is installed if it is not installed as part of ANSYS):
64 |
65 | 
66 |
67 | Add **SpaceClaim.Api.V16.dll**:
68 |
69 | 
70 |
71 | Add **SpaceClaim.Api.V16.Scripting.dll** (found in *C:Program Files\ANSYS Inc\v192\scdm*).
72 |
73 | 
74 |
75 | Repeat the above steps to also add **SpaceClaim.Api.V18.dll** and **SpaceClaim.Api.V18.Scripting.dll**.
76 |
77 | The next step is to make sure the output is placed into the correct folder, which can then be loaded by SpaceClaim when it opens. To do this the projects **‘Properties’** should be opened in the Solution Explorer.
78 |
79 | 
80 |
81 | Check that the Output path is set to:
82 | *`C:\ProgramData\SpaceClaim\AddIns\Samples\V18\CCFE\Toolkit`* (Or the location of your ProgramData directory if this is not on your C drive).
83 |
84 | 
85 |
86 | You can now build the tools in Visual Studio. **Please ensure that the SpaceClaim application is closed when you do this**.
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/BodySelectForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/MaxSurfacesForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/Pipes_Radius.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/MeshTallyCheckerForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/MeshTallyWriterForm2.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/VoidGeneratorForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/PipeSimplificationForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/ToriSimplificationForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/MaxSurfacesForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace CCFE_Toolbox.UI
2 | {
3 | partial class MaxSurfacesForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
32 | this.cancelButton = new System.Windows.Forms.Button();
33 | this.okButton = new System.Windows.Forms.Button();
34 | this.label2 = new System.Windows.Forms.Label();
35 | this.checkBox1 = new System.Windows.Forms.CheckBox();
36 | this.comboBox1 = new System.Windows.Forms.ComboBox();
37 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
38 | this.SuspendLayout();
39 | //
40 | // numericUpDown1
41 | //
42 | this.numericUpDown1.Location = new System.Drawing.Point(159, 31);
43 | this.numericUpDown1.Maximum = new decimal(new int[] {
44 | 1215752192,
45 | 23,
46 | 0,
47 | 0});
48 | this.numericUpDown1.Name = "numericUpDown1";
49 | this.numericUpDown1.Size = new System.Drawing.Size(101, 20);
50 | this.numericUpDown1.TabIndex = 17;
51 | this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
52 | //
53 | // cancelButton
54 | //
55 | this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
56 | this.cancelButton.Location = new System.Drawing.Point(259, 158);
57 | this.cancelButton.Name = "cancelButton";
58 | this.cancelButton.Size = new System.Drawing.Size(75, 23);
59 | this.cancelButton.TabIndex = 19;
60 | this.cancelButton.Text = "Cancel";
61 | this.cancelButton.UseVisualStyleBackColor = true;
62 | //
63 | // okButton
64 | //
65 | this.okButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
66 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
67 | this.okButton.Location = new System.Drawing.Point(178, 158);
68 | this.okButton.Name = "okButton";
69 | this.okButton.Size = new System.Drawing.Size(75, 23);
70 | this.okButton.TabIndex = 18;
71 | this.okButton.Text = "OK";
72 | this.okButton.UseVisualStyleBackColor = true;
73 | //
74 | // label2
75 | //
76 | this.label2.AutoSize = true;
77 | this.label2.Location = new System.Drawing.Point(27, 33);
78 | this.label2.Name = "label2";
79 | this.label2.Size = new System.Drawing.Size(72, 13);
80 | this.label2.TabIndex = 20;
81 | this.label2.Text = "Max Surfaces";
82 | //
83 | // checkBox1
84 | //
85 | this.checkBox1.AutoSize = true;
86 | this.checkBox1.Location = new System.Drawing.Point(12, 94);
87 | this.checkBox1.Name = "checkBox1";
88 | this.checkBox1.Size = new System.Drawing.Size(91, 17);
89 | this.checkBox1.TabIndex = 21;
90 | this.checkBox1.Text = "Colour Bodies";
91 | this.checkBox1.UseVisualStyleBackColor = true;
92 | this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
93 | //
94 | // comboBox1
95 | //
96 | this.comboBox1.FormattingEnabled = true;
97 | this.comboBox1.Location = new System.Drawing.Point(133, 92);
98 | this.comboBox1.Name = "comboBox1";
99 | this.comboBox1.Size = new System.Drawing.Size(201, 21);
100 | this.comboBox1.TabIndex = 22;
101 | this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
102 | //
103 | // MaxSurfacesForm
104 | //
105 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
106 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
107 | this.ClientSize = new System.Drawing.Size(346, 193);
108 | this.Controls.Add(this.comboBox1);
109 | this.Controls.Add(this.checkBox1);
110 | this.Controls.Add(this.label2);
111 | this.Controls.Add(this.cancelButton);
112 | this.Controls.Add(this.okButton);
113 | this.Controls.Add(this.numericUpDown1);
114 | this.Name = "MaxSurfacesForm";
115 | this.ShowIcon = false;
116 | this.Text = "Maximum Surfaces";
117 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
118 | this.ResumeLayout(false);
119 | this.PerformLayout();
120 |
121 | }
122 |
123 | #endregion
124 |
125 | private System.Windows.Forms.NumericUpDown numericUpDown1;
126 | private System.Windows.Forms.Button cancelButton;
127 | private System.Windows.Forms.Button okButton;
128 | private System.Windows.Forms.Label label2;
129 | private System.Windows.Forms.CheckBox checkBox1;
130 | private System.Windows.Forms.ComboBox comboBox1;
131 | }
132 | }
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/LostParticlesForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 184, 17
122 |
123 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/MeshTallyWriterForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/VolumeAssessorForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 184, 17
122 |
123 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/Resources/Ribbon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
14 |
15 |
29 |
30 |
33 |
34 |
35 |
36 |
37 |
44 |
45 |
46 |
47 |
48 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/PipeSimplificationForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace CCFE_Toolbox.CCFE_Commands
12 | {
13 | public partial class PipeRadiusOptions : Form
14 | {
15 |
16 | private void LoadButton_Click(object sender, EventArgs e)
17 | {
18 |
19 | }
20 | public PipeRadiusOptions()
21 | {
22 | InitializeComponent();
23 | hollowCheck.Enabled = false;
24 | innerRadius.Enabled = false;
25 | outerRadius.Enabled = false;
26 | outer_dia.Enabled = false;
27 | schedule_num.Enabled = false;
28 | string[] colours = new string[] { "Blue", "Red", "Green", "Orange", "Black", "Yellow", "Salmon Pink" };
29 | colour_dropdown.Items.AddRange(colours);
30 | colour_dropdown.Text = "Green";
31 |
32 | outer_dia.SelectedIndex = Properties.Settings.Default.UserStandDia;
33 | schedule_num.SelectedIndex = Properties.Settings.Default.UserSchedule;
34 | standardpipeCheck.Checked = Properties.Settings.Default.UserStandard;
35 | outerRadius.Value = Properties.Settings.Default.UserOD;
36 | innerRadius.Value = Properties.Settings.Default.UserID;
37 | userdefinedCheck.Checked = Properties.Settings.Default.UserDefined;
38 | hollowCheck.Checked = Properties.Settings.Default.UserHollow;
39 | colour_dropdown.SelectedIndex = Properties.Settings.Default.UserColour;
40 |
41 | }
42 |
43 | public string get_colour
44 | {
45 | get { return colour_dropdown.SelectedItem.ToString(); }
46 | }
47 | public bool hollow
48 | {
49 | get { return hollowCheck.Checked; }
50 | }
51 | public bool userdefined
52 | {
53 | get { return userdefinedCheck.Checked; }
54 | }
55 |
56 | public decimal outRadius
57 | {
58 | get { return outerRadius.Value; }
59 | }
60 |
61 | public decimal inRadius
62 | {
63 | get { return innerRadius.Value; }
64 | }
65 |
66 | public string get_standard_dia
67 | {
68 | get { return outer_dia.SelectedItem.ToString(); }
69 | }
70 |
71 | public string get_schedule_num
72 | {
73 | get { return schedule_num.SelectedItem.ToString(); }
74 | }
75 |
76 | public bool standardpipe
77 | {
78 | get { return standardpipeCheck.Checked; }
79 | }
80 |
81 | private void label1_Click(object sender, EventArgs e)
82 | {
83 |
84 | }
85 |
86 | private void hollowCheck_CheckedChanged(object sender, EventArgs e)
87 | {
88 | if (hollowCheck.Checked)
89 | {
90 | innerRadius.Enabled = true;
91 | }
92 | else
93 | {
94 | innerRadius.Enabled = false;
95 | }
96 | }
97 |
98 | private void label2_Click(object sender, EventArgs e)
99 | {
100 |
101 | }
102 |
103 | private void numericUpDown2_ValueChanged(object sender, EventArgs e)
104 | {
105 |
106 | }
107 |
108 | private void numericUpDown1_ValueChanged(object sender, EventArgs e)
109 | {
110 |
111 | }
112 |
113 | private void okbutton_Click(object sender, EventArgs e)
114 | {
115 |
116 | // set the new value of comboBoxSelection
117 | Properties.Settings.Default.UserStandDia = outer_dia.SelectedIndex;
118 | Properties.Settings.Default.UserSchedule = schedule_num.SelectedIndex;
119 | Properties.Settings.Default.UserStandard = standardpipeCheck.Checked;
120 | Properties.Settings.Default.UserOD = outerRadius.Value;
121 | Properties.Settings.Default.UserID = innerRadius.Value;
122 | Properties.Settings.Default.UserDefined = userdefinedCheck.Checked;
123 | Properties.Settings.Default.UserHollow = hollowCheck.Checked;
124 | Properties.Settings.Default.UserColour = colour_dropdown.SelectedIndex;
125 |
126 | //apply the changes to the settings file
127 | Properties.Settings.Default.Save();
128 | }
129 |
130 | private void PipeRadiusOptions_Load(object sender, EventArgs e)
131 | {
132 |
133 | }
134 |
135 | private void checkBox1_CheckedChanged(object sender, EventArgs e)
136 | {
137 | if (userdefinedCheck.Checked)
138 | {
139 | outerRadius.Enabled = true;
140 | hollowCheck.Enabled = true;
141 | outer_dia.Enabled = false;
142 | schedule_num.Enabled = false;
143 | standardpipeCheck.Checked = false;
144 | standardpipeCheck.Enabled = false;
145 | }
146 | else
147 | {
148 | hollowCheck.Checked = false;
149 | hollowCheck.Enabled = false;
150 | outerRadius.Enabled = false;
151 | standardpipeCheck.Enabled = true;
152 |
153 | }
154 | }
155 |
156 | private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
157 | {
158 |
159 | }
160 |
161 | private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
162 | {
163 |
164 | }
165 |
166 | private void checkBox1_CheckedChanged_1(object sender, EventArgs e)
167 | {
168 | if (standardpipeCheck.Checked)
169 | {
170 | outer_dia.Enabled = true;
171 | schedule_num.Enabled = true;
172 | hollowCheck.Enabled = false;
173 | outerRadius.Enabled = false;
174 | hollowCheck.Enabled = false;
175 | userdefinedCheck.Enabled = false;
176 | }
177 | else
178 | {
179 | outer_dia.Enabled = false;
180 | schedule_num.Enabled = false;
181 | userdefinedCheck.Enabled = true;
182 | userdefinedCheck.Checked = false;
183 | hollowCheck.Checked = false;
184 | userdefinedCheck.Enabled = true;
185 |
186 | }
187 | }
188 |
189 | private void label3_Click(object sender, EventArgs e)
190 | {
191 |
192 | }
193 |
194 | private void label6_Click(object sender, EventArgs e)
195 | {
196 |
197 | }
198 |
199 | private void comboBox1_SelectedIndexChanged_1(object sender, EventArgs e)
200 | {
201 |
202 | }
203 |
204 | private void label7_Click(object sender, EventArgs e)
205 | {
206 |
207 | }
208 | }
209 | }
210 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/VoidGeneratorForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace CCFE_Toolbox.UI
2 | {
3 | partial class VoidGeneratorForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.cancelButton = new System.Windows.Forms.Button();
32 | this.okButton = new System.Windows.Forms.Button();
33 | this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
34 | this.labelt = new System.Windows.Forms.Label();
35 | this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
36 | this.label1 = new System.Windows.Forms.Label();
37 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
38 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
39 | this.SuspendLayout();
40 | //
41 | // cancelButton
42 | //
43 | this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
44 | this.cancelButton.Location = new System.Drawing.Point(487, 238);
45 | this.cancelButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
46 | this.cancelButton.Name = "cancelButton";
47 | this.cancelButton.Size = new System.Drawing.Size(112, 35);
48 | this.cancelButton.TabIndex = 11;
49 | this.cancelButton.Text = "Cancel";
50 | this.cancelButton.UseVisualStyleBackColor = true;
51 | this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
52 | //
53 | // okButton
54 | //
55 | this.okButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
56 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
57 | this.okButton.Location = new System.Drawing.Point(365, 238);
58 | this.okButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
59 | this.okButton.Name = "okButton";
60 | this.okButton.Size = new System.Drawing.Size(112, 35);
61 | this.okButton.TabIndex = 10;
62 | this.okButton.Text = "OK";
63 | this.okButton.UseVisualStyleBackColor = true;
64 | this.okButton.Click += new System.EventHandler(this.okButton_Click);
65 | //
66 | // numericUpDown1
67 | //
68 | this.numericUpDown1.Location = new System.Drawing.Point(374, 72);
69 | this.numericUpDown1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
70 | this.numericUpDown1.Maximum = new decimal(new int[] {
71 | 1215752192,
72 | 23,
73 | 0,
74 | 0});
75 | this.numericUpDown1.Name = "numericUpDown1";
76 | this.numericUpDown1.Size = new System.Drawing.Size(116, 26);
77 | this.numericUpDown1.TabIndex = 16;
78 | this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
79 | //
80 | // labelt
81 | //
82 | this.labelt.AutoSize = true;
83 | this.labelt.Location = new System.Drawing.Point(125, 74);
84 | this.labelt.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
85 | this.labelt.Name = "labelt";
86 | this.labelt.Size = new System.Drawing.Size(148, 20);
87 | this.labelt.TabIndex = 19;
88 | this.labelt.Text = "Level of Recursions";
89 | //
90 | // numericUpDown2
91 | //
92 | this.numericUpDown2.Location = new System.Drawing.Point(374, 149);
93 | this.numericUpDown2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
94 | this.numericUpDown2.Maximum = new decimal(new int[] {
95 | 1215752192,
96 | 23,
97 | 0,
98 | 0});
99 | this.numericUpDown2.Name = "numericUpDown2";
100 | this.numericUpDown2.Size = new System.Drawing.Size(116, 26);
101 | this.numericUpDown2.TabIndex = 20;
102 | //
103 | // label1
104 | //
105 | this.label1.AutoSize = true;
106 | this.label1.Location = new System.Drawing.Point(108, 151);
107 | this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
108 | this.label1.Name = "label1";
109 | this.label1.Size = new System.Drawing.Size(232, 20);
110 | this.label1.TabIndex = 21;
111 | this.label1.Text = "Max faces of any single void cell";
112 | //
113 | // VoidGeneratorForm
114 | //
115 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
116 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
117 | this.ClientSize = new System.Drawing.Size(656, 302);
118 | this.Controls.Add(this.label1);
119 | this.Controls.Add(this.numericUpDown2);
120 | this.Controls.Add(this.cancelButton);
121 | this.Controls.Add(this.okButton);
122 | this.Controls.Add(this.numericUpDown1);
123 | this.Controls.Add(this.labelt);
124 | this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
125 | this.Name = "VoidGeneratorForm";
126 | this.ShowIcon = false;
127 | this.Text = "Void Generator";
128 | this.Load += new System.EventHandler(this.VoidGeneratorForm_Load);
129 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
130 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
131 | this.ResumeLayout(false);
132 | this.PerformLayout();
133 |
134 | }
135 |
136 | #endregion
137 |
138 | private System.Windows.Forms.Button cancelButton;
139 | private System.Windows.Forms.Button okButton;
140 | private System.Windows.Forms.NumericUpDown numericUpDown1;
141 | private System.Windows.Forms.Label labelt;
142 | private System.Windows.Forms.NumericUpDown numericUpDown2;
143 | private System.Windows.Forms.Label label1;
144 | }
145 | }
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/GeometryAssessorForm.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 847, 17
122 |
123 |
124 | 681, 17
125 |
126 |
127 | 17, 17
128 |
129 |
130 | 183, 17
131 |
132 |
133 | 349, 17
134 |
135 |
136 | 515, 17
137 |
138 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/Pipes_Radius.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace CCFE_Toolbox.UI
2 | {
3 | partial class Pipes_Radius
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.button1 = new System.Windows.Forms.Button();
32 | this.label2 = new System.Windows.Forms.Label();
33 | this.label1 = new System.Windows.Forms.Label();
34 | this.outerRadius = new System.Windows.Forms.NumericUpDown();
35 | this.innerRadius = new System.Windows.Forms.NumericUpDown();
36 | this.hollowCheck = new System.Windows.Forms.CheckBox();
37 | this.label3 = new System.Windows.Forms.Label();
38 | this.label4 = new System.Windows.Forms.Label();
39 | ((System.ComponentModel.ISupportInitialize)(this.outerRadius)).BeginInit();
40 | ((System.ComponentModel.ISupportInitialize)(this.innerRadius)).BeginInit();
41 | this.SuspendLayout();
42 | //
43 | // button1
44 | //
45 | this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
46 | this.button1.Location = new System.Drawing.Point(217, 100);
47 | this.button1.Name = "button1";
48 | this.button1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
49 | this.button1.Size = new System.Drawing.Size(75, 23);
50 | this.button1.TabIndex = 9;
51 | this.button1.Text = "OK";
52 | this.button1.UseVisualStyleBackColor = true;
53 | //
54 | // label2
55 | //
56 | this.label2.AutoSize = true;
57 | this.label2.Location = new System.Drawing.Point(169, 58);
58 | this.label2.Name = "label2";
59 | this.label2.Size = new System.Drawing.Size(84, 13);
60 | this.label2.TabIndex = 11;
61 | this.label2.Text = "Inner Radius (m)";
62 | //
63 | // label1
64 | //
65 | this.label1.AutoSize = true;
66 | this.label1.Location = new System.Drawing.Point(27, 58);
67 | this.label1.Name = "label1";
68 | this.label1.Size = new System.Drawing.Size(86, 13);
69 | this.label1.TabIndex = 10;
70 | this.label1.Text = "Outer Radius (m)";
71 | //
72 | // outerRadius
73 | //
74 | this.outerRadius.DecimalPlaces = 5;
75 | this.outerRadius.Location = new System.Drawing.Point(32, 74);
76 | this.outerRadius.Name = "outerRadius";
77 | this.outerRadius.Size = new System.Drawing.Size(120, 20);
78 | this.outerRadius.TabIndex = 14;
79 | //
80 | // innerRadius
81 | //
82 | this.innerRadius.DecimalPlaces = 5;
83 | this.innerRadius.Location = new System.Drawing.Point(172, 74);
84 | this.innerRadius.Name = "innerRadius";
85 | this.innerRadius.Size = new System.Drawing.Size(120, 20);
86 | this.innerRadius.TabIndex = 13;
87 | //
88 | // hollowCheck
89 | //
90 | this.hollowCheck.AutoSize = true;
91 | this.hollowCheck.Location = new System.Drawing.Point(173, 38);
92 | this.hollowCheck.Name = "hollowCheck";
93 | this.hollowCheck.Size = new System.Drawing.Size(82, 17);
94 | this.hollowCheck.TabIndex = 12;
95 | this.hollowCheck.Text = "Hollow Pipe";
96 | this.hollowCheck.UseVisualStyleBackColor = true;
97 | this.hollowCheck.CheckedChanged += new System.EventHandler(this.hollowCheck_CheckedChanged);
98 | //
99 | // label3
100 | //
101 | this.label3.AutoSize = true;
102 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
103 | this.label3.Location = new System.Drawing.Point(85, 3);
104 | this.label3.Name = "label3";
105 | this.label3.Size = new System.Drawing.Size(150, 13);
106 | this.label3.TabIndex = 15;
107 | this.label3.Text = "Error finding pipe radius. ";
108 | this.label3.Click += new System.EventHandler(this.label3_Click_1);
109 | //
110 | // label4
111 | //
112 | this.label4.AutoSize = true;
113 | this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
114 | this.label4.Location = new System.Drawing.Point(45, 20);
115 | this.label4.Name = "label4";
116 | this.label4.Size = new System.Drawing.Size(230, 13);
117 | this.label4.TabIndex = 16;
118 | this.label4.Text = "Please enter user defined values below";
119 | this.label4.Click += new System.EventHandler(this.label4_Click);
120 | //
121 | // Pipes_Radius
122 | //
123 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
124 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
125 | this.ClientSize = new System.Drawing.Size(321, 134);
126 | this.Controls.Add(this.label4);
127 | this.Controls.Add(this.label3);
128 | this.Controls.Add(this.outerRadius);
129 | this.Controls.Add(this.innerRadius);
130 | this.Controls.Add(this.hollowCheck);
131 | this.Controls.Add(this.label2);
132 | this.Controls.Add(this.label1);
133 | this.Controls.Add(this.button1);
134 | this.Name = "Pipes_Radius";
135 | this.Text = "Error Finding Radius";
136 | ((System.ComponentModel.ISupportInitialize)(this.outerRadius)).EndInit();
137 | ((System.ComponentModel.ISupportInitialize)(this.innerRadius)).EndInit();
138 | this.ResumeLayout(false);
139 | this.PerformLayout();
140 |
141 | }
142 |
143 | #endregion
144 | private System.Windows.Forms.Button button1;
145 | private System.Windows.Forms.Label label2;
146 | private System.Windows.Forms.Label label1;
147 | private System.Windows.Forms.NumericUpDown outerRadius;
148 | private System.Windows.Forms.NumericUpDown innerRadius;
149 | private System.Windows.Forms.CheckBox hollowCheck;
150 | private System.Windows.Forms.Label label3;
151 | private System.Windows.Forms.Label label4;
152 | }
153 | }
--------------------------------------------------------------------------------
/CCFE_Toolbox/CCFE_Commands/GeometryAssessor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Drawing;
8 | using System.Diagnostics;
9 | using SpaceClaim.Api.V18.Extensibility;
10 | using SpaceClaim.Api.V18.Geometry;
11 | using SpaceClaim.Api.V18.Modeler;
12 | using System.Xml.Serialization;
13 | using CCFE_Toolbox.Properties;
14 | using System.Windows.Forms;
15 | using SpaceClaim.Api.V18;
16 | using SpaceClaim.Api.V18.Display;
17 | using Point = SpaceClaim.Api.V18.Geometry.Point;
18 | using SpaceClaim.Api.V18.Scripting;
19 | using System.Text.RegularExpressions;
20 | using System.Linq.Expressions;
21 | using System.Windows.Forms.VisualStyles;
22 |
23 | namespace CCFE_Toolbox.CCFE_Commands
24 | {
25 | //class ScriptClass :
26 |
27 | class GeometryAssessor : CommandCapsule
28 | {
29 | // This command name must match that in the Ribbon.xml file
30 | //----------------------------------------------------------
31 | public bool first = true;
32 | public string directory = @"C:\ProgramData\SpaceClaim\AddIns\Samples\V18\CCFE_Toolkit\Resources\PythonScripts\Geometry_assessor.scscript";
33 | public const string CommandName = "CCFE_Toolbox.C#.V18.GA";
34 |
35 | public GeometryAssessor() : base(CommandName, Resources.GeomAssText, Resources.ga_image, Resources.GeomAssHint)
36 | {
37 |
38 | }
39 |
40 | //protected override void OnUpdate(Command command)
41 | //{
42 | /*
43 | if (first)
44 | {
45 | directory = Directory.GetCurrentDirectory();
46 | first = false;
47 | }
48 | */
49 | //Window window = Window.ActiveWindow;
50 | //command.IsEnabled = window != null && SelectionAllBodies(window);
51 | //}
52 | protected override void OnExecute(Command command, ExecutionContext context, Rectangle buttonRect)
53 | {
54 | if (File.Exists(directory))
55 | {
56 |
57 | // Instance common functions class
58 | InstanceClasses.CommonSpaceClaimFunctions FunctionsClass = new InstanceClasses.CommonSpaceClaimFunctions();
59 |
60 | // Variables
61 | Window window = Window.ActiveWindow;
62 | Document doc = window.Document;
63 | Part rootPart = doc.MainPart;
64 |
65 | // Dialogue variables
66 | string filename;
67 | Color coneclr;
68 | Color nurbsclr;
69 | Color onaclr;
70 | Color offaclr;
71 | Color procclr;
72 |
73 | // Get save location via user input
74 | //using (var dialogue = new SaveFileDialog())
75 | //{
76 | // dialogue.FileName = "GeometryReport.txt";
77 | // dialogue.DefaultExt = "txt";
78 | // dialogue.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
79 | // dialogue.FilterIndex = 2;
80 | // dialogue.OverwritePrompt = true;
81 | //
82 | // if (dialogue.ShowDialog() != DialogResult.OK)
83 | // return;
84 | //
85 | // var nameAndRendering = new List>();
86 | // var partToGraphic = new Dictionary();
87 | //
88 | // var style = new GraphicStyle
89 | // {
90 | // EnableDepthBuffer = true
91 | // };
92 | //
93 | // filePath = dialogue.FileName;
94 | //}
95 |
96 | //if (window == null)
97 | // return;
98 |
99 | using(var form = new UI.GeometryAssessorForm())
100 | {
101 | if (form.ShowDialog() != DialogResult.OK)
102 | return;
103 |
104 | var nameAndRendering = new List>();
105 | var partToGraphic = new Dictionary();
106 |
107 | var style = new GraphicStyle
108 | {
109 | EnableDepthBuffer = true
110 | };
111 |
112 | filename = form.FileName;
113 | coneclr = form.color1;
114 | nurbsclr = form.color2;
115 | onaclr = form.color3;
116 | offaclr = form.color4;
117 | procclr = form.color5;
118 |
119 | }
120 |
121 | if (window == null)
122 | return;
123 |
124 | // To pass args to python script
125 | var scriptParams = new Dictionary();
126 | scriptParams.Add("filepath", filename);
127 | scriptParams.Add("conea", Convert.ToInt32(coneclr.A));
128 | scriptParams.Add("coner", Convert.ToInt32(coneclr.R));
129 | scriptParams.Add("coneg", Convert.ToInt32(coneclr.G));
130 | scriptParams.Add("coneb", Convert.ToInt32(coneclr.B));
131 | scriptParams.Add("nurba", Convert.ToInt32(nurbsclr.A));
132 | scriptParams.Add("nurbr", Convert.ToInt32(nurbsclr.R));
133 | scriptParams.Add("nurbg", Convert.ToInt32(nurbsclr.G));
134 | scriptParams.Add("nurbb", Convert.ToInt32(nurbsclr.B));
135 | scriptParams.Add("onaa", Convert.ToInt32(onaclr.A));
136 | scriptParams.Add("onar", Convert.ToInt32(onaclr.R));
137 | scriptParams.Add("onag", Convert.ToInt32(onaclr.G));
138 | scriptParams.Add("onab", Convert.ToInt32(onaclr.B));
139 | scriptParams.Add("offaa", Convert.ToInt32(offaclr.A));
140 | scriptParams.Add("offar", Convert.ToInt32(offaclr.R));
141 | scriptParams.Add("offag", Convert.ToInt32(offaclr.G));
142 | scriptParams.Add("offab", Convert.ToInt32(offaclr.B));
143 | scriptParams.Add("proca", Convert.ToInt32(procclr.A));
144 | scriptParams.Add("procr", Convert.ToInt32(procclr.R));
145 | scriptParams.Add("procg", Convert.ToInt32(procclr.G));
146 | scriptParams.Add("procb", Convert.ToInt32(procclr.B));
147 |
148 | // Run the script w/ args
149 | SpaceClaim.Api.V18.Application.RunScript(directory, scriptParams);
150 |
151 | // Show txt output
152 | Process.Start(filename);
153 | }
154 |
155 | else
156 | {
157 | MessageBox.Show("ERROR: Script not found.");
158 | }
159 |
160 | }
161 |
162 | public bool SelectionAllBodies(Window window)
163 | {
164 | ICollection docObjects = window.ActiveContext.Selection;
165 | if (docObjects.Count == 0)
166 | {
167 | return true;
168 | }
169 | foreach (IDocObject obj in docObjects)
170 | {
171 | var body = obj as IDesignBody;
172 | if (body == null)
173 | {
174 | return false;
175 | }
176 | }
177 | return true;
178 |
179 | }
180 |
181 | }
182 | }
183 |
--------------------------------------------------------------------------------
/CCFE_Toolbox/UI/VolumeAssessorForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace CCFE_Toolbox.UI
2 | {
3 | partial class VolumeAssessorForm
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.cancelButton = new System.Windows.Forms.Button();
32 | this.okButton = new System.Windows.Forms.Button();
33 | this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
34 | this.textBox1 = new System.Windows.Forms.TextBox();
35 | this.button1 = new System.Windows.Forms.Button();
36 | this.label1 = new System.Windows.Forms.Label();
37 | this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
38 | this.label2 = new System.Windows.Forms.Label();
39 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
40 | this.SuspendLayout();
41 | //
42 | // cancelButton
43 | //
44 | this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
45 | this.cancelButton.Location = new System.Drawing.Point(525, 161);
46 | this.cancelButton.Name = "cancelButton";
47 | this.cancelButton.Size = new System.Drawing.Size(75, 23);
48 | this.cancelButton.TabIndex = 11;
49 | this.cancelButton.Text = "Cancel";
50 | this.cancelButton.UseVisualStyleBackColor = true;
51 | this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
52 | //
53 | // okButton
54 | //
55 | this.okButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
56 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
57 | this.okButton.Location = new System.Drawing.Point(444, 161);
58 | this.okButton.Name = "okButton";
59 | this.okButton.Size = new System.Drawing.Size(75, 23);
60 | this.okButton.TabIndex = 10;
61 | this.okButton.Text = "OK";
62 | this.okButton.UseVisualStyleBackColor = true;
63 | this.okButton.Click += new System.EventHandler(this.okButton_Click);
64 | //
65 | // saveFileDialog1
66 | //
67 | this.saveFileDialog1.FileName = "VolumeAssessment.txt";
68 | this.saveFileDialog1.DefaultExt = "txt";
69 | this.saveFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
70 | this.saveFileDialog1.FilterIndex = 2;
71 | this.saveFileDialog1.OverwritePrompt = true;
72 | this.saveFileDialog1.FileOk += new System.ComponentModel.CancelEventHandler(this.saveFileDialog1_FileOk);
73 | //
74 | // textBox1
75 | //
76 | this.textBox1.Location = new System.Drawing.Point(76, 33);
77 | this.textBox1.Name = "textBox1";
78 | this.textBox1.Size = new System.Drawing.Size(475, 20);
79 | this.textBox1.TabIndex = 12;
80 | this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
81 | //
82 | // button1
83 | //
84 | this.button1.Location = new System.Drawing.Point(571, 31);
85 | this.button1.Name = "button1";
86 | this.button1.Size = new System.Drawing.Size(29, 23);
87 | this.button1.TabIndex = 13;
88 | this.button1.Text = "...";
89 | this.button1.UseVisualStyleBackColor = true;
90 | this.button1.Click += new System.EventHandler(this.button1_Click);
91 | //
92 | // label1
93 | //
94 | this.label1.AutoSize = true;
95 | this.label1.Location = new System.Drawing.Point(12, 36);
96 | this.label1.Name = "label1";
97 | this.label1.Size = new System.Drawing.Size(48, 13);
98 | this.label1.TabIndex = 14;
99 | this.label1.Text = "File Path";
100 | this.label1.Click += new System.EventHandler(this.label1_Click);
101 | //
102 | // numericUpDown1
103 | //
104 | this.numericUpDown1.Location = new System.Drawing.Point(338, 108);
105 | this.numericUpDown1.Maximum = new decimal(new int[] {
106 | 1215752192,
107 | 23,
108 | 0,
109 | 0});
110 | this.numericUpDown1.Name = "numericUpDown1";
111 | this.numericUpDown1.Size = new System.Drawing.Size(120, 20);
112 | this.numericUpDown1.TabIndex = 16;
113 | this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
114 | //
115 | // label2
116 | //
117 | this.label2.AutoSize = true;
118 | this.label2.Location = new System.Drawing.Point(172, 110);
119 | this.label2.Name = "label2";
120 | this.label2.Size = new System.Drawing.Size(107, 13);
121 | this.label2.TabIndex = 19;
122 | this.label2.Text = "Structure Tree Depth";
123 | //
124 | // VolumeAssessorForm
125 | //
126 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
127 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
128 | this.ClientSize = new System.Drawing.Size(612, 196);
129 | this.Controls.Add(this.numericUpDown1);
130 | this.Controls.Add(this.label1);
131 | this.Controls.Add(this.label2);
132 | this.Controls.Add(this.button1);
133 | this.Controls.Add(this.textBox1);
134 | this.Controls.Add(this.cancelButton);
135 | this.Controls.Add(this.okButton);
136 | this.Name = "VolumeAssessorForm";
137 | this.ShowIcon = false;
138 | this.Text = "Save Volume Assessment";
139 | this.Load += new System.EventHandler(this.VolumeAssessorForm_Load);
140 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
141 | this.ResumeLayout(false);
142 | this.PerformLayout();
143 |
144 | }
145 |
146 | #endregion
147 |
148 | private System.Windows.Forms.Button cancelButton;
149 | private System.Windows.Forms.Button okButton;
150 | private System.Windows.Forms.SaveFileDialog saveFileDialog1;
151 | private System.Windows.Forms.TextBox textBox1;
152 | private System.Windows.Forms.Button button1;
153 | private System.Windows.Forms.Label label1;
154 | private System.Windows.Forms.Label label2;
155 | private System.Windows.Forms.NumericUpDown numericUpDown1;
156 | }
157 | }
--------------------------------------------------------------------------------