Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
seto77 committed Jan 13, 2024
1 parent ab84901 commit 6ceb5ff
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 31 deletions.
17 changes: 11 additions & 6 deletions CSManager/CSManager.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2024.1.4.0750</AssemblyVersion>
<FileVersion>2024.1.4.0750</FileVersion>
<AssemblyVersion>2024.1.4.0758</AssemblyVersion>
<FileVersion>2024.1.4.0758</FileVersion>
<ApplicationIcon>App.ico</ApplicationIcon>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
</PropertyGroup>
Expand All @@ -15,10 +15,18 @@
</PropertyGroup>

<ItemGroup>
<None Remove="doc\CSManager%28en%29.pdf" />
<None Remove="doc\CSManager%28ja%29.pdf" />
<None Remove="StdDb.cdb3" />
</ItemGroup>

<ItemGroup>
<Content Include="doc\CSManager(en).pdf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="doc\CSManager(ja).pdf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="StdDb.cdb3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand All @@ -38,9 +46,6 @@
</ItemGroup>

<ItemGroup>
<None Update="doc\CSManager%28ja%29.pdf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
Expand Down
14 changes: 1 addition & 13 deletions CSManager/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,14 @@ static class Version
static public string Software =
"CSManager"
;

static public string VersionAndDate { get => History.Remove(0, 10).Remove(20); }
static public string RecentHistory
{
get
{
var list = History.Remove(0, 10).Split(new string[] { "\r\n " }, StringSplitOptions.RemoveEmptyEntries);
var str = "";
for (int i = 0; i < 5; i++)
str += list[i] + "<br>\r\n";
return str;
}
}

static public int AMCSD = 21004;
static public int COD = 506047;

static public string History =
"History" +
"\r\n ver1.895(2024/01/24) Fixed a broken link to manual pages." +
"\r\n ver1.896(2024/01/04) Updated .Net Desktop Runtime to 8.0. Fixed a broken link to manual pages." +
"\r\n ver1.895(2023/09/29) Renewed AMCSD database (contains 21,004) and COD database (506,047)." +
"\r\n ver1.894(2022/11/16) Updated .Net Desktop Runtime to 7.0. Renewed COD database (494,508). Changed algorithm when saving and loading." +
"\r\n ver1.893(2022/10/27) Improved search function." +
Expand Down
Binary file added CSManager/doc/CSManager(en).docx
Binary file not shown.
Binary file added CSManager/doc/CSManager(en).pdf
Binary file not shown.
Binary file modified CSManager/doc/CSManager(ja).docx
Binary file not shown.
Binary file removed CSManager/doc/CSManagerl(en).docx
Binary file not shown.
6 changes: 3 additions & 3 deletions Crystallography.Controls/Crystallography.Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Library</OutputType>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2024.1.4.0748</AssemblyVersion>
<FileVersion>2024.1.4.0748</FileVersion>
<AssemblyVersion>2024.1.11.1015</AssemblyVersion>
<FileVersion>2024.1.11.1015</FileVersion>
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
<ApplicationUseCompatibleTextRendering>true</ApplicationUseCompatibleTextRendering>
<ApplicationVisualStyles>true</ApplicationVisualStyles>
Expand Down Expand Up @@ -33,7 +33,7 @@
<ItemGroup>
<PackageReference Include="IronPython" Version="3.4.1" />
<PackageReference Include="SimdLinq" Version="1.3.2" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
</ItemGroup>

<ItemGroup>
Expand Down
Binary file modified Crystallography.Controls/doc/CrystalInformationManual.docx
Binary file not shown.
4 changes: 2 additions & 2 deletions Crystallography/Crystallography.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<OutputType>Library</OutputType>
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyVersion>2024.1.4.0748</AssemblyVersion>
<FileVersion>2024.1.4.0748</FileVersion>
<AssemblyVersion>2024.1.11.1015</AssemblyVersion>
<FileVersion>2024.1.11.1015</FileVersion>
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
</PropertyGroup>

Expand Down
14 changes: 7 additions & 7 deletions Crystallography/Euler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ public static Matrix3D SerchEulerAngleFromZoneAxes(ZoneAxis za1, ZoneAxis za2, Z
var v2 = Vector3DBase.Normarize(za2.u * cry.A_Axis + za2.v * cry.B_Axis + za2.w * cry.C_Axis);
var v3 = Vector3DBase.Normarize(za3.u * cry.A_Axis + za3.v * cry.B_Axis + za3.w * cry.C_Axis);

Vector3D V1 = new Vector3D(-Math.Sin(tilt1), -Math.Cos(tilt1) * Math.Sin(azimuth1), Math.Cos(tilt1) * Math.Cos(azimuth1));
Vector3D V2 = new Vector3D(-Math.Sin(tilt2), -Math.Cos(tilt2) * Math.Sin(azimuth2), Math.Cos(tilt2) * Math.Cos(azimuth2));
Vector3D V3 = new Vector3D(-Math.Sin(tilt3), -Math.Cos(tilt3) * Math.Sin(azimuth3), Math.Cos(tilt3) * Math.Cos(azimuth3));
Vector3D V1 = new(-Math.Sin(tilt1), -Math.Cos(tilt1) * Math.Sin(azimuth1), Math.Cos(tilt1) * Math.Cos(azimuth1));
Vector3D V2 = new(-Math.Sin(tilt2), -Math.Cos(tilt2) * Math.Sin(azimuth2), Math.Cos(tilt2) * Math.Cos(azimuth2));
Vector3D V3 = new(-Math.Sin(tilt3), -Math.Cos(tilt3) * Math.Sin(azimuth3), Math.Cos(tilt3) * Math.Cos(azimuth3));

double Phi, phi1, phi2, PhiStart, PhiEnd, phi1Start, phi1End, phi2Start, phi2End, step, PhiBest, phi1Best, phi2Best;
double dev, devTemp;
Expand Down Expand Up @@ -415,18 +415,18 @@ public static double[] DecomposeMatrix2(Matrix3D targetRotation, params (Vector3
return -(mat * rotInv).SumOfDiagonalCompenent();
});

var temp = func(new DVec(initialAngles.ToArray()));
var temp = func(new DVec([.. initialAngles]));
try
{
var result = FindMinimum.OfFunction(func, new DVec(initialAngles.ToArray()), 1e-12, 100000).ToList();
var result = FindMinimum.OfFunction(func, new DVec([.. initialAngles]), 1e-12, 100000).ToList();
for (int i = 0; i < settings.Length; i++)
if (!settings[i].Variable)
result.Insert(i, settings[i].Angle);
return result.ToArray();
return [.. result];
}
catch
{
return initialAngles.ToArray();
return [.. initialAngles];
}
}

Expand Down

0 comments on commit 6ceb5ff

Please sign in to comment.