diff --git a/Geom/DemoBuildGeom.cs b/Geom/DemoBuildGeom.cs index bc01a81..7aec126 100644 --- a/Geom/DemoBuildGeom.cs +++ b/Geom/DemoBuildGeom.cs @@ -4,12 +4,21 @@ using Hi.Mech.Topo; namespace Sample.Geom { + /// + /// Demonstrates the creation and manipulation of geometric objects in HiAPI. + /// Shows how to create and transform various geometry types including boxes, cylindroids, and STL files. + /// /// /// ### Source Code /// [!code-csharp[SampleCode](~/../Hi.Sample/Geom/DemoBuildGeom.cs)] /// public static class DemoBuildGeom { + /// + /// Generates a collection of geometric objects for demonstration purposes. + /// Creates various geometry types including boxes, cylindroids, STL files, and transformed geometries. + /// + /// A list of geometries implementing the IGetStl interface public static List GenGeoms() { Box3d box = new Box3d(0, 0, -50, 70, 50, 0); diff --git a/Geom/DemoIExpandToBox3d.cs b/Geom/DemoIExpandToBox3d.cs index 3ed05a2..9720244 100644 --- a/Geom/DemoIExpandToBox3d.cs +++ b/Geom/DemoIExpandToBox3d.cs @@ -3,6 +3,10 @@ using System; namespace Sample.Geom { + /// + /// Demonstrates how to create and calculate bounding boxes for different geometric objects. + /// Shows the use of Box3d to encompass multiple geometric elements with a single boundary. + /// /// /// ### Source Code /// [!code-csharp[SampleCode](~/../Hi.Sample/Geom/DemoIExpandToBox3d.cs)] diff --git a/HelloHiAPI.cs b/HelloHiAPI.cs index baa5fd6..a6c06df 100644 --- a/HelloHiAPI.cs +++ b/HelloHiAPI.cs @@ -5,6 +5,16 @@ using System; namespace Sample { + /// + /// A sample class demonstrating initialization and usage of the HiAPI framework. + /// Shows the basic setup of display engine, MongoDB server, licensing, and other core functionality. + /// + /// + /// This example serves as an entry point for those getting started with HiAPI. + /// It demonstrates proper initialization and teardown of key components. + /// ### Source Code + /// [!code-csharp[SampleCode](~/../Hi.Sample/HelloHiAPI.cs)] + /// public static class HelloHiAPI { static int Main(string[] args) diff --git a/Machining/DemoBuildMachiningProject.cs b/Machining/DemoBuildMachiningProject.cs index 1524b17..dc15047 100644 --- a/Machining/DemoBuildMachiningProject.cs +++ b/Machining/DemoBuildMachiningProject.cs @@ -22,10 +22,11 @@ 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. + /// Demonstrates how to create and configure a programmatically. + /// This sample shows how to set up , , + /// , , , + /// and save the project configuration to a file. /// /// /// ### Source Code diff --git a/Machining/DemoUseMachiningProject.cs b/Machining/DemoUseMachiningProject.cs index fa15d80..cba3216 100644 --- a/Machining/DemoUseMachiningProject.cs +++ b/Machining/DemoUseMachiningProject.cs @@ -8,7 +8,10 @@ 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. + /// Demonstrates how to load and use an existing instance. + /// This sample shows how to set up event handlers for messages and machining step objects, + /// execute NC files, and properly manage project resources using + /// . /// /// /// ### Source Code diff --git a/Mech/DemoTopo1.cs b/Mech/DemoTopo1.cs index 2429458..9605857 100644 --- a/Mech/DemoTopo1.cs +++ b/Mech/DemoTopo1.cs @@ -6,27 +6,22 @@ using Hi.Mech.Topo; namespace Sample.Mech { - public class Test : IDisplayee - { - /// - public void Display(Bind bind) - { - throw new NotImplementedException(); - } - /// - public void ExpandToBox3d(Box3d dst) - { - throw new NotImplementedException(); - } - } - + /// + /// Demonstrates the creation and visualization of mechanical assemblies with kinematic linkages. + /// Shows how to build coordinate systems, establish kinematic relationships, and capture visual output. + /// /// /// ### Source Code /// [!code-csharp[SampleCode](~/../Hi.Sample/Mech/DemoTopo1.cs)] /// public static class DemoTopo1 { - public static (Asmb asmb,Anchor root) GetDemoAsmb() + /// + /// Creates a demonstration assembly with kinematic linkages. + /// Builds a mechanical assembly with multiple anchors and branches, including both static and dynamic transformations. + /// + /// A tuple containing the assembly and root anchor + static (Asmb asmb,Anchor root) GetDemoAsmb() { #region DocSite.DemoTopo1 //build coordinate systems and the assembly. @@ -57,7 +52,13 @@ namespace Sample.Mech return (asmb,O); } - public static void SnapshotToFile((Asmb asmb, Anchor root) src) + + /// + /// Captures the assembly visualization and saves it to a file. + /// Initializes the display engine, sets up the assembly visualization with an isometric view, and saves a snapshot to a bitmap file. + /// + /// A tuple containing the assembly and root anchor for visualization + static void SnapshotToFile((Asmb asmb, Anchor root) src) { //all the drawing function has to call DispEngine.Init() before using. DispEngine.Init();