migrate doc to wwwroot.

This commit is contained in:
iambossTC 2025-04-14 17:05:31 +08:00
parent 1cb5f05ba4
commit 784184d6ce
6 changed files with 48 additions and 20 deletions

View File

@ -4,12 +4,21 @@ using Hi.Mech.Topo;
namespace Sample.Geom namespace Sample.Geom
{ {
/// <summary>
/// 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.
/// </summary>
/// <remarks> /// <remarks>
/// ### Source Code /// ### Source Code
/// [!code-csharp[SampleCode](~/../Hi.Sample/Geom/DemoBuildGeom.cs)] /// [!code-csharp[SampleCode](~/../Hi.Sample/Geom/DemoBuildGeom.cs)]
/// </remarks> /// </remarks>
public static class DemoBuildGeom public static class DemoBuildGeom
{ {
/// <summary>
/// Generates a collection of geometric objects for demonstration purposes.
/// Creates various geometry types including boxes, cylindroids, STL files, and transformed geometries.
/// </summary>
/// <returns>A list of geometries implementing the IGetStl interface</returns>
public static List<IGetStl> GenGeoms() public static List<IGetStl> GenGeoms()
{ {
Box3d box = new Box3d(0, 0, -50, 70, 50, 0); Box3d box = new Box3d(0, 0, -50, 70, 50, 0);

View File

@ -3,6 +3,10 @@ using System;
namespace Sample.Geom namespace Sample.Geom
{ {
/// <summary>
/// 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.
/// </summary>
/// <remarks> /// <remarks>
/// ### Source Code /// ### Source Code
/// [!code-csharp[SampleCode](~/../Hi.Sample/Geom/DemoIExpandToBox3d.cs)] /// [!code-csharp[SampleCode](~/../Hi.Sample/Geom/DemoIExpandToBox3d.cs)]

View File

@ -5,6 +5,16 @@ using System;
namespace Sample namespace Sample
{ {
/// <summary>
/// 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.
/// </summary>
/// <remarks>
/// 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)]
/// </remarks>
public static class HelloHiAPI public static class HelloHiAPI
{ {
static int Main(string[] args) static int Main(string[] args)

View File

@ -22,10 +22,11 @@ using System.IO;
namespace Sample.Machining namespace Sample.Machining
{ {
/// <summary> /// <summary>
/// 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 <see cref="MachiningProject"/> programmatically.
/// This sample shows how to set up <see cref="MillingCutter"/>, <see cref="CylindroidHolder"/>,
/// <see cref="StickMachiningTool"/>, <see cref="Fixture"/>, <see cref="Workpiece"/>,
/// and save the project configuration to a file.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// ### Source Code /// ### Source Code

View File

@ -8,7 +8,10 @@ using Hi.MongoUtils;
namespace Sample.Machining namespace Sample.Machining
{ {
/// <summary> /// <summary>
/// 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 <see cref="MachiningProject"/> 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
/// <see cref="IDisposable.Dispose"/>.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// ### Source Code /// ### Source Code

View File

@ -6,27 +6,22 @@ using Hi.Mech.Topo;
namespace Sample.Mech namespace Sample.Mech
{ {
public class Test : IDisplayee /// <summary>
{ /// Demonstrates the creation and visualization of mechanical assemblies with kinematic linkages.
/// <inheritdoc/> /// Shows how to build coordinate systems, establish kinematic relationships, and capture visual output.
public void Display(Bind bind) /// </summary>
{
throw new NotImplementedException();
}
/// <inheritdoc/>
public void ExpandToBox3d(Box3d dst)
{
throw new NotImplementedException();
}
}
/// <remarks> /// <remarks>
/// ### Source Code /// ### Source Code
/// [!code-csharp[SampleCode](~/../Hi.Sample/Mech/DemoTopo1.cs)] /// [!code-csharp[SampleCode](~/../Hi.Sample/Mech/DemoTopo1.cs)]
/// </remarks> /// </remarks>
public static class DemoTopo1 public static class DemoTopo1
{ {
public static (Asmb asmb,Anchor root) GetDemoAsmb() /// <summary>
/// Creates a demonstration assembly with kinematic linkages.
/// Builds a mechanical assembly with multiple anchors and branches, including both static and dynamic transformations.
/// </summary>
/// <returns>A tuple containing the assembly and root anchor</returns>
static (Asmb asmb,Anchor root) GetDemoAsmb()
{ {
#region DocSite.DemoTopo1 #region DocSite.DemoTopo1
//build coordinate systems and the assembly. //build coordinate systems and the assembly.
@ -57,7 +52,13 @@ namespace Sample.Mech
return (asmb,O); return (asmb,O);
} }
public static void SnapshotToFile((Asmb asmb, Anchor root) src)
/// <summary>
/// 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.
/// </summary>
/// <param name="src">A tuple containing the assembly and root anchor for visualization</param>
static void SnapshotToFile((Asmb asmb, Anchor root) src)
{ {
//all the drawing function has to call DispEngine.Init() before using. //all the drawing function has to call DispEngine.Init() before using.
DispEngine.Init(); DispEngine.Init();