Compare commits
4
Commits
84f9828233
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7beb671352 | ||
|
|
7ed5372805 | ||
|
|
73bcf2802b | ||
|
|
f83f8b9fb1 |
+2
-2
@@ -11,7 +11,7 @@
|
|||||||
</Description>
|
</Description>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<VersionBuild>0</VersionBuild>
|
<VersionBuild>0</VersionBuild>
|
||||||
<VersionPrefix>3.1.$(VersionBuild)</VersionPrefix>
|
<VersionPrefix>3.2.$(VersionBuild)</VersionPrefix>
|
||||||
<Product>$(AssemblyName)</Product>
|
<Product>$(AssemblyName)</Product>
|
||||||
<ApplicationIcon>techcoordinate.ico</ApplicationIcon>
|
<ApplicationIcon>techcoordinate.ico</ApplicationIcon>
|
||||||
<Copyright>Copyright 2025 Tech Coordinate Co., Ltd.</Copyright>
|
<Copyright>Copyright 2025 Tech Coordinate Co., Ltd.</Copyright>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<ProjectReference Include="..\HiNc\HiNc.csproj" />
|
<ProjectReference Include="..\HiNc\HiNc.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(Configuration)'=='Release'">
|
<ItemGroup Condition="'$(Configuration)'=='Release'">
|
||||||
<PackageReference Include="HiNc" Version="3.1.*" />
|
<PackageReference Include="HiNc" Version="3.2.*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -15,13 +15,13 @@ using System.Xml.Linq;
|
|||||||
namespace Sample.MachineTool
|
namespace Sample.MachineTool
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides access to the PMC-B1 machine tool model.
|
/// Provides access to the Table-B1 machine tool model.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// ### Source Code
|
/// ### Source Code
|
||||||
/// [!code-csharp[SampleCode](~/../Hi.Sample/MachineTool/DemoBuildMachineTool.cs)]
|
/// [!code-csharp[SampleCode](~/../Hi.Sample/MachineTool/DemoBuildMachineTool.cs)]
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class DemoBuildMachineTool : IGetCodeXyzabcMachineTool
|
public class DemoBuildMachineTool
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Registers this type's deserializer with the given <see cref="XFactory"/>
|
/// Registers this type's deserializer with the given <see cref="XFactory"/>
|
||||||
@@ -37,7 +37,7 @@ namespace Sample.MachineTool
|
|||||||
/// Generates an XYZ-ABC machine tool instance from embedded resources.
|
/// Generates an XYZ-ABC machine tool instance from embedded resources.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A configured machine tool model.</returns>
|
/// <returns>A configured machine tool model.</returns>
|
||||||
public static CodeXyzabcMachineTool GenXyzabcMachineTool()
|
public static GeneralXyzabcMachineTool GenXyzabcMachineTool()
|
||||||
{
|
{
|
||||||
CodeXyzabcChain chain = new CodeXyzabcChain("[O][Y][X][C][w];[O][Z][B][S][t]");
|
CodeXyzabcChain chain = new CodeXyzabcChain("[O][Y][X][C][w];[O][Z][B][S][t]");
|
||||||
if (chain.ToolBuckleTransformer is StaticTranslation st)
|
if (chain.ToolBuckleTransformer is StaticTranslation st)
|
||||||
@@ -56,7 +56,7 @@ namespace Sample.MachineTool
|
|||||||
chain.AnchorToSolid.BuildAnchorToSolid(
|
chain.AnchorToSolid.BuildAnchorToSolid(
|
||||||
chain.Asmb.GetDescendantAnchors(), solidMap);
|
chain.Asmb.GetDescendantAnchors(), solidMap);
|
||||||
|
|
||||||
CodeXyzabcMachineTool dst = new CodeXyzabcMachineTool(chain);
|
GeneralXyzabcMachineTool dst = new GeneralXyzabcMachineTool(chain);
|
||||||
dst.GenerateCollisionIndexPairs();
|
dst.GenerateCollisionIndexPairs();
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
@@ -64,7 +64,7 @@ namespace Sample.MachineTool
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The cached machine tool instance.
|
/// The cached machine tool instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
CodeXyzabcMachineTool MachineTool { get; }
|
GeneralXyzabcMachineTool MachineTool { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default constructor that initializes the machine tool model.
|
/// Default constructor that initializes the machine tool model.
|
||||||
@@ -74,7 +74,6 @@ namespace Sample.MachineTool
|
|||||||
MachineTool = GenXyzabcMachineTool();
|
MachineTool = GenXyzabcMachineTool();
|
||||||
}
|
}
|
||||||
#region XML IO
|
#region XML IO
|
||||||
//public PmcB1MachineToolSource(XElement src, object res) : this() { }
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// XML element name for serialization.
|
/// XML element name for serialization.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -82,9 +81,15 @@ namespace Sample.MachineTool
|
|||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public XElement ToXElement() => new XElement(XName);
|
public XElement ToXElement() => new XElement(XName);
|
||||||
#endregion
|
#endregion
|
||||||
/// <inheritdoc/>
|
/// <summary>
|
||||||
public CodeXyzabcMachineTool GetXyzabcMachineTool() => MachineTool;
|
/// Gets the built machine tool.
|
||||||
/// <inheritdoc/>
|
/// </summary>
|
||||||
|
/// <returns>Machine tool.</returns>
|
||||||
|
public GeneralXyzabcMachineTool GetXyzabcMachineTool() => MachineTool;
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the machine tool as a machining chain.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Machining chain.</returns>
|
||||||
public IMachiningChain GetMachiningChain() => MachineTool;
|
public IMachiningChain GetMachiningChain() => MachineTool;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ public static class DemoBuildMachineToolWithoutGeometrys
|
|||||||
/// Generates an empty machine tool with basic configuration.
|
/// Generates an empty machine tool with basic configuration.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A configured but empty machine tool without solids.</returns>
|
/// <returns>A configured but empty machine tool without solids.</returns>
|
||||||
public static CodeXyzabcMachineTool GenEmptyMachineTool()
|
public static GeneralXyzabcMachineTool GenEmptyMachineTool()
|
||||||
{
|
{
|
||||||
CodeXyzabcChain chain = new CodeXyzabcChain("[O][C][w];[O][X][Y][Z][B][S][t]");
|
CodeXyzabcChain chain = new CodeXyzabcChain("[O][C][w];[O][X][Y][Z][B][S][t]");
|
||||||
if (chain.ToolBuckleTransformer is StaticTranslation st)
|
if (chain.ToolBuckleTransformer is StaticTranslation st)
|
||||||
st.Trans = new Vec3d(-200, 200, 400);
|
st.Trans = new Vec3d(-200, 200, 400);
|
||||||
CodeXyzabcMachineTool xyzabcMachineTool = new CodeXyzabcMachineTool(chain);
|
GeneralXyzabcMachineTool xyzabcMachineTool = new GeneralXyzabcMachineTool(chain);
|
||||||
return xyzabcMachineTool;
|
return xyzabcMachineTool;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ public static class DemoBuildGeomOnlyMachiningProject
|
|||||||
|
|
||||||
IProgress<object> progress = null;
|
IProgress<object> progress = null;
|
||||||
localProjectService.MachiningChain
|
localProjectService.MachiningChain
|
||||||
= XFactory.GenByFile<CodeXyzabcMachineTool>(
|
= XFactory.GenByFile<GeneralXyzabcMachineTool>(
|
||||||
"Resource", "MachineTool/PMC-B1/PMC-B1.mt", progress);
|
"Resource", "MachineTool/Table-B1.default/Table-B1.mt", progress);
|
||||||
localProjectService.MachiningChainFile = "PMC-B1/PMC-B1.mt";
|
localProjectService.MachiningChainFile = "Table-B1.default/Table-B1.mt";
|
||||||
|
|
||||||
localProjectService.SaveProject();
|
localProjectService.SaveProject();
|
||||||
|
|
||||||
|
|||||||
@@ -64,11 +64,11 @@ public static class DemoBuildMachiningProject
|
|||||||
InnerBeamProfile = new FluteDependentRatioProfile(),
|
InnerBeamProfile = new FluteDependentRatioProfile(),
|
||||||
MillingCutterOptLimit = new MillingCutterOptOption(),
|
MillingCutterOptLimit = new MillingCutterOptOption(),
|
||||||
};
|
};
|
||||||
//build FluteContourTray property
|
//build Fluting property
|
||||||
double helixAngle_deg = 50;
|
double helixAngle_deg = 50;
|
||||||
double radialRakeAngle_deg = 15;
|
double radialRakeAngle_deg = 15;
|
||||||
double bottomOuterRadius_mm = diameter_mm / 2 - roundRadius_mm;
|
double bottomOuterRadius_mm = diameter_mm / 2 - roundRadius_mm;
|
||||||
millingCutter.FluteContourTray = new UniformContourTray()
|
millingCutter.Fluting = new UniformFluting()
|
||||||
{
|
{
|
||||||
TrackNum = 3,
|
TrackNum = 3,
|
||||||
BaselineOneContour = new FluteContour()
|
BaselineOneContour = new FluteContour()
|
||||||
@@ -111,10 +111,10 @@ public static class DemoBuildMachiningProject
|
|||||||
MillingCutterOptLimit = new MillingCutterOptOption()
|
MillingCutterOptLimit = new MillingCutterOptOption()
|
||||||
};
|
};
|
||||||
|
|
||||||
//build FluteContourTray property
|
//build Fluting property
|
||||||
double helixAngle_deg = 50;
|
double helixAngle_deg = 50;
|
||||||
double radialRakeAngle_deg = 15;
|
double radialRakeAngle_deg = 15;
|
||||||
millingCutter.FluteContourTray = new UniformContourTray()
|
millingCutter.Fluting = new UniformFluting()
|
||||||
{
|
{
|
||||||
TrackNum = 3,
|
TrackNum = 3,
|
||||||
BaselineOneContour = new FluteContour()
|
BaselineOneContour = new FluteContour()
|
||||||
@@ -198,16 +198,16 @@ public static class DemoBuildMachiningProject
|
|||||||
IdealGeom = null,
|
IdealGeom = null,
|
||||||
WorkpieceGeomToFixtureBuckleTransformer = new StaticTranslation(new Vec3d(0, 0, 0)),
|
WorkpieceGeomToFixtureBuckleTransformer = new StaticTranslation(new Vec3d(0, 0, 0)),
|
||||||
CuttingPara = XFactory.GenByFile<ICuttingPara>(
|
CuttingPara = XFactory.GenByFile<ICuttingPara>(
|
||||||
"Resource/CuttingParameter", "Al6061T6.mp", progress),
|
"Resource/CuttingParameter", "Al6061T6.default.mp", progress),
|
||||||
WorkpieceMaterial = XFactory.GenByFile<WorkpieceMaterial>(
|
WorkpieceMaterial = XFactory.GenByFile<WorkpieceMaterial>(
|
||||||
"Resource/WorkpieceMaterial", "Al6061T6.WorkpieceMaterial", progress),
|
"Resource/WorkpieceMaterial", "Al6061T6.default.WorkpieceMaterial", progress),
|
||||||
};
|
};
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ConfigureMachineChain
|
#region ConfigureMachineChain
|
||||||
localProjectService.MachiningChain
|
localProjectService.MachiningChain
|
||||||
= XFactory.GenByFile<CodeXyzabcMachineTool>(
|
= XFactory.GenByFile<GeneralXyzabcMachineTool>(
|
||||||
"Resource", "MachineTool/PMC-B1/PMC-B1.mt", progress);
|
"Resource", "MachineTool/Table-B1.default/Table-B1.mt", progress);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
machiningProject.MakeXmlSourceToFile(projectPath);
|
machiningProject.MakeXmlSourceToFile(projectPath);
|
||||||
|
|||||||
Reference in New Issue
Block a user