diff --git a/.gitignore b/.gitignore
index 6d95f9c..048c4ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -265,4 +265,4 @@ __pycache__/
!hasp*.exe
!hasp*.dll
!HiLock.dll
-!Aladdin*.dll
+!Aladdin*.dll
\ No newline at end of file
diff --git a/Geom/DemoBuildGeom.cs b/Geom/DemoBuildGeom.cs
index ed287d0..ebc00ae 100644
--- a/Geom/DemoBuildGeom.cs
+++ b/Geom/DemoBuildGeom.cs
@@ -4,6 +4,11 @@ using Hi.Mech.Topo;
namespace Sample.Geom
{
+ ///
+ /// ## Source Code
+ ///
+ /// [!code-csharp[SampleCode](~/../Hi.Sample/Geom/DemoBuildGeom.cs)]
+ ///
public static class DemoBuildGeom
{
public static List GenGeoms()
diff --git a/Hi.Sample.csproj b/Hi.Sample.csproj
index 40e5e15..6ee9e63 100644
--- a/Hi.Sample.csproj
+++ b/Hi.Sample.csproj
@@ -21,6 +21,12 @@
+
+
+
+
+
+
diff --git a/MachineTool/DemoBuildMachineTool.cs b/MachineTool/DemoBuildMachineTool.cs
index 7cf50a3..48eb248 100644
--- a/MachineTool/DemoBuildMachineTool.cs
+++ b/MachineTool/DemoBuildMachineTool.cs
@@ -17,6 +17,11 @@ namespace Sample.MachineTool
///
/// Provides access to the PMC-B1 machine tool model.
///
+ ///
+ /// ## Source Code
+ ///
+ /// [!code-csharp[SampleCode](~/../Hi.Sample/MachineTool/DemoBuildMachineTool.cs)]
+ ///
public class DemoBuildMachineTool : IGetCodeXyzabcMachineTool
{
static DemoBuildMachineTool()
diff --git a/MachineTool/DemoBuildEmptyMachineTool.cs b/MachineTool/DemoBuildMachineToolWithoutGeometrys.cs
similarity index 83%
rename from MachineTool/DemoBuildEmptyMachineTool.cs
rename to MachineTool/DemoBuildMachineToolWithoutGeometrys.cs
index ac10e4f..24649df 100644
--- a/MachineTool/DemoBuildEmptyMachineTool.cs
+++ b/MachineTool/DemoBuildMachineToolWithoutGeometrys.cs
@@ -6,9 +6,14 @@ using Hi.Numerical.Xyzabc;
namespace Sample.MachineTool
{
///
- /// Demo generating empty machine tool instances for testing or development.
+ /// Demo Build Machine Tool without gemetries setting.
///
- public static class DemoBuildEmptyMachineTool
+ ///
+ /// ## Source Code
+ ///
+ /// [!code-csharp[SampleCode](~/../Hi.Sample/MachineTool/DemoBuildMachineToolWithoutGeometrys.cs)]
+ ///
+ public static class DemoBuildMachineToolWithoutGeometrys
{
///
/// Generates an empty machine tool with basic configuration.
diff --git a/Machining/DemoBuildMachiningProject.cs b/Machining/DemoBuildMachiningProject.cs
index 293cde1..c5f55ab 100644
--- a/Machining/DemoBuildMachiningProject.cs
+++ b/Machining/DemoBuildMachiningProject.cs
@@ -22,6 +22,14 @@ using System.IO;
namespace Sample.Machining
{
+ ///
+ /// This example demonstrates how to create a complete machining project from scratch using HiAPI. It shows the step-by-step process of building all necessary components, including defining custom milling cutters with specific parameters (helix angle, rake angle, etc.), configuring tool holders, setting up a machining tool house with multiple tools, defining the fixture and workpiece geometry, and configuring the machine chain. The sample also demonstrates how to set workpiece material properties and generate the final project XML file. This example is particularly valuable for developers who need to programmatically create complete machining projects without using the HiNC GUI.
+ ///
+ ///
+ /// ### Source Code
+ ///
+ /// [!code-csharp[SampleCode](~/../Hi.Sample/Machining/DemoBuildMachiningProject.cs)]
+ ///
public static class DemoBuildMachiningProject
{
#region CreateMillingCutter1
@@ -125,7 +133,7 @@ namespace Sample.Machining
#region TestMethod
[STAThread]
- public static void Test()
+ static void Main()
{
Console.WriteLine($"License Login.");
License.LogInAll();
diff --git a/Machining/DemoUseMachiningProject.cs b/Machining/DemoUseMachiningProject.cs
index 57f57b0..6729980 100644
--- a/Machining/DemoUseMachiningProject.cs
+++ b/Machining/DemoUseMachiningProject.cs
@@ -7,10 +7,17 @@ using Hi.MongoUtils;
namespace Sample.Machining
{
+ ///
+ /// This sample demonstrates how to work with an existing machining project file and execute NC programs. It covers the entire workflow from project loading to executing machining operations, including setting up event handlers for monitoring machining progress and error conditions. The example shows how to configure runtime parameters like collision detection and material removal rate (MRR) monitoring, execute NC files, and properly clean up resources after machining is complete. It's particularly useful for applications that need to automate the execution of machining operations and handle events during the simulation process.
+ ///
+ ///
+ /// ### Source Code
+ ///
+ /// [!code-csharp[SampleCode](~/../Hi.Sample/Machining/DemoUseMachiningProject.cs)]
+ ///
public static class DemoUseMachiningProject
{
- #region LoadProjectFileAndRunNcFiles
- static void LoadProjectFileAndRunNcFiles()
+ static void Main()
{
#region LicenseAndDatabaseSetup
Console.WriteLine($"License Login.");
@@ -82,13 +89,5 @@ namespace Sample.Machining
Console.WriteLine($"Program end.");
#endregion
}
- #endregion
-
- #region Main
- public static void Main(string[] args)
- {
- LoadProjectFileAndRunNcFiles();
- }
- #endregion
}
}