From 2822788e9e4c0e295645465ff0ad823b14830e15 Mon Sep 17 00:00:00 2001 From: Oleksiy Penkov Date: Tue, 8 Aug 2023 15:17:00 +0800 Subject: [PATCH] Fixed: - Poly Fitting (using of high orders) - Drawing of NP profiles - Minor errors - Interface fixes Added: - Profile Table viewer - Storing auto generated tables in the project file - Copy structure as image (png) - GIU improvements --- LFPSO/unit_LFPSO_Base.pas | 9 + LFPSO/unit_LFPSO_Periodic.pas | 9 + LFPSO/unit_LFPSO_Poly.pas | 62 +- LFPSO/unit_LFPSO_Regular.pas | 14 +- README.md | 13 + XRC3.groupproj | 18 +- XRayCalc3.dpr | 5 +- XRayCalc3.dproj | 13 +- XRayCalc3.dproj.local | 91 +++ components/XRayCalcVisualControls.dpk | 38 ++ components/XRayCalcVisualControls.dproj | 871 ++++++++++++++++++++++++ components/unit_SMessages.pas | 9 + components/unit_XRCGrid.pas | 93 +++ components/unit_XRCLayerControl.pas | 9 + components/unit_XRCProjectTree.pas | 43 +- components/unit_XRCStackControl.pas | 14 +- components/unit_XRCStructure.pas | 40 +- editors/editor_HenkeTable.dfm | 29 +- editors/editor_HenkeTable.pas | 11 +- editors/editor_JSON.dfm | 10 +- editors/editor_JSON.pas | 9 + editors/editor_ProfileFunction.dfm | 8 +- editors/editor_ProfileFunction.pas | 9 + editors/editor_ProfileTable.dfm | 208 ++++++ editors/editor_ProfileTable.pas | 212 ++++++ forms/frm_Benchmark.dfm | 17 +- forms/frm_Benchmark.pas | 52 +- forms/frm_ExtensionType.dfm | 8 +- forms/frm_ExtensionType.pas | 13 +- forms/frm_Limits.dfm | 20 +- forms/frm_Limits.pas | 16 +- forms/frm_Main.dfm | 816 ++++++++++++++++++++-- forms/frm_Main.pas | 191 ++++-- forms/frm_MaterialSelector.dfm | 12 +- forms/frm_MaterialSelector.pas | 9 + forms/frm_about.dfm | 19 +- forms/frm_settings.dfm | 22 +- forms/frm_settings.pas | 11 +- math/math_globals.pas | 31 +- math/unit_SavitzkyGolay.pas | 9 + math/unit_calc.pas | 28 +- units/unit_Types.pas | 32 +- units/unit_consts.pas | 3 +- 43 files changed, 2839 insertions(+), 317 deletions(-) create mode 100644 XRayCalc3.dproj.local create mode 100644 components/XRayCalcVisualControls.dpk create mode 100644 components/XRayCalcVisualControls.dproj create mode 100644 components/unit_XRCGrid.pas create mode 100644 editors/editor_ProfileTable.dfm create mode 100644 editors/editor_ProfileTable.pas diff --git a/LFPSO/unit_LFPSO_Base.pas b/LFPSO/unit_LFPSO_Base.pas index e20fb79..5b2dd43 100644 --- a/LFPSO/unit_LFPSO_Base.pas +++ b/LFPSO/unit_LFPSO_Base.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit unit_LFPSO_Base; interface diff --git a/LFPSO/unit_LFPSO_Periodic.pas b/LFPSO/unit_LFPSO_Periodic.pas index 9cf8008..3aab5cf 100644 --- a/LFPSO/unit_LFPSO_Periodic.pas +++ b/LFPSO/unit_LFPSO_Periodic.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit unit_LFPSO_Periodic; interface diff --git a/LFPSO/unit_LFPSO_Poly.pas b/LFPSO/unit_LFPSO_Poly.pas index f233673..9e25414 100644 --- a/LFPSO/unit_LFPSO_Poly.pas +++ b/LFPSO/unit_LFPSO_Poly.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit unit_LFPSO_Poly; interface @@ -102,7 +111,7 @@ procedure TLFPSO_Poly.UpdatePSO(const t: integer); procedure TLFPSO_Poly.CheckLimitsP(const i, j, k, Ord: integer); var Val, Max, Min: Single; - p, r: Integer; + p, r, Nmin, Nmax: Integer; begin for p := 0 to Ord do begin @@ -121,11 +130,17 @@ procedure TLFPSO_Poly.CheckLimitsP(const i, j, k, Ord: integer); begin for r := 1 to Counts[j] do begin - Val := Poly(r, X[i][j][k]); + Val := Poly(r, Xmin[0][Indexes[j]][k][0], Xmax[0][Indexes[j]][k][0], X[i][j][k]); if Val > Max then - Max := Val; + begin + Max := Val; + NMax := r; + end; if Val < Min then + begin Min := Val; + Nmin := r; + end; end end else begin @@ -133,20 +148,34 @@ procedure TLFPSO_Poly.CheckLimitsP(const i, j, k, Ord: integer); Min := X[i][j][k][0]; end; - if Max > Xmax[0][Indexes[j]][k][0] then + if Max >= Xmax[0][Indexes[j]][k][0] then begin - X[i][j][k][0] := Xmax[0][Indexes[j]][k][0]; - for p := 1 to Ord do - if X[i][j][k][p] > 0 then - X[i][j][k][p] := 0; + if X[i][j][k][0] > Xmax[0][Indexes[j]][k][0] then + begin + X[i][j][k][0] := Xmax[0][Indexes[j]][k][0]; + for p := 1 to Ord do + X[i][j][k][p] := 0; + end + else begin + X[i][j][k][1] := (Xmax[0][Indexes[j]][k][0] - X[i][j][k][0]) / Nmax; + for p := 2 to Ord do + X[i][j][k][p] := 0; + end; end; - if Min < Xmin[0][Indexes[j]][k][0] then + if Min <= Xmin[0][Indexes[j]][k][0] then begin - X[i][j][k][0] := Xmin[0][Indexes[j]][k][0]; - for p := 1 to Ord do - if X[i][j][k][p] < 0 then - X[i][j][k][p] := 0; + if X[i][j][k][0] < Xmin[0][Indexes[j]][k][0] then + begin + X[i][j][k][0] := Xmin[0][Indexes[j]][k][0]; + for p := 1 to Ord do + X[i][j][k][p] := 0; + end + else begin + X[i][j][k][1] := (Xmin[0][Indexes[j]][k][0] - X[i][j][k][0]) / Nmin; + for p := 2 to Ord do + X[i][j][k][p] := 0; + end; end; end; @@ -196,7 +225,7 @@ procedure TLFPSO_Poly.XSeed; procedure TLFPSO_Poly.RangeSeed; var - i, j, k, p: integer; + i, j, k, p, Ord: integer; Val: Single; begin for i := 0 to High(X) do // for every member of the population @@ -204,7 +233,8 @@ procedure TLFPSO_Poly.RangeSeed; for j := 0 to High(X[i]) do //for every layer for k := 1 to 3 do // for H, s, rho begin - for p := 0 to Order(j, k) do // for every oefficient of polynome + Ord := Order(j, k); + for p := 0 to Ord do // for every oefficient of polynome begin if p = 0 then begin @@ -214,7 +244,7 @@ procedure TLFPSO_Poly.RangeSeed; else X[i][j][k][p] := Rand(1)/TP(p); end; - CheckLimits(i, j, k); + CheckLimitsP(i, j, k, Ord); end; end; end; diff --git a/LFPSO/unit_LFPSO_Regular.pas b/LFPSO/unit_LFPSO_Regular.pas index f56cb0a..ef9cf2a 100644 --- a/LFPSO/unit_LFPSO_Regular.pas +++ b/LFPSO/unit_LFPSO_Regular.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit unit_LFPSO_Regular; interface @@ -171,8 +180,7 @@ procedure TLFPSO_Regular.SetStructure(const Inp: TFitStructure); for k := 1 to Inp.Stacks[i].N do begin if (k = 1) and not FReInit then - - InitArray(NLayers, Links); + InitArray(NLayers, Links); for j := 0 to NLayers - 1 do begin @@ -193,7 +201,7 @@ procedure TLFPSO_Regular.SetStructure(const Inp: TFitStructure); for p := 1 to 3 do if Inp.Stacks[i].Layers[j].P[p].Paired then - Links[j][1] := Index; + Links[j][p] := Index; end else for l := 1 to 3 do diff --git a/README.md b/README.md index c70582c..2ac879b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,19 @@ In this version, the automatic optimization based on modified LFPSO algorithm wa The X-Ray Calc distribution contents several demonstration projects located in the Examples folder To see the demos, click the Open button, navigate to the Examples folder, and select a project file. + +2023-08-08 3.0.6 +Fixed: + - Poly Fitting (using of high orders) + - Drawing of NP profiles + - Minor errors + - Interface fixes +Added: + - Profile Table viewer + - Storing auto generated tables in the project file + - Copy structure as image (png) + - GIU improvements + 2023-07-31 3.0.5 Fixed: - Poly Fitting diff --git a/XRC3.groupproj b/XRC3.groupproj index 66d37b7..dfdd047 100644 --- a/XRC3.groupproj +++ b/XRC3.groupproj @@ -6,6 +6,9 @@ + + + Default.Personality.12 @@ -23,14 +26,23 @@ + + + + + + + + + - + - + - + diff --git a/XRayCalc3.dpr b/XRayCalc3.dpr index a9d1b99..abd6f5c 100644 --- a/XRayCalc3.dpr +++ b/XRayCalc3.dpr @@ -37,7 +37,9 @@ uses frm_Benchmark in 'forms\frm_Benchmark.pas' {frmBenchmark}, unit_files_list in 'components\unit_files_list.pas', unit_Config in 'units\unit_Config.pas', - frm_settings in 'forms\frm_settings.pas' {frmSettings}; + frm_settings in 'forms\frm_settings.pas' {frmSettings}, + editor_ProfileTable in 'editors\editor_ProfileTable.pas' {edtrProfileTable}, + unit_XRCGrid in 'components\unit_XRCGrid.pas'; {$R *.res} @@ -59,5 +61,6 @@ begin Application.CreateForm(TfrmBenchmark, frmBenchmark); Application.CreateForm(TfrmSettings, frmSettings); Application.CreateForm(TfrmSettings, frmSettings); + Application.CreateForm(TedtrProfileTable, edtrProfileTable); Application.Run; end. diff --git a/XRayCalc3.dproj b/XRayCalc3.dproj index ce00a32..745c09e 100644 --- a/XRayCalc3.dproj +++ b/XRayCalc3.dproj @@ -114,7 +114,7 @@ true CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=3.0.0.200;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=3.0.0.0;Comments= Resources\XRayCalc3_Icon.ico - -f "d:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\test_data\Multilayer(4x20).xrcx" -a + -f "d:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\test_data\Mo-B(230314B)_Poly.xrcx" -a PerMonitorV2 @@ -134,9 +134,9 @@ false Resources\XRayCalc3_Icon.ico 3 - 350 - CompanyName=Zhejiang University;FileDescription=$(MSBuildProjectName);FileVersion=3.0.5.350;InternalName=;LegalCopyright=Oleksiy Penkov;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=3.0.4;Comments= - 5 + 360 + CompanyName=Zhejiang University;FileDescription=$(MSBuildProjectName);FileVersion=3.0.6.360;InternalName=;LegalCopyright=Oleksiy Penkov;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=3.0.4;Comments= + 6 PerMonitorV2 @@ -217,6 +217,11 @@
frmSettings
dfm + +
edtrProfileTable
+ dfm +
+ Base diff --git a/XRayCalc3.dproj.local b/XRayCalc3.dproj.local new file mode 100644 index 0000000..c60ac11 --- /dev/null +++ b/XRayCalc3.dproj.local @@ -0,0 +1,91 @@ + + + + 1899.12.30 00:00:00.000.231,D:\DelphiProjects\X-RayCalc2\components\editor_period.pas=D:\DelphiProjects\X-RayCalc2\components\editor_Stack.pas + 1899.12.30 00:00:00.000.582,=D:\DelphiProjects\X-RayCalc2\components\editor_period.pas + 1899.12.30 00:00:00.000.946,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Superobject\XSuperObject.pas= + 1899.12.30 00:00:00.000.017,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Superobject\XSuperObject.pas + 1899.12.30 00:00:00.000.303,=D:\DelphiProjects\X-RayCalc2\forms\frm_RIGraph.pas + 1899.12.30 00:00:00.000.253,=D:\DelphiProjects\X-RayCalc2\math\unit_calc.pas + 1899.12.30 00:00:00.000.917,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\math\unit_LFPSO_Periodic.pas + 1899.12.30 00:00:00.000.125,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\math\unit_LFPSO_Periodic.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\LFPSO\unit_LFPSO_Periodic.pas + 1899.12.30 00:00:00.000.678,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_ProfileFunction.dfm=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_Gradient.dfm + 1899.12.30 00:00:00.000.457,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\components\unti_XRCGrid.pas + 1899.12.30 00:00:00.000.384,D:\DelphiProjects\X-RayCalc2\forms\frm_RIGraph.pas= + 1899.12.30 00:00:00.000.476,D:\DelphiProjects\X-RayCalc2\components\unit_XRCProjectTree.pas=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.973,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\XRayCalc3.dproj=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\XRayCalc2.dproj + 1899.12.30 00:00:00.000.644,=D:\DelphiProjects\X-RayCalc2\components\editor_Substrate.pas + 1899.12.30 00:00:00.000.938,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\math\unit_FitHelpers.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\LFPSO\unit_LFPSO_Helpers.pas + 1899.12.30 00:00:00.000.616,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_NewMaterial.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_MaterialsLibrary.pas + 1899.12.30 00:00:00.000.243,=D:\DelphiProjects\X-RayCalc2\forms\frm_about.pas + 1899.12.30 00:00:00.000.988,=D:\DelphiProjects\X-RayCalc2\components\XRCLayerControl.pas + 1899.12.30 00:00:00.000.747,=D:\DelphiProjects\X-RayCalc2\math\math_globals.pas + 1899.12.30 00:00:00.000.565,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_MaterialsLibrary.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_MList.pas + 1899.12.30 00:00:00.000.427,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\LFPSO\unit_LFPSO_Helpers.pas= + 1899.12.30 00:00:00.000.533,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_Gradient.pas + 1899.12.30 00:00:00.000.333,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\math\unit_SavitzkyGolay.pas + 1899.12.30 00:00:00.000.038,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_ExtensionType.pas + 1899.12.30 00:00:00.000.760,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_JSON.pas + 1899.12.30 00:00:00.000.191,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_MaterialSelector.pas + 1899.12.30 00:00:00.000.627,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas + 1899.12.30 00:00:00.000.345,=D:\DelphiProjects\X-RayCalc2\forms\frm_MList.pas + 1899.12.30 00:00:00.000.932,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\units\unit_Config.pas + 1899.12.30 00:00:00.000.653,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_ProfileTable.dfm=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.dfm + 1899.12.30 00:00:00.000.739,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\components\files_list.pas + 1899.12.30 00:00:00.000.385,D:\DelphiProjects\X-RayCalc2\components\unit_SMessages.pas=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.319,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas + 1899.12.30 00:00:00.000.494,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_HenkeTable.pas + 1899.12.30 00:00:00.000.653,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_ProfileTable.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas + 1899.12.30 00:00:00.000.287,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\LFPSO\unit_LFPSO_Poly.pas + 1899.12.30 00:00:00.000.163,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\LFPSO\unit_LFPSO_Poly.pas= + 1899.12.30 00:00:00.000.612,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\LFPSO\unit_LFPSO_Poly.pas + 1899.12.30 00:00:00.000.182,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas + 1899.12.30 00:00:00.000.131,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas + 1899.12.30 00:00:00.000.006,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas + 1899.12.30 00:00:00.000.229,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas + 1899.12.30 00:00:00.000.441,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas + 1899.12.30 00:00:00.000.879,D:\DelphiProjects\X-RayCalc2\Unit1.pas=D:\DelphiProjects\X-RayCalc2\forms\frm_Limits.pas + 1899.12.30 00:00:00.000.116,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\components\unit_files_list.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\components\files_list.pas + 1899.12.30 00:00:00.000.164,=D:\DelphiProjects\X-RayCalc2\math\unit_materials.pas + 1899.12.30 00:00:00.000.501,=D:\DelphiProjects\X-RayCalc2\editors\editor_proj_item.pas + 1899.12.30 00:00:00.000.332,D:\DelphiProjects\X-RayCalc2\components\unit_XRCStackControl.pas=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.280,=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.266,=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.785,=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.669,=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.175,=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.616,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_NewMaterial.dfm=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_MaterialsLibrary.dfm + 1899.12.30 00:00:00.000.112,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\math\unit_LFPSO_Regular.pas + 1899.12.30 00:00:00.000.603,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\math\unit_LFPSO_Regular.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\LFPSO\unit_LFPSO_Regular.pas + 1899.12.30 00:00:00.000.479,D:\DelphiProjects\X-RayCalc2\math\unit_FitHelpers.pas=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.231,D:\DelphiProjects\X-RayCalc2\components\editor_period.dfm=D:\DelphiProjects\X-RayCalc2\components\editor_Stack.dfm + 1899.12.30 00:00:00.000.069,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_Benchmark.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.pas + 1899.12.30 00:00:00.000.038,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.dfm=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_ExtensionType.dfm + 1899.12.30 00:00:00.000.494,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.dfm=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_HenkeTable.dfm + 1899.12.30 00:00:00.000.760,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.dfm=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_JSON.dfm + 1899.12.30 00:00:00.000.191,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.dfm=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_MaterialSelector.dfm + 1899.12.30 00:00:00.000.539,D:\DelphiProjects\X-RayCalc2\components\unit_XRCLayerControl.pas=D:\DelphiProjects\X-RayCalc2\components\XRCLayerControl.pas + 1899.12.30 00:00:00.000.806,=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.565,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_MaterialsLibrary.dfm=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_MList.dfm + 1899.12.30 00:00:00.000.275,D:\DelphiProjects\X-RayCalc2\math\unit_LFPSO.pas=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.247,D:\DelphiProjects\X-RayCalc2\components\unit_XRCStructure.pas=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.069,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_Benchmark.dfm=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Unit1.dfm + 1899.12.30 00:00:00.000.521,=D:\DelphiProjects\X-RayCalc2\components\editor_Layer.pas + 1899.12.30 00:00:00.000.285,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_settings.pas + 1899.12.30 00:00:00.000.549,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_settings.pas= + 1899.12.30 00:00:00.000.568,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_settings.pas + 1899.12.30 00:00:00.000.114,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\forms\frm_settings.pas + 1899.12.30 00:00:00.000.017,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\components\editor_Substrate.pas= + 1899.12.30 00:00:00.000.364,=D:\DelphiProjects\X-RayCalc2\components\editor_Layer.pas + 1899.12.30 00:00:00.000.422,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\components\unit_XRCGrid.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\components\unti_XRCGrid.pas + 1899.12.30 00:00:00.000.888,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\math\unit_LFPSO_Base.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\LFPSO\unit_LFPSO_Base.pas + 1899.12.30 00:00:00.000.456,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\math\unit_LFPSO_Base.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\math\unit_LFPSO.pas + 1899.12.30 00:00:00.000.534,=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.000,=D:\DelphiProjects\X-RayCalc2\Unit1.pas + 1899.12.30 00:00:00.000.719,D:\DelphiProjects\X-RayCalc2\components\editor_Layer.pas= + 1899.12.30 00:00:00.000.678,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_ProfileFunction.pas=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\editors\editor_Gradient.pas + 1899.12.30 00:00:00.000.879,D:\DelphiProjects\X-RayCalc2\Unit1.dfm=D:\DelphiProjects\X-RayCalc2\forms\frm_Limits.dfm + 1899.12.30 00:00:00.000.910,D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Superobject\XSuperJSON.pas= + 1899.12.30 00:00:00.000.698,=D:\DelphiProjects\X-Ray Calc\X-Ray Calc 3\Superobject\XSuperJSON.pas + + diff --git a/components/XRayCalcVisualControls.dpk b/components/XRayCalcVisualControls.dpk new file mode 100644 index 0000000..957d703 --- /dev/null +++ b/components/XRayCalcVisualControls.dpk @@ -0,0 +1,38 @@ +package XRayCalcVisualControls; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$IMPLICITBUILD ON} + +requires + rtl, + vcl, + RaizeComponentsVcl; + +contains + unit_XRCGrid in 'unit_XRCGrid.pas'; + +end. diff --git a/components/XRayCalcVisualControls.dproj b/components/XRayCalcVisualControls.dproj new file mode 100644 index 0000000..9fb6656 --- /dev/null +++ b/components/XRayCalcVisualControls.dproj @@ -0,0 +1,871 @@ + + + {76B6C4F1-C8DB-4E1F-8F08-2286C45F4B84} + XRayCalcVisualControls.dpk + 19.5 + VCL + True + Debug + Win32 + 1 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + true + true + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + All + XRayCalcVisualControls + + + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + Debug + true + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + 1033 + vcl;rtl;RaizeComponentsVcl;$(DCC_UsePackage) + + + vcl;rtl;RaizeComponentsVcl;$(DCC_UsePackage) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + true + true + + + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + + + + + + Base + + + Cfg_1 + Base + + + Cfg_2 + Base + + + + Delphi.Personality.12 + Package + + + + XRayCalcVisualControls.dpk + + + + + + true + + + + + true + + + + + true + + + + + XRayCalcVisualControls.bpl + true + + + + + 1 + + + 0 + + + + + classes + 64 + + + classes + 64 + + + + + res\xml + 1 + + + res\xml + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\armeabi + 1 + + + library\lib\armeabi + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + library\lib\mips + 1 + + + library\lib\mips + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\values-v21 + 1 + + + res\values-v21 + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + res\drawable + 1 + + + res\drawable + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-ldpi + 1 + + + res\drawable-ldpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-mdpi + 1 + + + res\drawable-mdpi + 1 + + + + + res\drawable-hdpi + 1 + + + res\drawable-hdpi + 1 + + + + + res\drawable-xhdpi + 1 + + + res\drawable-xhdpi + 1 + + + + + res\drawable-xxhdpi + 1 + + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + + + + res\drawable-small + 1 + + + res\drawable-small + 1 + + + + + res\drawable-normal + 1 + + + res\drawable-normal + 1 + + + + + res\drawable-large + 1 + + + res\drawable-large + 1 + + + + + res\drawable-xlarge + 1 + + + res\drawable-xlarge + 1 + + + + + res\values + 1 + + + res\values + 1 + + + + + 1 + + + 1 + + + 0 + + + + + 1 + .framework + + + 1 + .framework + + + 1 + .framework + + + 0 + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .dll;.bpl + + + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 0 + .bpl + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 1 + + + 1 + + + + + + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + Contents\Resources + 1 + + + + + library\lib\armeabi-v7a + 1 + + + library\lib\arm64-v8a + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 1 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + + + + 1 + + + 1 + + + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + Assets + 1 + + + Assets + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + + + + + + + + + + + + True + False + + + 12 + + + + + diff --git a/components/unit_SMessages.pas b/components/unit_SMessages.pas index bdbfe9d..d900445 100644 --- a/components/unit_SMessages.pas +++ b/components/unit_SMessages.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit unit_SMessages; interface diff --git a/components/unit_XRCGrid.pas b/components/unit_XRCGrid.pas new file mode 100644 index 0000000..7b12d9b --- /dev/null +++ b/components/unit_XRCGrid.pas @@ -0,0 +1,93 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + +unit unit_XRCGrid; + +interface + +uses + SysUtils, Classes, VCL.Controls, VCL.ExtCtrls, RzGrids, VCL.StdCtrls; + +type + + TXRCGrid = class (TRzStringGrid) + private + FAutoFit: Boolean; + + procedure SetAutofit(const Value: Boolean); + function GetText: string; + procedure SetText(const Value: string); + + public + procedure AutoSizeCol(Column: integer); + procedure SaveToFile(const FileName: String); + published + property AutoFit: Boolean read FAutoFit write SetAutofit; + property Text: string read GetText write SetText; + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('X-RayCalcComponents', [TXRCGrid]); +end; + +{ TXRCGrid } + +procedure TXRCGrid.SetAutofit(const Value: Boolean); +begin + FAutoFit := Value; +end; + +procedure TXRCGrid.SetText(const Value: string); +begin + +end; + +procedure TXRCGrid.AutoSizeCol(Column: integer); +var + i, W, WMax: integer; +begin + WMax := 0; + for i := 0 to (Self.RowCount - 1) do begin + W := Self.Canvas.TextWidth(Self.Cells[Column, i]); + if W > WMax then + WMax := W; + end; + Self.ColWidths[Column] := WMax + 10; +end; + +function TXRCGrid.GetText: string; +var + x, y: Integer; +begin + Result := ''; + for y := 0 to Self.RowCount-1 do + begin + for x := 0 to Self.ColCount - 2 do + Result := Result + Self.Cells[x, y] + #9; + + Result := Result + Self.Cells[Self.ColCount - 1, y] + #13#10; + end; +end; + +procedure TXRCGrid.SaveToFile(const FileName: String); +var + F: TextFile; +begin + AssignFile(F, FileName); + Rewrite(F); + Write(F, GetText); + CloseFile(F); +end; + +end. diff --git a/components/unit_XRCLayerControl.pas b/components/unit_XRCLayerControl.pas index 7e72fb3..55409ce 100644 --- a/components/unit_XRCLayerControl.pas +++ b/components/unit_XRCLayerControl.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit unit_XRCLayerControl; interface diff --git a/components/unit_XRCProjectTree.pas b/components/unit_XRCProjectTree.pas index 6a62483..1a07df7 100644 --- a/components/unit_XRCProjectTree.pas +++ b/components/unit_XRCProjectTree.pas @@ -1,4 +1,13 @@ -unit unit_XRCProjectTree; +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + +unit unit_XRCProjectTree; interface @@ -52,7 +61,6 @@ TXRCProjectTree = class (TVirtualStringTree) implementation - { TXRCProjectTree } constructor TXRCProjectTree.Create(AOwner: TComponent); @@ -145,7 +153,7 @@ function TXRCProjectTree.ProfileAttached(Node: PVirtualNode): Boolean; begin repeat Data := GetNodeData(Node); - if Data.ExtType = etArb then + if Data.ExtType = etTable then begin Result := True; Break; @@ -330,10 +338,26 @@ procedure TXRCProjectTree.ProjectLoadNode(Sender: TBaseVirtualTree; Data.Data := GetString; end; - end; + 5: begin + Stream.Read(Data.Enabled, SizeOf(Data.Enabled)); + Stream.Read(Data.ExtType, SizeOf(Data.ExtType)); + Stream.Read(Data.LayerID, SizeOf(Data.LayerID)); + Stream.Read(Data.StackID, SizeOf(Data.StackID)); + Stream.Read(Data.Form, SizeOf(Data.Form)); + Stream.Read(Data.Subj, SizeOf(Data.Subj)); + + if (Data.Group = gtModel) and (Data.RowType = prExtension) then + for I := 1 to 10 do + Stream.Read(Data.Poly[i], SizeOf(Data.Poly[i])); + + if (Data.Group = gtModel) and (Data.RowType = prItem) then + Data.Data := GetString; + end; + end; // case p := pos('}}', Data.Data); - Data.Data := copy(Data.Data, 1, p + 1); + if p <> Length(Data.Data) - 1 then + Data.Data := copy(Data.Data, 1, p + 1); end; procedure TXRCProjectTree.ProjectPaintText(Sender: TBaseVirtualTree; @@ -382,9 +406,12 @@ procedure TXRCProjectTree.ProjectSaveNode(Sender: TBaseVirtualTree; Stream.Write(Data.StackID, SizeOf(Data.StackID)); Stream.Write(Data.Form, SizeOf(Data.Form)); Stream.Write(Data.Subj, SizeOf(Data.Subj)); - for I := 1 to 10 do - Stream.Write(Data.Poly[i], SizeOf(Data.Poly[i])); - WriteString(Data.Data); + + if (Data.Group = gtModel) and (Data.RowType = prExtension) then + for I := 1 to 10 do + Stream.Write(Data.Poly[i], SizeOf(Data.Poly[i])); + if (Data.Group = gtModel) and (Data.RowType = prItem) then + WriteString(Data.Data); end; end. diff --git a/components/unit_XRCStackControl.pas b/components/unit_XRCStackControl.pas index b714585..4c703ad 100644 --- a/components/unit_XRCStackControl.pas +++ b/components/unit_XRCStackControl.pas @@ -1,4 +1,13 @@ -unit unit_XRCStackControl; +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + +unit unit_XRCStackControl; interface @@ -101,7 +110,8 @@ function TXRCStack.AddLayer(Data: TLayerData; Pos: integer): integer; FLayers[Pos] := TXRCLayerControl.Create(Self, 0, Data); FLayers[Pos].Parent := Self; - FLayers[Pos].Pairable := FN > 1; + FLayers[Pos].EnableLinking := FN > 1; + FLayers[Pos].Pairable := FEnablePairing; lblLayers.Top := 1; ClientHeight := 45 + (Count + 1) * (FLayers[Pos].Height + 3); diff --git a/components/unit_XRCStructure.pas b/components/unit_XRCStructure.pas index bf4db2b..0aff926 100644 --- a/components/unit_XRCStructure.pas +++ b/components/unit_XRCStructure.pas @@ -1,4 +1,12 @@ -unit unit_XRCStructure; +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) +unit unit_XRCStructure; interface @@ -36,6 +44,7 @@ TXRCStructure = class (TRzPanel) FClipBoardLayers: TLayersData; JLayer, JStack, JSub: TJSONValue; FPeriodicMode: boolean; + FRealHeight: Integer; procedure RealignStacks; procedure SetIncrement(const Value: single); @@ -92,6 +101,7 @@ TXRCStructure = class (TRzPanel) function GetStackSize(const ID: Integer): Integer; // procedure EnablePairing; function IfValidLayerSelected: Boolean; inline; + property RealHeight: Integer read FRealHeight; published property Increment: single read FIncrement write SetIncrement; end; @@ -127,7 +137,8 @@ procedure TXRCStructure.RealignStacks; for I := 0 to Count do FStacks[i].Align := alNone; - MaxHeigh := 20; + MaxHeigh := Header.Height; + for I := 0 to Count do begin FStacks[i].Top := MaxHeigh + 5; @@ -138,7 +149,7 @@ procedure TXRCStructure.RealignStacks; Substrate.Top := ClientHeight - 5; Substrate.Align := alTop; - Self.ClientHeight := MaxHeigh + Substrate.Height + 100; + FRealHeight := MaxHeigh + Substrate.ClientHeight; Visible := FVisibility; end; @@ -425,7 +436,8 @@ function TXRCStructure.Model(const ExpandProfiles: Boolean): TLayeredModel; begin for k := 0 to High(StackLayers) do for p := 1 to 3 do - StackLayers[k].P[p].V := StackLayers[k].PP[p][j - 1]; + if not StackLayers[k].P[p].Paired then + StackLayers[k].P[p].V := StackLayers[k].PP[p][j - 1]; end; Result.AddLayers(i, StackLayers); end; @@ -531,7 +543,7 @@ procedure TXRCStructure.UpdateInterfaceP(const Inp: TFitStructure); begin for I := 0 to High(FStacks) do begin - for j := 0 to High(FStacks[i].LayerData) do + for j := 0 to High(FStacks[i].Layers) do begin Data.Material := Inp.Stacks[i].Layers[j].Material; Data.P := Inp.Stacks[i].Layers[j].P; @@ -542,17 +554,24 @@ procedure TXRCStructure.UpdateInterfaceP(const Inp: TFitStructure); procedure TXRCStructure.UpdateProfiles(const Inp: TLayeredModel); var - i, j, SID, LID: integer; + i, j, p, SID, LID: integer; begin for I := 0 to High(FStacks) do for j := 0 to High(FStacks[i].Layers) do - FStacks[i].Layers[j].Data.ClearProfiles; + for p := 1 to 3 do + FStacks[i].Layers[j].Data.ClearProfiles(p); for I := 1 to High(Inp.Layers) - 1 do begin SID := Inp.Layers[i].StackID; LID := Inp.Layers[i].LayerID; - Structure.FStacks[SID].Layers[LID].Data.AddProfilePoint(Inp.Layers[i].L, Inp.Layers[i].s, Inp.Layers[i].ro); + for p := 1 to 3 do + if not Structure.FStacks[SID].Layers[LID].Data.P[p].Paired then + case p of + 1: Structure.FStacks[SID].Layers[LID].Data.AddProfilePoint(Inp.Layers[i].L, 1); + 2: Structure.FStacks[SID].Layers[LID].Data.AddProfilePoint(Inp.Layers[i].s, 2); + 3: Structure.FStacks[SID].Layers[LID].Data.AddProfilePoint(Inp.Layers[i].ro, 3); + end; end; end; @@ -633,7 +652,7 @@ function TXRCStructure.ToString: string; JLayer.AddPair(UpperCase(PAlias[p]) + 'P', Data.P[p].Paired); JLayer.AddPair(UpperCase(PAlias[p]) + 'min', Data.P[p].min); JLayer.AddPair(UpperCase(PAlias[p]) + 'max', Data.P[p].max); - Profile := Data.ProfileToSrting(ptH); + Profile := Data.ProfileToSrting(TParameterType(p - 1)); JLayer.AddPair('Profile' + UpperCase(PAlias[p]), Profile); end; @@ -755,7 +774,7 @@ procedure TXRCStructure.FromString(const S: string); PS := FindStrValue('Profile' + UpperCase(PAlias[p])); if PS <> '' then begin - Data.ClearProfiles; + Data.ClearProfiles(p); Data.ProfileFromSrting(p, PS); end; @@ -780,6 +799,7 @@ procedure TXRCStructure.GetLayersList(const ID: integer; List: TStrings); List.Add(FStacks[ID].LayerData[j].Material); end; + function TXRCStructure.GetSelectedLayer: Integer; begin Result := FSelectedLayer diff --git a/editors/editor_HenkeTable.dfm b/editors/editor_HenkeTable.dfm index 8dc871b..27ae12a 100644 --- a/editors/editor_HenkeTable.dfm +++ b/editors/editor_HenkeTable.dfm @@ -2,7 +2,7 @@ object edtrHenkeTable: TedtrHenkeTable Left = 0 Top = 0 Caption = 'Edit Henke table' - ClientHeight = 561 + ClientHeight = 557 ClientWidth = 860 Color = clBtnFace Font.Charset = DEFAULT_CHARSET @@ -18,11 +18,12 @@ object edtrHenkeTable: TedtrHenkeTable Left = 3 Top = 3 Width = 326 - Height = 536 + Height = 532 Align = alLeft BorderOuter = fsFlatRounded Color = 15987699 TabOrder = 0 + ExplicitHeight = 531 object Label1: TLabel Left = 11 Top = 10 @@ -90,7 +91,7 @@ object edtrHenkeTable: TedtrHenkeTable Left = 5 Top = 82 Width = 316 - Height = 450 + Height = 445 Margins.Top = 80 Align = alClient ColCount = 4 @@ -101,7 +102,7 @@ object edtrHenkeTable: TedtrHenkeTable Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goFixedRowDefAlign] TabOrder = 3 OnSetEditText = FGridSetEditText - ExplicitHeight = 449 + ExplicitHeight = 444 end object btnSave: TRzBitBtn Left = 241 @@ -113,7 +114,7 @@ object edtrHenkeTable: TedtrHenkeTable end object rzstsbr1: TRzStatusBar Left = 0 - Top = 542 + Top = 538 Width = 860 Height = 19 BorderInner = fsNone @@ -122,24 +123,32 @@ object edtrHenkeTable: TedtrHenkeTable BorderWidth = 0 Color = 15987699 TabOrder = 1 + ExplicitTop = 537 + ExplicitWidth = 856 end object rzpnl2: TRzPanel AlignWithMargins = True Left = 335 Top = 3 Width = 522 - Height = 536 + Height = 532 Align = alClient BorderOuter = fsFlatRounded Color = 15987699 TabOrder = 2 + ExplicitWidth = 518 + ExplicitHeight = 531 object Chart: TChart AlignWithMargins = True Left = 5 Top = 5 - Width = 516 - Height = 527 + Width = 512 + Height = 522 Cursor = crCross + Legend.Alignment = laTop + Legend.ResizeChart = False + Legend.TopPos = 3 + Legend.VertMargin = 3 Title.Text.Strings = ( 'TChart') Title.Visible = False @@ -147,8 +156,8 @@ object edtrHenkeTable: TedtrHenkeTable Align = alClient Color = clWhite TabOrder = 0 - ExplicitWidth = 512 - ExplicitHeight = 526 + ExplicitWidth = 508 + ExplicitHeight = 521 DefaultCanvas = 'TGDIPlusCanvas' ColorPaletteIndex = 13 object SeriesF1: TLineSeries diff --git a/editors/editor_HenkeTable.pas b/editors/editor_HenkeTable.pas index 7607c62..05397fc 100644 --- a/editors/editor_HenkeTable.pas +++ b/editors/editor_HenkeTable.pas @@ -1,4 +1,13 @@ -unit editor_HenkeTable; +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + +unit editor_HenkeTable; interface diff --git a/editors/editor_JSON.dfm b/editors/editor_JSON.dfm index 4eae7eb..22adb25 100644 --- a/editors/editor_JSON.dfm +++ b/editors/editor_JSON.dfm @@ -22,8 +22,8 @@ object frmJsonEditor: TfrmJsonEditor BorderWidth = 0 Color = 15987699 TabOrder = 0 - ExplicitTop = 651 - ExplicitWidth = 799 + ExplicitTop = 649 + ExplicitWidth = 791 end object Editor: TSynEdit Left = 0 @@ -67,8 +67,8 @@ object frmJsonEditor: TfrmJsonEditor Lines.Strings = ( 'Editor') SelectedColor.Alpha = 0.400000005960464500 - ExplicitWidth = 799 - ExplicitHeight = 622 + ExplicitWidth = 791 + ExplicitHeight = 620 end object MainToolBar: TRzToolbar Left = 0 @@ -81,7 +81,7 @@ object frmJsonEditor: TfrmJsonEditor BorderWidth = 0 Color = 15987699 TabOrder = 2 - ExplicitWidth = 799 + ExplicitWidth = 791 ToolbarControls = ( btnSave) object btnSave: TRzBitBtn diff --git a/editors/editor_JSON.pas b/editors/editor_JSON.pas index b09e602..063d30b 100644 --- a/editors/editor_JSON.pas +++ b/editors/editor_JSON.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit editor_JSON; interface diff --git a/editors/editor_ProfileFunction.dfm b/editors/editor_ProfileFunction.dfm index cc5e5e1..3b1c01d 100644 --- a/editors/editor_ProfileFunction.dfm +++ b/editors/editor_ProfileFunction.dfm @@ -31,11 +31,13 @@ object edtrProfileFunction: TedtrProfileFunction BorderOuter = fsFlatRounded Color = 15987699 TabOrder = 0 + ExplicitTop = 275 + ExplicitWidth = 820 DesignSize = ( 828 41) object btnOK: TRzBitBtn - Left = 737 + Left = 729 Top = 10 Width = 66 Alignment = taRightJustify @@ -44,7 +46,7 @@ object edtrProfileFunction: TedtrProfileFunction TabStop = False OnClick = btnOKClick Kind = bkOK - ExplicitLeft = 745 + ExplicitLeft = 721 end object btnCancel: TRzBitBtn Left = 9 @@ -66,6 +68,8 @@ object edtrProfileFunction: TedtrProfileFunction BorderOuter = fsFlatRounded Color = 15987699 TabOrder = 1 + ExplicitWidth = 820 + ExplicitHeight = 266 object Label1: TLabel Left = 9 Top = 10 diff --git a/editors/editor_ProfileFunction.pas b/editors/editor_ProfileFunction.pas index 60a2888..2ed104f 100644 --- a/editors/editor_ProfileFunction.pas +++ b/editors/editor_ProfileFunction.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit editor_ProfileFunction; interface diff --git a/editors/editor_ProfileTable.dfm b/editors/editor_ProfileTable.dfm new file mode 100644 index 0000000..1bcb40f --- /dev/null +++ b/editors/editor_ProfileTable.dfm @@ -0,0 +1,208 @@ +object edtrProfileTable: TedtrProfileTable + Left = 0 + Top = 0 + Caption = 'Table Editor' + ClientHeight = 678 + ClientWidth = 977 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = 'Segoe UI' + Font.Style = [] + OnCreate = FormCreate + OnShow = FormShow + TextHeight = 15 + object RzPanel2: TRzPanel + AlignWithMargins = True + Left = 3 + Top = 634 + Width = 971 + Height = 41 + Align = alBottom + BorderOuter = fsFlatRounded + Color = 15987699 + TabOrder = 0 + ExplicitTop = 633 + ExplicitWidth = 967 + DesignSize = ( + 971 + 41) + object btnOK: TRzBitBtn + Left = 885 + Top = 10 + Width = 66 + Alignment = taRightJustify + Anchors = [akTop, akRight] + TabOrder = 0 + TabStop = False + Kind = bkOK + ExplicitLeft = 881 + end + object btnCancel: TRzBitBtn + Left = 9 + Top = 10 + Width = 72 + Alignment = taRightJustify + TabOrder = 1 + TabStop = False + Kind = bkCancel + end + end + object RzPanel1: TRzPanel + AlignWithMargins = True + Left = 3 + Top = 3 + Width = 971 + Height = 46 + Align = alTop + BorderOuter = fsFlatRounded + Color = 15987699 + TabOrder = 1 + ExplicitWidth = 967 + object btnSave: TRzBitBtn + Left = 113 + Top = 10 + Caption = 'Save' + TabOrder = 0 + OnClick = btnSaveClick + end + object btnCopy: TRzBitBtn + Left = 9 + Top = 10 + Caption = 'Copy' + TabOrder = 1 + OnClick = btnCopyClick + end + end + object Pages: TRzPageControl + Left = 0 + Top = 52 + Width = 977 + Height = 579 + Hint = '' + ActivePage = tsThickness + Align = alClient + TabIndex = 0 + TabOrder = 2 + ExplicitWidth = 973 + ExplicitHeight = 578 + FixedDimension = 21 + object tsThickness: TRzTabSheet + Caption = 'Thickness' + ExplicitWidth = 969 + ExplicitHeight = 553 + object chrtThickness: TChart + AlignWithMargins = True + Left = 334 + Top = 3 + Width = 636 + Height = 548 + Cursor = crCross + Title.Text.Strings = ( + 'TChart') + Title.Visible = False + LeftAxis.MaximumOffset = 20 + LeftAxis.MinimumOffset = 20 + View3D = False + Align = alClient + TabOrder = 0 + ExplicitLeft = 257 + ExplicitWidth = 709 + ExplicitHeight = 547 + DefaultCanvas = 'TGDIPlusCanvas' + ColorPaletteIndex = 13 + end + object grdThickness: TXRCGrid + AlignWithMargins = True + Left = 3 + Top = 3 + Height = 548 + Align = alLeft + TabOrder = 1 + AutoFit = False + Text = #9#9#9#9 + ExplicitLeft = 80 + ExplicitTop = 136 + ExplicitHeight = 125 + end + end + object tsRoughness: TRzTabSheet + Caption = 'Roughness' + object chrtRougness: TChart + AlignWithMargins = True + Left = 334 + Top = 3 + Width = 636 + Height = 548 + Cursor = crCross + Title.Text.Strings = ( + 'TChart') + Title.Visible = False + LeftAxis.MaximumOffset = 20 + LeftAxis.MinimumOffset = 20 + View3D = False + Align = alClient + TabOrder = 0 + ExplicitLeft = 257 + ExplicitWidth = 713 + DefaultCanvas = 'TGDIPlusCanvas' + ColorPaletteIndex = 13 + end + object grdRoughness: TXRCGrid + AlignWithMargins = True + Left = 3 + Top = 3 + Height = 548 + Align = alLeft + TabOrder = 1 + AutoFit = False + Text = #9#9#9#9 + ExplicitLeft = 11 + ExplicitTop = 6 + end + end + object tsDensity: TRzTabSheet + Caption = 'Density' + object chrtDensity: TChart + AlignWithMargins = True + Left = 334 + Top = 3 + Width = 636 + Height = 548 + Cursor = crCross + Title.Text.Strings = ( + 'TChart') + Title.Visible = False + LeftAxis.MaximumOffset = 20 + LeftAxis.MinimumOffset = 20 + View3D = False + Align = alClient + TabOrder = 0 + ExplicitLeft = 257 + ExplicitWidth = 713 + DefaultCanvas = 'TGDIPlusCanvas' + ColorPaletteIndex = 13 + end + object grdDensity: TXRCGrid + AlignWithMargins = True + Left = 3 + Top = 3 + Height = 548 + Align = alLeft + TabOrder = 1 + AutoFit = False + Text = #9#9#9#9 + ExplicitLeft = 11 + ExplicitTop = 6 + end + end + end + object dlgSaveResult: TSaveDialog + DefaultExt = 'dat' + Filter = 'ASCII data|*.dat|ASCII Text|*.txt' + Title = 'Save result to file' + Left = 416 + Top = 408 + end +end diff --git a/editors/editor_ProfileTable.pas b/editors/editor_ProfileTable.pas new file mode 100644 index 0000000..155709b --- /dev/null +++ b/editors/editor_ProfileTable.pas @@ -0,0 +1,212 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + +unit editor_ProfileTable; + +interface + +uses + Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VclTee.TeeGDIPlus, RzButton, + VCLTee.TeEngine, VCLTee.Series, VCLTee.TeeProcs, VCLTee.Chart, Vcl.Grids, + RzGrids, Vcl.StdCtrls, Vcl.ExtCtrls, RzPanel, unit_types, unit_XRCStructure, + RzTabs, unit_XRCGrid; + +type + + TSeriesList = array of TLineSeries; + + TedtrProfileTable = class(TForm) + RzPanel2: TRzPanel; + btnOK: TRzBitBtn; + btnCancel: TRzBitBtn; + RzPanel1: TRzPanel; + Pages: TRzPageControl; + tsThickness: TRzTabSheet; + chrtThickness: TChart; + tsRoughness: TRzTabSheet; + tsDensity: TRzTabSheet; + chrtRougness: TChart; + chrtDensity: TChart; + grdThickness: TXRCGrid; + grdDensity: TXRCGrid; + grdRoughness: TXRCGrid; + btnSave: TRzBitBtn; + btnCopy: TRzBitBtn; + dlgSaveResult: TSaveDialog; + procedure FormShow(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure btnCopyClick(Sender: TObject); + procedure btnSaveClick(Sender: TObject); + private + FStructure: TXRCStructure; + FData: PProjectData; + + Charts: array [1..3] of TChart; + Grids : array [1..3] of TXRCGrid; + Series: array [1..3] of TSeriesList; + + LastCol: array [1..3] of Integer; + + { Private declarations } + procedure PlotProfiles; + procedure PlotProfile(const Data: TFloatArray; ChartIndex: integer); + procedure AddCurve(const Title: string; ChartIndex: integer); + procedure PrepareGrids; + procedure FillGrids(const Data: TFloatArray; GridIndex: integer); + procedure ClearCharts; + + public + { Public declarations } + property Data: PProjectData read FData write FData; + property Structure: TXRCStructure write FStructure; + end; + +var + edtrProfileTable: TedtrProfileTable; + +implementation + +uses + Vcl.Clipbrd; + +{$R *.dfm} + +procedure TedtrProfileTable.FormCreate(Sender: TObject); +begin + Charts[1] := chrtThickness; + Charts[2] := chrtRougness; + Charts[3] := chrtDensity; + + Grids[1] := grdThickness; + Grids[2] := grdRoughness; + Grids[3] := grdDensity; +end; + +procedure TedtrProfileTable.PrepareGrids; +begin + Grids[1].ColCount := 2; + Grids[1].RowCount := 1; + + Grids[2].ColCount := 2; + Grids[2].RowCount := 1; + + + Grids[3].ColCount := 2; + Grids[3].RowCount := 1; + + Grids[1].Cells[0, 0] := 'N'; + Grids[1].Cells[0, 0] := 'N'; + + Grids[2].Cells[0, 0] := 'N'; + + Grids[3].Cells[0, 0] := 'N'; + + LastCol[1] := 1; + LastCol[2] := 1; + LastCol[3] := 1; +end; + +procedure TedtrProfileTable.FormShow(Sender: TObject); +begin + ClearCharts; + PrepareGrids; + PlotProfiles; +end; + + +procedure TedtrProfileTable.FillGrids(const Data: TFloatArray; GridIndex: integer); +var + n: Integer; +begin + Grids[GridIndex].ColCount := LastCol[GridIndex] + 1; + Grids[GridIndex].RowCount := Length(Data) + 1; + Grids[GridIndex].Cells[LastCol[GridIndex], 0] := Series[GridIndex][High(Series[GridIndex])].Title; + + for n := 0 to High(Data) do + begin + Grids[GridIndex].Cells[0, n + 1] := IntToStr(n + 1); + Grids[GridIndex].Cells[LastCol[GridIndex], n + 1] := Format('%*.*f',[5, 4, Data[n]]) + end; + Inc(LastCol[GridIndex]); + Grids[GridIndex].Update; +end; + + +procedure TedtrProfileTable.PlotProfile(const Data: TFloatArray; ChartIndex: integer); +var + n, SeriesIndex: Integer; +begin + SeriesIndex := High(Series[ChartIndex]); + Series[ChartIndex][SeriesIndex].Clear; + + for n := 0 to High(Data) do + Series[ChartIndex][SeriesIndex].AddXY(n + 1, Data[n]); +end; + +procedure TedtrProfileTable.btnCopyClick(Sender: TObject); +begin + Clipboard.AsText := Grids[Pages.ActivePageIndex + 1].Text; +end; + +procedure TedtrProfileTable.btnSaveClick(Sender: TObject); +begin + if dlgSaveResult.Execute then + Grids[Pages.ActivePageIndex + 1].SaveToFile(dlgSaveResult.FileName); +end; + +procedure TedtrProfileTable.ClearCharts; +begin + Charts[1].SeriesList.Clear; + SetLength(Series[1], 0); + + Charts[2].SeriesList.Clear; + SetLength(Series[2], 0); + + Charts[3].SeriesList.Clear; + SetLength(Series[3], 0); +end; + +procedure TedtrProfileTable.PlotProfiles; +var + i, j, p: Integer; +begin + + + for I := 0 to High(FStructure.Stacks) do + for j := 0 to High(FStructure.Stacks[i].Layers) do + for p := 1 to 3 do + if (FStructure.Stacks[i].N > 1) and not FStructure.Stacks[i].Layers[j].Data.P[p].Paired then + begin + AddCurve(FStructure.Stacks[i].Layers[j].Data.Material, p); + PlotProfile(FStructure.Stacks[i].Layers[j].Data.PP[p], p); + FillGrids(FStructure.Stacks[i].Layers[j].Data.PP[p], p); + end; + + Charts[1].Update; + Charts[2].Update; + Charts[3].Update; +end; + +procedure TedtrProfileTable.AddCurve; +var + Count: integer; +begin + Count := Length(Series[ChartIndex]); + SetLength(Series[ChartIndex], Count + 1); + Series[ChartIndex][Count] := TLineSeries.Create(Charts[ChartIndex]); + Series[ChartIndex][Count].ParentChart := Charts[ChartIndex]; + Series[ChartIndex][Count].Title := Title; + Series[ChartIndex][Count] .LinePen.Width := 3; + Series[ChartIndex][Count] .Stairs := True; + Series[ChartIndex][Count] .Pointer.Visible := True; + Series[ChartIndex][Count] .Pointer.Size := 4; +end; + +end. diff --git a/forms/frm_Benchmark.dfm b/forms/frm_Benchmark.dfm index 9b0dfe6..4289b39 100644 --- a/forms/frm_Benchmark.dfm +++ b/forms/frm_Benchmark.dfm @@ -25,8 +25,8 @@ object frmBenchmark: TfrmBenchmark BorderWidth = 2 Color = 15987699 TabOrder = 0 - ExplicitWidth = 993 - ExplicitHeight = 430 + ExplicitWidth = 977 + ExplicitHeight = 391 object BitBtn1: TBitBtn Left = 896 Top = 363 @@ -36,7 +36,7 @@ object frmBenchmark: TfrmBenchmark TabOrder = 0 OnClick = BitBtn1Click end - object Grid: TStringGrid + object Grid: TXRCGrid AlignWithMargins = True Left = 7 Top = 7 @@ -44,14 +44,11 @@ object frmBenchmark: TfrmBenchmark Height = 342 Margins.Bottom = 50 Align = alClient - ColCount = 6 - DefaultColWidth = 50 - FixedCols = 0 - RowCount = 2 TabOrder = 1 - ExplicitTop = 54 - ExplicitWidth = 979 - ExplicitHeight = 322 + AutoFit = False + Text = #9#9#9#9 + ExplicitWidth = 963 + ExplicitHeight = 330 end end end diff --git a/forms/frm_Benchmark.pas b/forms/frm_Benchmark.pas index 594c30d..b455f8d 100644 --- a/forms/frm_Benchmark.pas +++ b/forms/frm_Benchmark.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit frm_Benchmark; interface @@ -5,18 +14,16 @@ interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.Grids, Vcl.StdCtrls, - Vcl.Buttons, RzPanel; + Vcl.Buttons, RzPanel, RzGrids, unit_XRCGrid; type TfrmBenchmark = class(TForm) RzPanel1: TRzPanel; BitBtn1: TBitBtn; - Grid: TStringGrid; + Grid: TXRCGrid; procedure BitBtn1Click(Sender: TObject); private FLine: Integer; - procedure AutoSizeCol(Grid: TStringGrid; Column: integer); - procedure StringGrid2File(StringGrid: TStringGrid; FileName: String); { Private declarations } public { Public declarations } @@ -34,46 +41,13 @@ implementation {$R *.dfm} -procedure TfrmBenchmark.StringGrid2File(StringGrid: TStringGrid; FileName: String); -var - F: TextFile; - x, y: Integer; - S: string; -begin - AssignFile(F, FileName); - Rewrite(F); - for y := 0 to StringGrid.RowCount-1 do - begin - S := StringGrid.Cells[0, y]; - for x := 1 to StringGrid.ColCount-1 do - S := S + #9 + StringGrid.Cells[x, y]; - - Writeln(F, S); - end; - CloseFile(F); -end; - - -procedure TfrmBenchmark.AutoSizeCol(Grid: TStringGrid; -Column: integer); -var - i, W, WMax: integer; -begin - WMax := 0; - for i := 0 to (Grid.RowCount - 1) do begin - W := Grid.Canvas.TextWidth(Grid.Cells[Column, i]); - if W > WMax then - WMax := W; - end; - Grid.ColWidths[Column] := WMax + 10; -end; procedure TfrmBenchmark.AddFile(const Name: string); begin Grid.RowCount := Grid.RowCount + 1; FLine := Grid.RowCount - 1; Grid.Cells[0, FLine] := Name; - AutoSizeCol(Grid, 0); + Grid.AutoSizeCol(0); end; procedure TfrmBenchmark.AddValue(const n: integer; Val: string); @@ -88,7 +62,7 @@ procedure TfrmBenchmark.BitBtn1Click(Sender: TObject); procedure TfrmBenchmark.CalcStats; begin - StringGrid2File(Grid, 'benchmark.dat'); + Grid.SaveToFile('benchmark.dat'); end; procedure TfrmBenchmark.Clear; diff --git a/forms/frm_ExtensionType.dfm b/forms/frm_ExtensionType.dfm index 3aab0c4..eb8a610 100644 --- a/forms/frm_ExtensionType.dfm +++ b/forms/frm_ExtensionType.dfm @@ -29,15 +29,15 @@ object frmExtensionSelector: TfrmExtensionSelector Margins.Bottom = 50 Align = alClient TabOrder = 1 - ExplicitWidth = 480 - ExplicitHeight = 219 + ExplicitWidth = 472 + ExplicitHeight = 217 DesignSize = ( 476 218) object txtGradient: TLabel Left = 88 Top = 49 - Width = 261 + Width = 253 Height = 26 Anchors = [akLeft, akTop, akRight] AutoSize = False @@ -48,7 +48,7 @@ object frmExtensionSelector: TfrmExtensionSelector object txtUnregister: TLabel Left = 88 Top = 119 - Width = 317 + Width = 309 Height = 51 Anchors = [akLeft, akTop, akRight] AutoSize = False diff --git a/forms/frm_ExtensionType.pas b/forms/frm_ExtensionType.pas index dd98e19..82e9dcc 100644 --- a/forms/frm_ExtensionType.pas +++ b/forms/frm_ExtensionType.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit frm_ExtensionType; interface @@ -94,7 +103,7 @@ function SelectExtensionTypeAction: TExtentionType; if mrGradient = vistaDlg.ModalResult then Result := etFunction else if mrProfile = vistaDlg.ModalResult then - Result := etArb + Result := etTable else if mrRoughness = vistaDlg.ModalResult then Result := etRough; end; @@ -111,7 +120,7 @@ function SelectExtensionTypeAction: TExtentionType; if xpDlg.rbGradient.Checked then Result := etFunction else if xpDlg.rbProfile.Checked then - Result := etArb + Result := etTable end; finally xpDlg.Free; diff --git a/forms/frm_Limits.dfm b/forms/frm_Limits.dfm index ee9ffd5..7e47010 100644 --- a/forms/frm_Limits.dfm +++ b/forms/frm_Limits.dfm @@ -23,8 +23,8 @@ object frmLimits: TfrmLimits BorderOuter = fsFlatRounded Color = 15987699 TabOrder = 0 - ExplicitWidth = 561 - ExplicitHeight = 424 + ExplicitWidth = 549 + ExplicitHeight = 422 object Label13: TLabel Left = 19 Top = 393 @@ -68,8 +68,8 @@ object frmLimits: TfrmLimits AlignWithMargins = True Left = 5 Top = 5 - Width = 547 - Height = 367 + Width = 543 + Height = 366 Margins.Bottom = 50 Align = alClient Columns = < @@ -110,14 +110,14 @@ object frmLimits: TfrmLimits ColumnClick = False GridLines = True GroupView = True - Items.ItemData = {} ReadOnly = True ShowWorkAreas = True TabOrder = 0 ViewStyle = vsReport FillLastColumn = False OnClick = ListViewClick - ExplicitWidth = 551 + ExplicitWidth = 547 + ExplicitHeight = 365 end object edFdH: TEdit Left = 40 @@ -184,10 +184,10 @@ object frmLimits: TfrmLimits BorderOuter = fsFlatRounded Color = 15987699 TabOrder = 1 - ExplicitTop = 434 - ExplicitWidth = 561 - object RzBitBtn1: TRzBitBtn - Left = 476 + ExplicitTop = 431 + ExplicitWidth = 549 + object btnSet: TRzBitBtn + Left = 473 Top = 8 ModalResult = 1 Caption = 'Set' diff --git a/forms/frm_Limits.pas b/forms/frm_Limits.pas index 2af7b73..37d8b44 100644 --- a/forms/frm_Limits.pas +++ b/forms/frm_Limits.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit frm_Limits; interface @@ -22,7 +31,7 @@ TfrmLimits = class(TForm) Label15: TLabel; edFdRho: TEdit; btnInit: TBitBtn; - RzBitBtn1: TRzBitBtn; + btnSet: TRzBitBtn; RzBitBtn2: TRzBitBtn; procedure ListViewClick(Sender: TObject); procedure FormCreate(Sender: TObject); @@ -41,7 +50,7 @@ TfrmLimits = class(TForm) public { Public declarations } - function ShowLimits(var Structure: TFitStructure): boolean; + function ShowLimits(const ACaption: string; var Structure: TFitStructure): boolean; end; var @@ -201,10 +210,11 @@ procedure TfrmLimits.StructureFromView; end; -function TfrmLimits.ShowLimits(var Structure: TFitStructure): boolean; +function TfrmLimits.ShowLimits(const ACaption: string; var Structure: TFitStructure): boolean; begin Result := False; FStructure := Structure; + btnSet.Caption := ACaption; StructureToView; diff --git a/forms/frm_Main.dfm b/forms/frm_Main.dfm index fc9b133..74e9ea1 100644 --- a/forms/frm_Main.dfm +++ b/forms/frm_Main.dfm @@ -292,23 +292,19 @@ object frmMain: TfrmMain BorderOuter = fsFlatRounded Color = 15987699 TabOrder = 0 - DesignSize = ( - 868 - 683) object Pages: TRzPageControl AlignWithMargins = True Left = 5 Top = 515 - Width = 786 + Width = 858 Height = 163 Hint = '' - Margins.Right = 75 ActivePage = tsFittingProgress Align = alBottom TabIndex = 3 TabOrder = 0 ExplicitTop = 514 - ExplicitWidth = 782 + ExplicitWidth = 854 FixedDimension = 21 object tsThickness: TRzTabSheet Color = 15987699 @@ -317,15 +313,25 @@ object frmMain: TfrmMain AlignWithMargins = True Left = 3 Top = 3 - Width = 776 + Width = 848 Height = 132 Cursor = crCross + Legend.HorizMargin = 5 Legend.TopPos = 0 - MarginRight = 0 + MarginBottom = 1 + MarginLeft = 1 + MarginRight = 1 + MarginTop = 2 MarginUnits = muPixels Title.Text.Strings = ( 'TChart') Title.Visible = False + LeftAxis.MaximumOffset = 4 + LeftAxis.MinimumOffset = 4 + RightAxis.Labels = False + RightAxis.LabelsFormat.Visible = False + TopAxis.Labels = False + TopAxis.LabelsFormat.Visible = False View3D = False ZoomWheel = pmwNormal Align = alClient @@ -343,15 +349,22 @@ object frmMain: TfrmMain AlignWithMargins = True Left = 3 Top = 3 - Width = 776 + Width = 848 Height = 132 Cursor = crCross + Legend.HorizMargin = 5 Legend.TopPos = 0 MarginRight = 0 MarginUnits = muPixels Title.Text.Strings = ( 'TChart') Title.Visible = False + LeftAxis.MaximumOffset = 4 + LeftAxis.MinimumOffset = 4 + RightAxis.Labels = False + RightAxis.LabelsFormat.Visible = False + TopAxis.Labels = False + TopAxis.LabelsFormat.Visible = False View3D = False ZoomWheel = pmwNormal Align = alClient @@ -369,15 +382,22 @@ object frmMain: TfrmMain AlignWithMargins = True Left = 3 Top = 3 - Width = 776 + Width = 848 Height = 132 Cursor = crCross + Legend.HorizMargin = 5 Legend.TopPos = 0 MarginRight = 0 MarginUnits = muPixels Title.Text.Strings = ( 'TChart') Title.Visible = False + LeftAxis.MaximumOffset = 4 + LeftAxis.MinimumOffset = 4 + RightAxis.Labels = False + RightAxis.LabelsFormat.Visible = False + TopAxis.Labels = False + TopAxis.LabelsFormat.Visible = False View3D = False ZoomWheel = pmwNormal Align = alClient @@ -391,12 +411,12 @@ object frmMain: TfrmMain object tsFittingProgress: TRzTabSheet Color = 15987699 Caption = 'Convergence' - ExplicitWidth = 778 + ExplicitWidth = 850 object chFittingProgress: TChart AlignWithMargins = True Left = 3 Top = 3 - Width = 776 + Width = 848 Height = 132 Cursor = crCross Border.Color = clDefault @@ -404,12 +424,14 @@ object frmMain: TfrmMain Legend.TopPos = 0 Legend.Visible = False MarginBottom = 2 - MarginLeft = 1 - MarginRight = 2 - MarginTop = 2 + MarginLeft = 2 + MarginRight = 5 + MarginTop = 5 + MarginUnits = muPixels Title.Text.Strings = ( 'TChart') Title.Visible = False + Title.VertMargin = 3 BottomAxis.Automatic = False BottomAxis.AutomaticMaximum = False BottomAxis.AutomaticMinimum = False @@ -419,6 +441,7 @@ object frmMain: TfrmMain BottomAxis.Title.Caption = 'Iteration' LeftAxis.AxisValuesFormat = '#.0 "x10" E+0' LeftAxis.ExactDateTime = False + LeftAxis.Increment = 1.000000000000000000 LeftAxis.LabelsExponent = True LeftAxis.LabelsFormat.Margins.Left = 0 LeftAxis.LabelsFormat.Margins.Right = 0 @@ -426,18 +449,34 @@ object frmMain: TfrmMain LeftAxis.LabelsFormat.Margins.Units = maPercentSize LeftAxis.LabelsSeparation = 20 LeftAxis.Logarithmic = True + LeftAxis.MaximumOffset = 2 LeftAxis.MaximumRound = True + LeftAxis.MinimumOffset = 4 LeftAxis.Title.Caption = #967'2' LeftAxis.Title.Font.Height = -13 + LeftAxis.Title.Shadow.Visible = False View3D = False ZoomWheel = pmwNormal Align = alClient BevelOuter = bvNone Color = 16771538 TabOrder = 0 - ExplicitWidth = 772 + ExplicitWidth = 844 + DesignSize = ( + 848 + 132) DefaultCanvas = 'TGDIPlusCanvas' ColorPaletteIndex = 13 + object btnCopyConvergence: TRzButton + Left = 778 + Top = 9 + Width = 59 + Anchors = [akTop, akRight] + Caption = 'Copy' + TabOrder = 0 + OnClick = btnCopyConvergenceClick + ExplicitLeft = 774 + end object lsrConvergence: TLineSeries HoverElement = [heCurrent] SeriesColor = 16744448 @@ -482,10 +521,11 @@ object frmMain: TfrmMain Legend.TextStyle = ltsPlain Legend.Title.Transparent = False Legend.TopPos = 3 - MarginBottom = 0 - MarginLeft = 1 - MarginRight = 1 - MarginTop = 1 + MarginBottom = 2 + MarginLeft = 10 + MarginRight = 2 + MarginTop = 2 + MarginUnits = muPixels PrintProportional = False SubFoot.Visible = False SubTitle.Visible = False @@ -546,9 +586,15 @@ object frmMain: TfrmMain RightAxis.Automatic = False RightAxis.AutomaticMaximum = False RightAxis.AutomaticMinimum = False + RightAxis.Labels = False + RightAxis.LabelsFormat.Visible = False + RightAxis.LabelsOnAxis = False RightAxis.Logarithmic = True RightAxis.Maximum = 1.000000000000000000 RightAxis.Minimum = 0.000001000000000000 + RightAxis.RoundFirstLabel = False + TopAxis.Labels = False + TopAxis.LabelsFormat.Visible = False View3D = False Zoom.Pen.Color = clRed Zoom.Pen.Mode = pmNotXor @@ -559,6 +605,7 @@ object frmMain: TfrmMain OnMouseDown = ChartMouseDown OnMouseMove = ChartMouseMove OnMouseUp = ChartMouseUp + OnResize = ChartResize ExplicitWidth = 854 ExplicitHeight = 304 DefaultCanvas = 'TGDIPlusCanvas' @@ -568,6 +615,115 @@ object frmMain: TfrmMain 5 5) ColorPaletteIndex = 13 + object btnStop: TRzBitBtn + Left = 500 + Top = 19 + Width = 109 + Height = 40 + FrameColor = clRed + ModalResult = 3 + Action = CalcStop + Caption = 'Abort ' + Font.Charset = DEFAULT_CHARSET + Font.Color = clRed + Font.Height = -19 + Font.Name = 'Segoe UI' + Font.Style = [fsBold] + ParentFont = False + StyleName = 'Windows' + TabOrder = 0 + Visible = False + Glyph.Data = { + D20A0000424DD20A00000000000042000000280000001A0000001A0000000100 + 200003000000900A0000C40E0000C40E000000000000000000000000FF0000FF + 0000FF000000FF00000000FF00000000FF00000000000D0E9FFF0D0EA0FF0D0E + 9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0E + 9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0E + 9EFF0D0E9EFF0D0E9EFF0D0E9EFF0D0EA0FF0D0E9FFF000000000D0EA0FF1315 + F4FF1315EAFF1315EAFF1315EAFF1315EAFF1315EAFF1315EAFF1315EAFF1315 + EAFF1315EAFF1315EAFF1315EAFF1315EAFF1315EAFF1315EAFF1315EAFF1315 + EAFF1315EAFF1315EAFF1315EAFF1315EAFF1315EAFF1315EAFF1315F4FF0D0E + 9FFF0D0EA1FF1315EAFF1314DFFF1314DFFF1314DFFF1314DFFF1314DFFF1314 + DFFF1314DFFF1314DFFF1314DFFF1314DFFF1314DFFF1314DFFF1314DFFF1314 + DFFF1314DFFF1314DFFF1314DFFF1314DFFF1314DFFF1314DFFF1314DFFF1314 + DEFF1315EAFF0D0EA0FF0D0E9EFF1315E8FF1314DDFF1314DDFF1314DDFF1314 + DDFF1112DDFF0B0CDCFF1314DDFF1314DDFF1314DDFF1314DDFF1314DDFF1314 + DDFF1314DDFF1314DDFF1314DDFF1314DDFF0B0CDBFF1112DCFF1314DCFF1314 + DCFF1314DCFF1314DCFF1315E7FF0D0E9DFF0D0E9EFF1315E7FF1314DBFF1314 + DBFF1314DBFF1112DBFF090AD9FF2021DDFF0607D9FF1314DBFF1314DBFF1314 + DBFF1314DBFF1314DBFF1314DBFF1314DBFF1314DBFF0607D8FF2021DCFF090A + D9FF1112DAFF1314DBFF1314DAFF1314DAFF1315E5FF0D0E9CFF0D0E9DFF1214 + E4FF1213DAFF1314D9FF1112D9FF0000D4FF7373E8FFE6E6FAFF3C3DDFFF0000 + D5FF1314D9FF1213D9FF1213D9FF1213D9FF1213D9FF1314D9FF0000D4FF3C3D + DFFFE6E6FAFF7273E7FF0000D4FF1011D8FF1213D9FF1213D8FF1213E3FF0D0E + 9CFF0D0E9CFF1213E2FF1213D8FF1011D7FF0809D6FF7172E8FFFFFFFFFFFFFF + FFFFF0F0FCFF3A3ADDFF0000D3FF1213D7FF1213D7FF1213D7FF1213D7FF0000 + D2FF3A3BDDFFF0F0FCFFFFFFFFFFFFFFFFFF7171E8FF0809D5FF1011D6FF1112 + D7FF1112E1FF0D0E9BFF0D0E9CFF1112E0FF1112D6FF090AD4FF1D1DD5FFF8F8 + FBFFFFFFFFFFFFFFFFFFFFFFFFFFF1F1FCFF3838DBFF0000D1FF1314D5FF1314 + D5FF0000D0FF3839DBFFF1F1FCFFFFFFFFFFFFFFFFFFFFFFFFFFF7F7FBFF1C1D + D4FF0A0BD3FF1213D5FF1213DFFF0D0E9BFF0D0E9BFF1213DEFF1213D4FF1213 + D5FF0505CBFF3939B0FFF1F1F4FFFFFFFFFFFFFFFFFFFFFFFFFFF1F1FCFF3B3B + DAFF0000CFFF0000CEFF3B3CDAFFF1F1FCFFFFFFFFFFFFFFFFFFFFFFFFFFF0F0 + F5FF3839B0FF0505CBFF1213D4FF1213D3FF1213DDFF0D0E9AFF0D0E9BFF1213 + DCFF1213D2FF1213D2FF1213D5FF0000C0FF3738ADFFF2F2F5FFFFFFFFFFFFFF + FFFFFFFFFFFFF2F2FCFF2B2CD6FF2B2CD6FFF2F2FCFFFFFFFFFFFFFFFFFFFFFF + FFFFF2F2F5FF3737ACFF0000BFFF1213D4FF1213D1FF1213D1FF1213DBFF0D0E + 9AFF0D0E9AFF1213DAFF1213D0FF1213D0FF1213D0FF1314D5FF0000BFFF3536 + ACFFF1F1F5FFFFFFFFFFFFFFFFFFFFFFFFFFEEEFFBFFEFEFFBFFFFFFFFFFFFFF + FFFFFFFFFFFFF0F1F5FF3536ACFF0000BFFF1314D4FF1213CFFF1213CFFF1213 + CFFF1213D9FF0D0E99FF0D0E99FF1213D8FF1112CEFF1112CEFF1112CEFF1213 + CEFF1213D3FF0000BDFF3839ADFFF2F2F6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFFFFFFFFFFFFFFFFFF2F2F5FF3839ADFF0000BDFF1213D2FF1112CDFF1112 + CDFF1112CDFF1112CDFF1112D7FF0C0D98FF0C0D99FF1112D6FF1112CCFF1112 + CCFF1112CCFF1112CCFF1112CCFF1213D1FF0000BCFF2A2AAAFFE6E6F2FFFFFF + FFFFFFFFFFFFFFFFFFFFFFFFFFFFE6E6F2FF292AAAFF0000BCFF1213D0FF1112 + CBFF1011CBFF1011CBFF1011CBFF1011CBFF1011D5FF0B0C98FF0B0C98FF1011 + D4FF1011CAFF1011CAFF1011CAFF1011CAFF1112CAFF1213CAFF0000C8FF2B2C + C6FFE6E6F2FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE6E6F2FF2B2CC6FF0000 + C8FF1213CAFF1112C9FF1112C9FF1112C9FF1112C9FF1112C9FF1112D2FF0C0D + 97FF0C0D98FF1112D1FF1112C8FF1112C8FF1112C8FF1112C8FF1112C8FF0000 + C2FF3A3BD1FFF2F3FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + FFFFF2F2FEFF3A3BD0FF0000C2FF1112C8FF1112C7FF1112C7FF1112C7FF1112 + C7FF1112D0FF0C0D97FF0C0D97FF1112D0FF1112C7FF1112C6FF1112C6FF1112 + C7FF0000C0FF3738CFFFF1F1FBFFFFFFFFFFFFFFFFFFFFFFFFFFEEEEF6FFEEEE + F6FFFFFFFFFFFFFFFFFFFFFFFFFFF1F1FBFF3737CEFF0000BFFF1113C6FF1112 + C6FF1112C5FF1112C6FF1112CEFF0C0D96FF0C0D97FF1112CEFF1112C5FF1112 + C5FF1112C5FF0000BEFF393ACEFFF2F3FBFFFFFFFFFFFFFFFFFFFFFFFFFFF1F2 + F6FF2829A8FF2929A8FFF2F2F6FFFFFFFFFFFFFFFFFFFFFFFFFFF2F2FBFF393A + CDFF0000BDFF1112C4FF1112C4FF1112C4FF1112CDFF0C0D95FF0C0D96FF1112 + CCFF1112C3FF1112C3FF0405BFFF3A3BCDFFF1F1FBFFFFFFFFFFFFFFFFFFFFFF + FFFFF1F1F6FF3839ACFF0000B5FF0000B5FF3939ACFFF1F1F6FFFFFFFFFFFFFF + FFFFFFFFFFFFF1F1FBFF3A3ACCFF0405BEFF1011C2FF1011C2FF1011CBFF0C0D + 95FF0C0D95FF1011CAFF1011C1FF0809BEFF1B1CC3FFF8F8FEFFFFFFFFFFFFFF + FFFFFFFFFFFFF1F1F6FF3536ABFF0000B1FF1112C4FF1112C4FF0000B1FF3636 + ABFFF1F1F6FFFFFFFFFFFFFFFFFFFFFFFFFFF7F7FEFF1B1BC2FF0708BDFF0F10 + C0FF0F10C9FF0C0D95FF0C0D95FF0F10C8FF0F10BFFF0E0FBFFF0707B7FF6F70 + C2FFFFFFFFFFFFFFFFFFF0F0F6FF3738ACFF0000B0FF1011C2FF1011BEFF1011 + BEFF1011C2FF0000B0FF3838ACFFF0F0F6FFFFFFFFFFFFFFFFFF6F6FC2FF0707 + B6FF0E0FBEFF0F10BEFF0F10C7FF0C0D94FF0C0D94FF1011C5FF1011BDFF1011 + BDFF0E0FBEFF0000A5FF7071C0FFE5E5F0FF3839ADFF0000AEFF1011C0FF1011 + BCFF1011BCFF1011BCFF1011BCFF1011C0FF0000AEFF393AADFFE5E5F0FF7070 + C0FF0000A4FF0E0FBDFF1011BCFF1011BCFF1011C4FF0C0D93FF0C0D94FF1011 + C3FF1011BBFF1011BBFF1011BBFF0E0FBEFF0405AAFF1A1BA1FF0203B0FF1011 + BEFF1011BBFF1011BBFF1011BBFF1011BBFF1011BAFF1011BAFF1011BEFF0203 + B0FF1A1BA0FF0405AAFF0E0FBDFF1011BAFF1011BAFF1011BAFF1011C2FF0C0D + 93FF0C0D93FF1011C1FF1011B9FF1011B9FF1011B9FF1011B9FF0E0FBAFF0809 + B6FF1011BBFF1011B9FF1011B9FF1011B9FF1011B9FF1011B9FF1011B9FF1011 + B9FF1011B8FF1011BAFF0809B5FF0E0FB9FF1011B8FF1011B8FF1011B8FF1011 + B8FF1011C0FF0C0D92FF0C0D94FF1011C0FF1011B7FF1011B7FF1011B7FF1011 + B7FF1011B7FF1011B8FF1011B7FF1011B7FF1011B7FF1011B7FF1011B7FF0F10 + B7FF0F10B7FF0F10B7FF0F10B7FF0F10B7FF1011B7FF0F10B7FF0F10B7FF0F10 + B6FF0F10B6FF0F10B6FF0F10BEFF0C0D93FF0C0D96FF1011C7FF1011BEFF1011 + BEFF0F11BDFF0F11BDFF0F10BDFF0F10BDFF0F10BDFF0F10BDFF0F10BDFF0F10 + BDFF0F10BDFF0F10BDFF0F10BDFF0F10BDFF0F10BDFF0F10BDFF0F10BDFF0F10 + BDFF0F10BDFF0F10BDFF0F10BDFF0F10BDFF0F10C6FF0C0D95FF000000000C0D + 95FF0C0D93FF0C0D92FF0C0D92FF0C0D92FF0C0D92FF0C0D92FF0C0D92FF0C0D + 92FF0C0D92FF0C0D92FF0C0D92FF0C0D92FF0C0D92FF0C0D92FF0C0D92FF0C0D + 92FF0C0D92FF0C0D92FF0C0D92FF0C0D92FF0C0D92FF} + ImageIndex = 0 + Images = ilIcons + end end object RzPanel3: TRzPanel AlignWithMargins = True @@ -815,7 +971,7 @@ object frmMain: TfrmMain ExplicitLeft = 779 end end - object pnl1: TPanel + object pnlSettings: TPanel Left = 2 Top = 31 Width = 864 @@ -864,11 +1020,11 @@ object frmMain: TfrmMain ParentFont = False end object Label8: TLabel - Left = 15 + Left = 9 Top = 51 - Width = 19 + Width = 50 Height = 13 - Caption = 'Size' + Caption = 'Population' Font.Charset = DEFAULT_CHARSET Font.Color = clBlack Font.Height = -11 @@ -890,7 +1046,7 @@ object frmMain: TfrmMain ParentFont = False end object Label5: TLabel - Left = 167 + Left = 178 Top = 50 Width = 38 Height = 13 @@ -926,7 +1082,7 @@ object frmMain: TfrmMain Text = '100' end object edFPopulation: TEdit - Left = 40 + Left = 63 Top = 47 Width = 43 Height = 22 @@ -942,7 +1098,7 @@ object frmMain: TfrmMain Text = '100' end object cbPWChiSqr: TRzCheckBox - Left = 91 + Left = 113 Top = 49 Width = 56 Height = 19 @@ -952,7 +1108,7 @@ object frmMain: TfrmMain TabOrder = 2 end object edFWindow: TEdit - Left = 205 + Left = 216 Top = 46 Width = 41 Height = 22 @@ -1150,8 +1306,8 @@ object frmMain: TfrmMain object cbLFPSOShake: TRzCheckBox Left = 5 Top = 49 - Width = 54 - Height = 19 + Width = 50 + Height = 17 AlignmentVertical = avCenter Caption = 'Shake' Checked = True @@ -1251,8 +1407,8 @@ object frmMain: TfrmMain object cbAdaptiveVelocity: TRzCheckBox Left = 304 Top = 11 - Width = 48 - Height = 19 + Width = 44 + Height = 17 AlignmentVertical = avCenter Caption = 'Ad.V' State = cbUnchecked @@ -1262,8 +1418,8 @@ object frmMain: TfrmMain object cbSeedRange: TRzCheckBox Left = 234 Top = 11 - Width = 55 - Height = 19 + Width = 51 + Height = 17 AlignmentVertical = avCenter Caption = 'SeedR' Checked = True @@ -1633,7 +1789,6 @@ object frmMain: TfrmMain BtnFastForward BtnExecute RzSpacer2 - BtnCancel rzspcr4 btnResultSave btnBtnCopy @@ -1643,7 +1798,7 @@ object frmMain: TfrmMain btnDataLoad btnDataPaste) object btnDataLoad: TRzToolButton - Left = 228 + Left = 203 Top = 2 Hint = 'Load curve' ImageIndex = 8 @@ -1652,7 +1807,7 @@ object frmMain: TfrmMain ShowHint = True end object btnDataPaste: TRzToolButton - Left = 253 + Left = 228 Top = 2 Hint = 'Paste curve' ImageIndex = 9 @@ -1661,7 +1816,7 @@ object frmMain: TfrmMain ShowHint = True end object rzspcr3: TRzSpacer - Left = 220 + Left = 195 Top = 2 end object btnCalcRun: TRzToolButton @@ -1674,24 +1829,22 @@ object frmMain: TfrmMain ShowHint = True end object rzspcr4: TRzSpacer - Left = 112 + Left = 87 Top = 2 end object btnResultSave: TRzToolButton - Left = 120 + Left = 95 Top = 2 Hint = 'Save resulting curve' - DisabledIndex = 35 ImageIndex = 4 Action = ResultSave ParentShowHint = False ShowHint = True end object btnBtnCopy: TRzToolButton - Left = 145 + Left = 120 Top = 2 Hint = 'Copy resulting curve' - DisabledIndex = 37 ImageIndex = 5 Action = ResultCopy ParentShowHint = False @@ -1705,7 +1858,6 @@ object frmMain: TfrmMain Left = 54 Top = 2 Hint = 'Auto Fitting' - DisabledIndex = 2 ImageIndex = 2 Action = actAutoFitting end @@ -1713,43 +1865,22 @@ object frmMain: TfrmMain Left = 29 Top = 2 Hint = 'Calculate all' - DisabledIndex = 1 ImageIndex = 1 Action = CalcAll end - object BtnCancel: TRzToolButton - Left = 87 - Top = 2 - Hint = 'Terminate' - DisabledIndex = 3 - ImageIndex = 3 - Action = CalcStop - Enabled = False - end object btnCopyImage: TRzToolButton - Left = 170 + Left = 145 Top = 2 Hint = 'Save resulting curve as image' ImageIndex = 6 Action = FilePlotCopyWMF end object btnPrintGraphics: TRzToolButton - Left = 195 + Left = 170 Top = 2 ImageIndex = 7 end end - object RzButton1: TRzButton - Left = 801 - Top = 650 - Width = 59 - Anchors = [akRight, akBottom] - Caption = 'Copy' - TabOrder = 5 - OnClick = RzButton1Click - ExplicitLeft = 797 - ExplicitTop = 649 - end end object StructurePanel: TRzPanel AlignWithMargins = True @@ -1762,7 +1893,7 @@ object frmMain: TfrmMain Color = 15987699 ShowDockClientCaptions = False TabOrder = 1 - object RzToolbar2: TRzToolbar + object tlbStructure: TRzToolbar Left = 2 Top = 2 Width = 346 @@ -2026,6 +2157,9 @@ object frmMain: TfrmMain object actProjecEditModelText1: TMenuItem Action = actProjecEditModelText end + object Copyasimage1: TMenuItem + Action = actCopyStructureBitmap + end object N9: TMenuItem Caption = '-' end @@ -3238,6 +3372,11 @@ object frmMain: TfrmMain Caption = 'Exit' OnExecute = actSystemExitExecute end + object actCopyStructureBitmap: TAction + Category = 'Project Item' + Caption = 'Copy as image' + OnExecute = actCopyStructureBitmapExecute + end end object ilProject: TImageList ColorDepth = cd32Bit @@ -5088,4 +5227,545 @@ object frmMain: TfrmMain 0000FFFF000000000000FFFF0000000000000000000000000000000000000000 000000000000} end + object ilIcons: TImageList + Height = 32 + Width = 32 + Left = 1039 + Top = 359 + Bitmap = { + 494C010101000800040020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 + 0000000000003600000028000000800000002000000001002000000000000040 + 000000000000000000000000000000000000000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0000 + 00FF0D0E9F000D0EA0000D0E9E000D0E9E000D0E9E000D0E9E000D0E9E000D0E + 9E000D0E9E000D0E9E000D0E9E000D0E9E000D0E9E000D0E9E000D0E9E000D0E + 9E000D0E9E000D0E9E000D0E9E000D0E9E000D0E9E000D0E9E000D0EA0000D0E + 9F00000000FF000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + A0001315F4001315EA001315EA001315EA001315EA001315EA001315EA001315 + EA001315EA001315EA001315EA001315EA001315EA001315EA001315EA001315 + EA001315EA001315EA001315EA001315EA001315EA001315EA001315EA001315 + F4000D0E9F00000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + A1001315EA001314DF001314DF001314DF001314DF001314DF001314DF001314 + DF001314DF001314DF001314DF001314DF001314DF001314DF001314DF001314 + DF001314DF001314DF001314DF001314DF001314DF001314DF001314DE001315 + EA000D0EA000000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + 9E001315E8001314DD001314DD001314DD001314DD001112DD000B0CDC001314 + DD001314DD001314DD001314DD001314DD001314DD001314DD001314DD001314 + DD001314DD000B0CDB001112DC001314DC001314DC001314DC001314DC001315 + E7000D0E9D00000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + 9E001315E7001314DB001314DB001314DB001112DB00090AD9002021DD000607 + D9001314DB001314DB001314DB001314DB001314DB001314DB001314DB001314 + DB000607D8002021DC00090AD9001112DA001314DB001314DA001314DA001315 + E5000D0E9C00000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + 9D001214E4001213DA001314D9001112D9000000D4007373E800E6E6FA003C3D + DF000000D5001314D9001213D9001213D9001213D9001213D9001314D9000000 + D4003C3DDF00E6E6FA007273E7000000D4001011D8001213D9001213D8001213 + E3000D0E9C00000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + 9C001213E2001213D8001011D7000809D6007172E800FFFFFF00FFFFFF00F0F0 + FC003A3ADD000000D3001213D7001213D7001213D7001213D7000000D2003A3B + DD00F0F0FC00FFFFFF00FFFFFF007171E8000809D5001011D6001112D7001112 + E1000D0E9B00000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + 9C001112E0001112D600090AD4001D1DD500F8F8FB00FFFFFF00FFFFFF00FFFF + FF00F1F1FC003838DB000000D1001314D5001314D5000000D0003839DB00F1F1 + FC00FFFFFF00FFFFFF00FFFFFF00F7F7FB001C1DD4000A0BD3001213D5001213 + DF000D0E9B00000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + 9B001213DE001213D4001213D5000505CB003939B000F1F1F400FFFFFF00FFFF + FF00FFFFFF00F1F1FC003B3BDA000000CF000000CE003B3CDA00F1F1FC00FFFF + FF00FFFFFF00FFFFFF00F0F0F5003839B0000505CB001213D4001213D3001213 + DD000D0E9A00000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + 9B001213DC001213D2001213D2001213D5000000C0003738AD00F2F2F500FFFF + FF00FFFFFF00FFFFFF00F2F2FC002B2CD6002B2CD600F2F2FC00FFFFFF00FFFF + FF00FFFFFF00F2F2F5003737AC000000BF001213D4001213D1001213D1001213 + DB000D0E9A00000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + 9A001213DA001213D0001213D0001213D0001314D5000000BF003536AC00F1F1 + F500FFFFFF00FFFFFF00FFFFFF00EEEFFB00EFEFFB00FFFFFF00FFFFFF00FFFF + FF00F0F1F5003536AC000000BF001314D4001213CF001213CF001213CF001213 + D9000D0E9900000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0D0E + 99001213D8001112CE001112CE001112CE001213CE001213D3000000BD003839 + AD00F2F2F600FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F2F2 + F5003839AD000000BD001213D2001112CD001112CD001112CD001112CD001112 + D7000C0D9800000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 99001112D6001112CC001112CC001112CC001112CC001112CC001213D1000000 + BC002A2AAA00E6E6F200FFFFFF00FFFFFF00FFFFFF00FFFFFF00E6E6F200292A + AA000000BC001213D0001112CB001011CB001011CB001011CB001011CB001011 + D5000B0C9800000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0B0C + 98001011D4001011CA001011CA001011CA001011CA001112CA001213CA000000 + C8002B2CC600E6E6F200FFFFFF00FFFFFF00FFFFFF00FFFFFF00E6E6F2002B2C + C6000000C8001213CA001112C9001112C9001112C9001112C9001112C9001112 + D2000C0D9700000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 98001112D1001112C8001112C8001112C8001112C8001112C8000000C2003A3B + D100F2F3FE00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F2F2 + FE003A3BD0000000C2001112C8001112C7001112C7001112C7001112C7001112 + D0000C0D9700000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 97001112D0001112C7001112C6001112C6001112C7000000C0003738CF00F1F1 + FB00FFFFFF00FFFFFF00FFFFFF00EEEEF600EEEEF600FFFFFF00FFFFFF00FFFF + FF00F1F1FB003737CE000000BF001113C6001112C6001112C5001112C6001112 + CE000C0D9600000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 97001112CE001112C5001112C5001112C5000000BE00393ACE00F2F3FB00FFFF + FF00FFFFFF00FFFFFF00F1F2F6002829A8002929A800F2F2F600FFFFFF00FFFF + FF00FFFFFF00F2F2FB00393ACD000000BD001112C4001112C4001112C4001112 + CD000C0D9500000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 96001112CC001112C3001112C3000405BF003A3BCD00F1F1FB00FFFFFF00FFFF + FF00FFFFFF00F1F1F6003839AC000000B5000000B5003939AC00F1F1F600FFFF + FF00FFFFFF00FFFFFF00F1F1FB003A3ACC000405BE001011C2001011C2001011 + CB000C0D9500000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 95001011CA001011C1000809BE001B1CC300F8F8FE00FFFFFF00FFFFFF00FFFF + FF00F1F1F6003536AB000000B1001112C4001112C4000000B1003636AB00F1F1 + F600FFFFFF00FFFFFF00FFFFFF00F7F7FE001B1BC2000708BD000F10C0000F10 + C9000C0D9500000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 95000F10C8000F10BF000E0FBF000707B7006F70C200FFFFFF00FFFFFF00F0F0 + F6003738AC000000B0001011C2001011BE001011BE001011C2000000B0003838 + AC00F0F0F600FFFFFF00FFFFFF006F6FC2000707B6000E0FBE000F10BE000F10 + C7000C0D9400000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 94001011C5001011BD001011BD000E0FBE000000A5007071C000E5E5F0003839 + AD000000AE001011C0001011BC001011BC001011BC001011BC001011C0000000 + AE00393AAD00E5E5F0007070C0000000A4000E0FBD001011BC001011BC001011 + C4000C0D9300000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 94001011C3001011BB001011BB001011BB000E0FBE000405AA001A1BA1000203 + B0001011BE001011BB001011BB001011BB001011BB001011BA001011BA001011 + BE000203B0001A1BA0000405AA000E0FBD001011BA001011BA001011BA001011 + C2000C0D9300000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 93001011C1001011B9001011B9001011B9001011B9000E0FBA000809B6001011 + BB001011B9001011B9001011B9001011B9001011B9001011B9001011B9001011 + B8001011BA000809B5000E0FB9001011B8001011B8001011B8001011B8001011 + C0000C0D9200000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 94001011C0001011B7001011B7001011B7001011B7001011B7001011B8001011 + B7001011B7001011B7001011B7001011B7000F10B7000F10B7000F10B7000F10 + B7000F10B7001011B7000F10B7000F10B7000F10B6000F10B6000F10B6000F10 + BE000C0D9300000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0C0D + 96001011C7001011BE001011BE000F11BD000F11BD000F10BD000F10BD000F10 + BD000F10BD000F10BD000F10BD000F10BD000F10BD000F10BD000F10BD000F10 + BD000F10BD000F10BD000F10BD000F10BD000F10BD000F10BD000F10BD000F10 + C6000C0D9500000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0000 + 00FF0C0D95000C0D93000C0D92000C0D92000C0D92000C0D92000C0D92000C0D + 92000C0D92000C0D92000C0D92000C0D92000C0D92000C0D92000C0D92000C0D + 92000C0D92000C0D92000C0D92000C0D92000C0D92000C0D92000C0D93000C0D + 9500000000FF000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 + 00FF000000FF000000FF000000FF000000FF0000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000424D3E000000000000003E000000 + 2800000080000000200000000100010000000000000200000000000000000000 + 000000000000000000000000FFFFFF00FFFFFFFF000000000000000000000000 + FFFFFFFF000000000000000000000000FFFFFFFF000000000000000000000000 + F000000F000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000E0000007000000000000000000000000 + E0000007000000000000000000000000F000000F000000000000000000000000 + FFFFFFFF000000000000000000000000FFFFFFFF000000000000000000000000 + FFFFFFFF00000000000000000000000000000000000000000000000000000000 + 000000000000} + end end diff --git a/forms/frm_Main.pas b/forms/frm_Main.pas index 7d36b89..805285c 100644 --- a/forms/frm_Main.pas +++ b/forms/frm_Main.pas @@ -15,7 +15,7 @@ interface unit_SMessages, unit_calc, unit_XRCProjectTree, RzRadGrp, Vcl.RibbonLunaStyleActnCtrls, unit_materials, VCLTee.TeeFunci, unit_LFPSO_Base, unit_LFPSO_Periodic, Vcl.Buttons, - unit_LFPSO_Regular; + unit_LFPSO_Regular, Vcl.Imaging.pngimage; type TSeriesList = array of TLineSeries; @@ -123,7 +123,7 @@ TfrmMain = class(TForm) btnChartScale: TRzBitBtn; cbMinLimit: TRzComboBox; StructurePanel: TRzPanel; - RzToolbar2: TRzToolbar; + tlbStructure: TRzToolbar; btnPeriodAdd: TRzToolButton; btnPeriodInsert: TRzToolButton; btnPeriodDelete: TRzToolButton; @@ -158,7 +158,7 @@ TfrmMain = class(TForm) chFittingProgress: TChart; lsrConvergence: TLineSeries; spnFitTime: TRzStatusPane; - pnl1: TPanel; + pnlSettings: TPanel; RzPanel2: TRzPanel; Label6: TLabel; cbIncrement: TRzComboBox; @@ -200,7 +200,6 @@ TfrmMain = class(TForm) dlgPrint: TPrintDialog; RzSpacer3: TRzSpacer; BtnFastForward: TRzToolButton; - BtnCancel: TRzToolButton; btnCopyLayer: TRzToolButton; actLayerCopy: TAction; actProjectItemDuplicate: TAction; @@ -292,7 +291,6 @@ TfrmMain = class(TForm) edLFPSOSkip: TEdit; Label15: TLabel; cbTreatPeriodic: TRzCheckBox; - RzButton1: TRzButton; NewFolder1: TMenuItem; N8: TMenuItem; actEditHenke: TAction; @@ -321,6 +319,11 @@ TfrmMain = class(TForm) Benchmark1: TMenuItem; actSystemSettings: TAction; actSystemExit: TAction; + btnCopyConvergence: TRzButton; + actCopyStructureBitmap: TAction; + Copyasimage1: TMenuItem; + btnStop: TRzBitBtn; + ilIcons: TImageList; procedure btnChartScaleClick(Sender: TObject); procedure FileOpenExecute(Sender: TObject); procedure FormCreate(Sender: TObject); @@ -382,7 +385,7 @@ TfrmMain = class(TForm) procedure ChartMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure ChartZoom(Sender: TObject); - procedure RzButton1Click(Sender: TObject); + procedure btnCopyConvergenceClick(Sender: TObject); procedure DataNormAutoExecute(Sender: TObject); procedure actEditHenkeExecute(Sender: TObject); procedure rgCalcModeChanging(Sender: TObject; NewIndex: Integer; @@ -397,6 +400,8 @@ TfrmMain = class(TForm) procedure actSystemExitExecute(Sender: TObject); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure cbTreatPeriodicClick(Sender: TObject); + procedure actCopyStructureBitmapExecute(Sender: TObject); + procedure ChartResize(Sender: TObject); private Project : TXRCProjectTree; LFPSO: TLFPSO_Base; @@ -470,13 +475,14 @@ TfrmMain = class(TForm) procedure PlotGradedProfile; procedure PlotSimpleProfile; procedure ClearProfiles; - procedure PrepareInterfaceAF; function PrepareCalc: boolean; function PrepareLFPSO : boolean; procedure CreateFitGradientExtensions(const P: TProfileFunctions); procedure SaveHistory; procedure RescaleChart; procedure ProcessBenchFile(Sender: TObject; const F: TSearchRec); + procedure EditTable(var Data: PProjectData); + procedure EnableControls(const Enable: boolean); { Private declarations } public { Public declarations } @@ -500,6 +506,7 @@ implementation uses System.IniFiles, System.DateUtils, + System.UITypes, AbUtils, unit_helpers, unit_consts, @@ -522,7 +529,9 @@ implementation frm_Benchmark, unit_files_list, unit_config, - frm_settings, unit_XRCStackControl; + frm_settings, + unit_XRCStackControl, + editor_ProfileTable; {$R *.dfm} @@ -702,6 +711,8 @@ procedure TfrmMain.ProjectChange(Sender: TBaseVirtualTree; Node: PVirtualNode); Structure.FromString(LastData.Data); FStack.Clear; FStack.Push(LastData.Data); + PrepareDistributionCharts; + PlotProfile; end; end; end; @@ -878,7 +889,7 @@ procedure TfrmMain.ProjectItemExtensionExecute(Sender: TObject); if CreateChildNode(Node) then CreateFunctionProfileExtension(Node); end; - etArb : CreateProfileExtension; + etTable : CreateProfileExtension; end; end; @@ -899,11 +910,11 @@ procedure TfrmMain.CreateProfileExtension; Data.Group := gtModel; Data.Enabled := True; Data.RowType := prExtension; - Data.Title := 'Profile'; - Data.ExtType := etArb; + Data.Title := 'Table'; + Data.ExtType := etTable; Data.StackID := -1; Data.LayerID := -1; - Data.Form := ffPoly; + Data.Form := ffNone; Project.ClearSelection; Project.Selected[Node] := True; @@ -995,7 +1006,7 @@ procedure TfrmMain.EditProjectItem; begin case Data.ExtType of etFunction: EditGradient(Data); - etArb :; + etTable : EditTable(Data); end; end; @@ -1003,6 +1014,16 @@ procedure TfrmMain.EditProjectItem; end; +procedure TfrmMain.EditTable(var Data: PProjectData); +begin + edtrProfileTable.Data := Data; + edtrProfileTable.Structure := Structure; + if edtrProfileTable.ShowModal = mrOk then + begin + mmDescription.Lines.Text := Data.Description; + end; +end; + procedure TfrmMain.EditGradient(var Data: PProjectData); begin edtrProfileFunction.Data := Data; @@ -1191,7 +1212,7 @@ procedure TfrmMain.btnSetFitLimitsClick(Sender: TObject); FitStructure: TFitStructure; begin FitStructure := Structure.ToFitStructure; - frmLimits.ShowLimits(FitStructure); + frmLimits.ShowLimits('Save', FitStructure); Structure.UpdateInterfaceP(FitStructure); end; @@ -1344,7 +1365,7 @@ function TfrmMain.GetFitParams: boolean; begin Result := False; FFitStructure := Structure.ToFitStructure; - if frmLimits.ShowLimits(FFitStructure) then + if frmLimits.ShowLimits('Run', FFitStructure) then Structure.UpdateInterfaceP(FFitStructure) else begin Exit; @@ -1367,7 +1388,7 @@ function TfrmMain.GetFitParams: boolean; FFitParams.Shake := cbLFPSOShake.Checked; FFitParams.ThetaWieght := cbTWChi.ItemIndex; FFitParams.AdaptVel := cbAdaptiveVelocity.Checked; - FFitParams.RangeSeed := cbSeedRange.Checked; + FFitParams.RangeSeed := cbSeedRange.Checked; FFitParams.MaxPOrder := StrToInt(edPolyOrder.Text); FFitParams.Ksxr := 0.2; @@ -1407,14 +1428,8 @@ procedure TfrmMain.GetThreadParams; begin StartTime := Now; - Screen.Cursor := crHourGlass; - FSeriesList[Project.ActiveModel.CurveID].BeginUpdate; - - CalcRun.Enabled := False; - CalcAll.Enabled := False; - actAutoFitting.Enabled := False; - CalcStop.Enabled := True; + FSeriesList[Project.ActiveModel.CurveID].BeginUpdate; StartT := StrToFloat(edStartTeta.Text); EndT := StrToFloat(edEndTeta.Text); @@ -1549,7 +1564,7 @@ procedure TfrmMain.pmProjectPopup(Sender: TObject); pmiVisible.Visible := False; pmiLinked.Visible := False; - IsProfile := LastData.ExtType = etArb; + IsProfile := LastData.ExtType = etTable; pmCopytoclipboard.Visible := IsProfile; pmExporttofile.Visible := IsProfile; end; @@ -1568,13 +1583,6 @@ procedure TfrmMain.FinalizeCalc(Calc: TCalc); FSeriesList[Project.ActiveModel.CurveID].Repaint; StatusD.Caption := FloatToStrF(Structure.Period, ffFixed, 7, 2); Screen.Cursor := crDefault; - - CalcRun.Enabled := True; - CalcAll.Enabled := True; - actAutoFitting.Enabled := True; - CalcStop.Enabled := False; - - PrintMax; end; @@ -1584,10 +1592,10 @@ procedure TfrmMain.PrepareDistributionCharts; procedure InitSereis(Series: TLineSeries); begin - Series.LinePen.Width := 2; + Series.LinePen.Width := 3; Series.Stairs := True; Series.Pointer.Visible := True; - Series.Pointer.Size := 2; + Series.Pointer.Size := 4; end; procedure CreateSeries(Chart: TChart; var SeriesList: TSeriesList); @@ -1616,18 +1624,27 @@ procedure TfrmMain.PrepareDistributionCharts; procedure TfrmMain.PlotProfileNP; var - i, j, k, p, shift: integer; + i, j, p, n, shift: integer; begin + ClearProfiles; shift := 1; for i := 0 to High(Structure.Stacks) do begin if Structure.Stacks[i].N = 1 then Continue; for j := 0 to High(Structure.Stacks[i].Layers) do begin - for k := 0 to High(Structure.Stacks[i].Layers[j].Data.PP[1]) do + for p := 1 to 3 do begin - for p := 1 to 3 do - FSeriesArray[p][j].AddXY(k + shift, Structure.Stacks[i].Layers[j].Data.PP[p][k]); + FSeriesArray[p][j].Clear; + if not Structure.Stacks[i].Layers[j].Data.P[p].Paired then + begin + for n := 0 to High(Structure.Stacks[i].Layers[j].Data.PP[p]) do + FSeriesArray[p][j].AddXY(n + shift, Structure.Stacks[i].Layers[j].Data.PP[p][n]); + end + else begin + for n := 0 to Structure.Stacks[i].N - 1 do + FSeriesArray[p][j].AddXY(n + shift, Structure.Stacks[i].Layers[j].Data.P[p].V); + end; end; end; Inc(shift, Structure.Stacks[i].N); @@ -1757,7 +1774,7 @@ function TfrmMain.IsProfileEnbled: Boolean; while Node <> nil do begin Data := Project.GetNodeData(Node); - if Data.ExtType = etArb then + if Data.ExtType = etTable then begin Result := Data.Enabled; Break; @@ -1772,7 +1789,8 @@ procedure TfrmMain.CalcRunExecute(Sender: TObject); try if not PrepareCalc then Exit; try - FCalc.Model.Profiles := GetProfileFunctions; + EnableControls(False); + FCalc.Run; if (Project.LinkedData <> nil) and FSeriesList[Project.ActiveModel.CurveID].Visible then begin @@ -1801,6 +1819,7 @@ procedure TfrmMain.CalcRunExecute(Sender: TObject); end; FinalizeCalc(FCalc); finally + EnableControls(True); FCalc.Free; end; end; @@ -1816,14 +1835,17 @@ procedure TfrmMain.CalcStopExecute(Sender: TObject); end; -procedure TfrmMain.PrepareInterfaceAF; +procedure TfrmMain.EnableControls(const Enable: boolean); begin - lsrConvergence.Clear; - Pages.ActivePage := tsFittingProgress; - chFittingProgress.BottomAxis.Minimum := 0; - chFittingProgress.BottomAxis.Maximum := FFitParams.NMax; - chFittingProgress.BottomAxis.Minimum := -1; -// chFittingProgress.LeftAxis.Minimum := FFitParams.Tolerance / 5; + tlbrFile.Enabled := Enable; + tlbStructure.Enabled := Enable; + ChartToolBar.Enabled := Enable; + btnCopyConvergence.Enabled := Enable; + + btnStop.Visible := not Enable; + Structure.Enabled := Enable; + Project.Enabled := Enable; + pnlSettings.Enabled := Enable; end; function TfrmMain.PrepareCalc: Boolean; @@ -1843,6 +1865,8 @@ function TfrmMain.PrepareCalc: Boolean; GetThreadParams; FCalc.Params := FCalcThreadParams; FCalc.Model := Structure.Model(IsProfileEnbled and not cbTreatPeriodic.Checked); + FCalc.Model.Profiles := GetProfileFunctions; + Screen.Cursor := crHourGlass; Result := True; end; @@ -1876,7 +1900,12 @@ function TfrmMain.PrepareLFPSO: Boolean; end; LFPSO.Structure := FFitStructure; - PrepareInterfaceAF; + + lsrConvergence.Clear; + Pages.ActivePage := tsFittingProgress; + chFittingProgress.BottomAxis.Minimum := 0; + chFittingProgress.BottomAxis.Maximum := FFitParams.NMax; + Result := True; end; @@ -1897,33 +1926,41 @@ procedure TfrmMain.actAutoFittingExecute(Sender: TObject); try if not PrepareLFPSO then Exit; + Screen.Cursor := crHourGlass; + EnableControls(False); FitStartTime := Now; LFPSO.Run(FCalcThreadParams); if Structure.IsPeriodic then begin - Structure.UpdateInterfaceP(LFPSO.Structure); - if not cbTreatPeriodic.Checked then - begin + if cbTreatPeriodic.Checked then + Structure.UpdateInterfaceP(LFPSO.Structure) + else begin if cbPoly.Checked then - CreateFitGradientExtensions(LFPSO.Polynomes) - else begin + begin + Structure.UpdateInterfaceP(LFPSO.Structure); + CreateFitGradientExtensions(LFPSO.Polynomes) + end + else + begin + Structure.UpdateInterfaceNP(LFPSO.Structure); CreateProfileExtension; Structure.UpdateProfiles(LFPSO.Result); end; - end; end else Structure.UpdateInterfaceNP(LFPSO.Structure); + Project.ActiveModel.Data := Structure.ToString; DecodeTime(Now - FitStartTime, Hour, Min, Sec, MSec); spnFitTime.Caption := Format('Fitting Time: %2.2d:%2.2d:%2.2d sec', [Hour, Min, Sec]); CalcRunExecute(nil); finally Screen.Cursor := crDefault; + EnableControls(True); FreeAndNil(LFPSO); end; end; @@ -1970,6 +2007,36 @@ procedure TfrmMain.actCalcBenchmarkExecute(Sender: TObject); end; end; +procedure TfrmMain.actCopyStructureBitmapExecute(Sender: TObject); +var + Image: TPNGImage; + Bitmap: TBitmap; + MyFormat: Word; + AData: THandle; + APalette: HPALETTE; + MyRect : TRect; +begin + Image := TPNGImage.Create; + Bitmap := TBitmap.Create; + try + MyRect := Rect(0, 0, Structure.Width, Structure.Height); + + with Bitmap do + begin + Width := MyRect.Right; + Height := MyRect.Bottom; + + Canvas.CopyRect(MyRect, Structure.Canvas, MyRect); + end; + + Image.Assign(Bitmap); + Image.SaveToClipboardFormat(MyFormat, AData, APalette); + ClipBoard.SetAsHandle(MyFormat,AData); + finally + FreeAndNil(Image); + end; +end; + procedure TfrmMain.RecoverProjectTree(const ActiveID: Integer); var Node, First: PVirtualNode; @@ -2324,6 +2391,7 @@ procedure TfrmMain.FileSaveAsExecute(Sender: TObject); var OldProjectDir: string; begin + dlgSaveProject.FileName := ExtractFileName(FProjectFileName); if dlgSaveProject.Execute then begin OldProjectDir := FProjectDir; @@ -2344,7 +2412,7 @@ procedure TfrmMain.FileSaveAsExecute(Sender: TObject); procedure TfrmMain.FileSaveExecute(Sender: TObject); begin - if FProjectName = 'noname.xrcx' then + if FProjectName = DEFAULT_PROJECT_NAME then FileSaveAsExecute(Sender) else SaveProject(FProjectFileName); @@ -2389,6 +2457,11 @@ procedure TfrmMain.ChartMouseUp(Sender: TObject; Button: TMouseButton; Screen.Cursor := crDefault; end; +procedure TfrmMain.ChartResize(Sender: TObject); +begin + btnStop.Left := Chart.ClientWidth div 2 - 40; +end; + procedure TfrmMain.ChartZoom(Sender: TObject); begin PrintMax; @@ -2408,7 +2481,7 @@ procedure TfrmMain.CreateDefaultProject; Structure.AddSubstrate('Si', 5, 2.2); FLastID := 1; - FProjectName := 'noname.xrcx'; + FProjectName := DEFAULT_PROJECT_NAME; FProjectDir := IncludeTrailingPathDelimiter(Config.TempPath + FProjectName); FProjectFileName := FProjectDir + FProjectName; CreateDir(FProjectDir); @@ -2441,7 +2514,7 @@ procedure TfrmMain.CreateDefaultProject; procedure TfrmMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin - CanClose := MessageDlg('Exit application?', mtConfirmation, [mbYes, mbNo], 0, mbNO) = mrYes; + CanClose := MessageDlg('Exit X-Ray Calc 3?', mtConfirmation, [mbYes, mbNo], 0, mbNO) = mrYes; end; procedure TfrmMain.FormCreate(Sender: TObject); @@ -2512,7 +2585,7 @@ procedure TfrmMain.rgCalcModeChanging(Sender: TObject; NewIndex: Integer; end; -procedure TfrmMain.RzButton1Click(Sender: TObject); +procedure TfrmMain.btnCopyConvergenceClick(Sender: TObject); begin case Pages.ActivePageIndex of 0..2: ; @@ -2533,6 +2606,10 @@ procedure TfrmMain.cbMinLimitChange(Sender: TObject); procedure TfrmMain.cbTreatPeriodicClick(Sender: TObject); begin Structure.PeriodicMode := not cbTreatPeriodic.Checked; + + cbPoly.Enabled := not cbTreatPeriodic.Checked; + if cbTreatPeriodic.Checked then cbPoly.Checked := False; + edPolyOrder.Enabled := not cbTreatPeriodic.Checked; end; procedure TfrmMain.WMLayerClick(var Msg: TMessage); diff --git a/forms/frm_MaterialSelector.dfm b/forms/frm_MaterialSelector.dfm index 3ef5e97..2576d4b 100644 --- a/forms/frm_MaterialSelector.dfm +++ b/forms/frm_MaterialSelector.dfm @@ -3,8 +3,8 @@ object frmMaterialSelector: TfrmMaterialSelector Top = 0 BorderStyle = bsToolWindow Caption = 'Select material' - ClientHeight = 390 - ClientWidth = 280 + ClientHeight = 403 + ClientWidth = 286 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -12,6 +12,9 @@ object frmMaterialSelector: TfrmMaterialSelector Font.Name = 'Segoe UI' Font.Style = [] Position = poMainFormCenter + DesignSize = ( + 286 + 403) TextHeight = 15 object SearchBox1: TSearchBox Left = 8 @@ -29,19 +32,22 @@ object frmMaterialSelector: TfrmMaterialSelector TabOrder = 1 end object BitBtn1: TBitBtn - Left = 205 + Left = 201 Top = 372 Width = 75 Height = 25 + Anchors = [akRight, akBottom] Caption = 'Select' ModalResult = 1 TabOrder = 2 + ExplicitLeft = 205 end object BitBtn2: TBitBtn Left = 8 Top = 372 Width = 75 Height = 25 + Anchors = [akLeft, akBottom] Caption = 'Cancel' ModalResult = 2 TabOrder = 3 diff --git a/forms/frm_MaterialSelector.pas b/forms/frm_MaterialSelector.pas index ee86b1d..b767751 100644 --- a/forms/frm_MaterialSelector.pas +++ b/forms/frm_MaterialSelector.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit frm_MaterialSelector; interface diff --git a/forms/frm_about.dfm b/forms/frm_about.dfm index 3c70925..fdde2ad 100644 --- a/forms/frm_about.dfm +++ b/forms/frm_about.dfm @@ -3,8 +3,8 @@ object frmAbout: TfrmAbout Top = 0 BorderStyle = bsDialog Caption = 'About' - ClientHeight = 300 - ClientWidth = 320 + ClientHeight = 299 + ClientWidth = 316 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText @@ -17,7 +17,7 @@ object frmAbout: TfrmAbout AlignWithMargins = True Left = 20 Top = 3 - Width = 297 + Width = 293 Height = 46 Margins.Left = 20 Margins.Bottom = 10 @@ -33,14 +33,13 @@ object frmAbout: TfrmAbout ParentFont = False BlinkColor = clBtnFace TextStyle = tsShadow - ExplicitLeft = 46 - ExplicitWidth = 273 + ExplicitWidth = 227 end object RzVersionInfoStatus2: TRzVersionInfoStatus AlignWithMargins = True Left = 20 Top = 62 - Width = 297 + Width = 293 Margins.Left = 20 Margins.Bottom = 0 FrameStyle = fsNone @@ -62,7 +61,7 @@ object frmAbout: TfrmAbout AlignWithMargins = True Left = 20 Top = 92 - Width = 297 + Width = 293 Height = 16 Margins.Left = 20 Margins.Top = 10 @@ -76,14 +75,13 @@ object frmAbout: TfrmAbout Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - ExplicitLeft = 3 ExplicitWidth = 169 end object Label1: TLabel AlignWithMargins = True Left = 20 Top = 121 - Width = 297 + Width = 293 Height = 32 Margins.Left = 20 Align = alTop @@ -95,13 +93,12 @@ object frmAbout: TfrmAbout Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - ExplicitLeft = 3 ExplicitWidth = 108 end object RzURLLabel1: TRzURLLabel Left = 56 Top = 208 - Width = 256 + Width = 222 Height = 13 Alignment = taCenter Caption = 'https://github.com/OleksiyPenkov/X-RayCalc3' diff --git a/forms/frm_settings.dfm b/forms/frm_settings.dfm index e849e4c..ff2bfd1 100644 --- a/forms/frm_settings.dfm +++ b/forms/frm_settings.dfm @@ -24,6 +24,8 @@ object frmSettings: TfrmSettings ActivePage = tsGraphics Align = alClient TabOrder = 1 + ExplicitWidth = 447 + ExplicitHeight = 383 object tsPaths: TTabSheet HelpContext = 143 Caption = 'tsPaths' @@ -32,7 +34,7 @@ object frmSettings: TfrmSettings AlignWithMargins = True Left = 3 Top = 3 - Width = 437 + Width = 86 Height = 13 Align = alTop Caption = 'FIles and Paths' @@ -43,7 +45,6 @@ object frmSettings: TfrmSettings Font.Style = [fsBold] ParentFont = False Transparent = True - ExplicitWidth = 86 end end object tsBehavour: TTabSheet @@ -65,7 +66,7 @@ object frmSettings: TfrmSettings AlignWithMargins = True Left = 3 Top = 3 - Width = 431 + Width = 50 Height = 13 Align = alTop Caption = 'Behavior' @@ -76,7 +77,6 @@ object frmSettings: TfrmSettings Font.Style = [fsBold] ParentFont = False Transparent = True - ExplicitWidth = 50 end object chkCheckForUpdates: TCheckBox AlignWithMargins = True @@ -124,7 +124,7 @@ object frmSettings: TfrmSettings AlignWithMargins = True Left = 3 Top = 3 - Width = 437 + Width = 102 Height = 13 Align = alTop Caption = 'Interface settings' @@ -135,7 +135,6 @@ object frmSettings: TfrmSettings Font.Style = [fsBold] ParentFont = False Transparent = True - ExplicitWidth = 102 end end object tsCalc: TTabSheet @@ -225,8 +224,7 @@ object frmSettings: TfrmSettings Margins.Top = 5 Align = alTop TabOrder = 0 - ExplicitLeft = 6 - ExplicitTop = 32 + ExplicitWidth = 433 object Label2: TLabel Left = 8 Top = 11 @@ -263,7 +261,7 @@ object frmSettings: TfrmSettings 613 41) object btnOk: TButton - Left = 437 + Left = 433 Top = 10 Width = 75 Height = 25 @@ -273,10 +271,10 @@ object frmSettings: TfrmSettings ModalResult = 1 TabOrder = 0 OnClick = SaveSettingsClick - ExplicitLeft = 433 + ExplicitLeft = 429 end object btnCancel: TButton - Left = 518 + Left = 514 Top = 10 Width = 75 Height = 25 @@ -285,7 +283,7 @@ object frmSettings: TfrmSettings Caption = '&Cancel' ModalResult = 2 TabOrder = 1 - ExplicitLeft = 514 + ExplicitLeft = 510 end object btnHelp: TButton Left = 12 diff --git a/forms/frm_settings.pas b/forms/frm_settings.pas index 9c85dc1..7cf5892 100644 --- a/forms/frm_settings.pas +++ b/forms/frm_settings.pas @@ -1,4 +1,13 @@ - +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + + unit frm_settings; interface diff --git a/math/math_globals.pas b/math/math_globals.pas index 3ea641b..7d20d68 100644 --- a/math/math_globals.pas +++ b/math/math_globals.pas @@ -37,6 +37,7 @@ THenkeRecord = record procedure ReadHenkeTable(const N: string; var Na, Nro: single; var Table: THenkeTable); procedure WriteHenkeTable(const N: string; Na, Nro: single; Table: THenkeTable); function Poly(const x: Integer; const C: TPolyArray): Single; overload; + function Poly(const x: Integer; Min, Max: single; const C: TPolyArray): Single; overload; function Poly(const x: Integer; Polynome: TFuncProfileRec): Single; overload; function FuncProfile(const x: integer; FuncProfile: TFuncProfileRec): single; @@ -47,24 +48,44 @@ implementation SysUtils, VCLTee.TeEngine; -function Poly(const x: Integer; const C: TPolyArray): Single; +function Poly(const x: Integer; const C: TPolyArray): Single; overload; var - i, Last: Integer; + i, Last: Int64; + Order: integer; begin + Order := Trunc(C[10]); Result := C[0]; Last := 1; - for I := 1 to Trunc(C[10]) do + for I := 1 to Order do begin Last := Last * (x - 1); Result := Result + C[i] * Last; end; end; + +function Poly(const x: Integer; Min, Max: single; const C: TPolyArray): Single; overload; +var + i, Last: Int64; + Order: integer; +begin + Order := Trunc(C[10]); + Result := C[0]; Last := 1; + for I := 1 to Order do + begin + Last := Last * (x - 1); + Result := Result + C[i] * Last; + if (Result > Max) or (Result < Min) then Break; + end; +end; + function Poly(const x: Integer; Polynome: TFuncProfileRec): Single; overload; var - i, Last: LongInt; + i, Last: Int64; + Order: integer; begin + Order := Trunc(Polynome.C[10]); Result := Polynome.C[0]; Last := 1; - for I := 1 to Trunc(Polynome.C[10]) do + for I := 1 to Order do begin Last := Last * (x - 1); Result := Result + Polynome.C[i] * Last diff --git a/math/unit_SavitzkyGolay.pas b/math/unit_SavitzkyGolay.pas index 292a601..97c623a 100644 --- a/math/unit_SavitzkyGolay.pas +++ b/math/unit_SavitzkyGolay.pas @@ -1,3 +1,12 @@ +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + unit unit_SavitzkyGolay; interface diff --git a/math/unit_calc.pas b/math/unit_calc.pas index 85f39ab..347b660 100644 --- a/math/unit_calc.pas +++ b/math/unit_calc.pas @@ -309,19 +309,23 @@ function TCalc.RefCalc(const ATheta, Lambda:single; ALayers: TCalcLayers): singl Im: TComplex; a1, a2, b1, b2: TComplex; begin - Im := ToComplex(0, 1); - for i := High(ALayers) - 1 downto 0 do - begin - a1 := MulRZ(ALayers[i + 1].L * 2, ALayers[i + 1].K); - a1 := MulZZ(Im, a1); - a1 := ExpZ(a1); - a1 := MulZZ(ALayers[i + 1].R, a1); - b1 := AddZZ(ALayers[i].RF, a1); - a2 := MulZZ(ALayers[i].RF, a1); - b2 := AddZR(a2, 1); - ALayers[i].R := DivZZ(b1, b2); + try + Im := ToComplex(0, 1); + for i := High(ALayers) - 1 downto 0 do + begin + a1 := MulRZ(ALayers[i + 1].L * 2, ALayers[i + 1].K); + a1 := MulZZ(Im, a1); + a1 := ExpZ(a1); + a1 := MulZZ(ALayers[i + 1].R, a1); + b1 := AddZZ(ALayers[i].RF, a1); + a2 := MulZZ(ALayers[i].RF, a1); + b2 := AddZR(a2, 1); + ALayers[i].R := DivZZ(b1, b2); + end; + Result := sqr(AbsZ(ALayers[0].R)); + except + on Exception do Result := 0; end; - Result := sqr(AbsZ(ALayers[0].R)); end; function Roughness(const RF: TRoughnessFunction; const sigma, s: single):Single; inline; diff --git a/units/unit_Types.pas b/units/unit_Types.pas index f93d02f..7cb9bbf 100644 --- a/units/unit_Types.pas +++ b/units/unit_Types.pas @@ -1,4 +1,13 @@ -unit unit_Types; +(* ***************************************************************************** + * + * X-Ray Calc 3 + * + * Copyright (C) 2001-2023 Oleksiy Penkov + * e-mail: oleksiypenkov@intl.zju.edu.cn + * + ****************************************************************************** *) + +unit unit_Types; interface @@ -17,7 +26,7 @@ interface TProjectGroupType = (gtModel, gtData); TProjRowType = (prGroup, prItem, prFolder, prExtension); - TExtentionType = (etNone, etFunction, etArb, etRough); + TExtentionType = (etNone, etFunction, etTable, etRough); TFunctionForm = (ffNone, ffPoly, ffExp, ffParabolic, ffSQRT); TParameterType = (ptH, ptS, ptRho); @@ -50,7 +59,7 @@ TProjectData = record Form: TFunctionForm; Subj: TParameterType; ); - etArb: + etTable: (); ) end; @@ -143,8 +152,8 @@ TLayerData = record StackID, LayerID, Index: integer; PP: array [1..3] of TFloatArray; public - procedure ClearProfiles; - procedure AddProfilePoint(const H, s, r: Single); + procedure ClearProfiles(const p: integer); + procedure AddProfilePoint(const Val: Single; Index: integer); function ProfileFromSrting(const p: integer; Profile: string): string; function ProfileToSrting(const Subj: TParameterType): string; end; @@ -251,18 +260,13 @@ function TFitStructure.TotalNP: integer; { TLayerData } procedure TLayerData.ClearProfiles; -var - p: Integer; begin - for p := 1 to 3 do - SetLength(PP[p], 0); + SetLength(PP[p], 0); end; -procedure TLayerData.AddProfilePoint(const H, s, r: Single); +procedure TLayerData.AddProfilePoint(const Val: Single; Index: integer); begin - Insert(H, PP[1], MaxInt); - Insert(s, PP[2], MaxInt); - Insert(r, PP[3], MaxInt); + Insert(Val, PP[Index], MaxInt); end; function TLayerData.ProfileFromSrting(const p: integer; Profile: string): string; @@ -290,7 +294,7 @@ function TLayerData.ProfileToSrting(const Subj: TParameterType): string; for I := 0 to High(PP[p]) do begin Val := PP[p][i]; - Result := Format('%s%f;',[Result, Val]) + Result := Format('%s%*.*f;',[Result, 5, 4, Val]) end; end; diff --git a/units/unit_consts.pas b/units/unit_consts.pas index ff72046..8952b0a 100644 --- a/units/unit_consts.pas +++ b/units/unit_consts.pas @@ -16,7 +16,7 @@ interface const - CURRENT_PROJECT_VERSION = 4; + CURRENT_PROJECT_VERSION = 5; PARAMETERS_FILE_NAME = 'params.dsc'; PROJECT_FILE_NAME = 'project.dsc'; @@ -32,6 +32,7 @@ interface APP_HELP_FILENAME = 'xraycalc3.chm'; VERINFO_FILENAME = 'version.info'; LICENSE_FILENAME = 'xraycalc3.lic'; + DEFAULT_PROJECT_NAME = 'NewProject.xrcx'; implementation end.