migrate doc to wwwroot.
This commit is contained in:
parent
9246bd6c41
commit
f2ab7fe546
@ -4,6 +4,11 @@ using System;
|
||||
|
||||
namespace Sample.Disp
|
||||
{
|
||||
/// <summary>
|
||||
/// Demonstrates the creation and visualization of <see cref="Cylindroid"/> objects.
|
||||
/// Includes examples of building a <see cref="Cylindroid"/> programmatically with
|
||||
/// <see cref="PairZr"/> points and serializing/deserializing via XML.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoCylindroid.cs)]
|
||||
|
@ -5,6 +5,11 @@ using Hi.Coloring;
|
||||
|
||||
namespace Sample.Disp
|
||||
{
|
||||
/// <summary>
|
||||
/// Demonstrates the use of discrete RGB colors for rendering multiple objects.
|
||||
/// Shows how to apply different colors to similar geometric shapes using the
|
||||
/// <see cref="ColorUtil.GetDiscreteRGB_Env"/> method from <see cref="ColorUtil"/> class.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoDiscreteRgb.cs)]
|
||||
|
@ -6,12 +6,21 @@ using Hi.Coloring;
|
||||
|
||||
namespace Sample.Disp
|
||||
{
|
||||
/// <summary>
|
||||
/// Demonstrates various drawing techniques using the HiAPI graphics system.
|
||||
/// Provides examples of primitive drawing, attribute specification, and rendering options.
|
||||
/// Includes methods for drawing lines, points, triangles, and other geometric primitives.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoDrawing.cs)]
|
||||
/// </remarks>
|
||||
public static class DemoDrawing
|
||||
{
|
||||
/// <summary>
|
||||
/// Demonstrates simple line drawing using raw vertex coordinates.
|
||||
/// Creates a basic line strip from three vertices and displays it using DemoUtil.
|
||||
/// </summary>
|
||||
public static void FreeDrawing()
|
||||
{
|
||||
#region DocSite.FreeDrawing
|
||||
@ -24,6 +33,11 @@ namespace Sample.Disp
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Demonstrates various types of line drawing techniques.
|
||||
/// Shows how to create points, line strips, line strips with normals, and colored line strips.
|
||||
/// Illustrates different ways to specify vertex attributes like position, color, and normal.
|
||||
/// </summary>
|
||||
public static void DrawLines()
|
||||
{
|
||||
List<Vec3d> ps;
|
||||
@ -95,6 +109,11 @@ namespace Sample.Disp
|
||||
, drawLineStripWithNormal, drawLineStripWithColor));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Demonstrates drawing triangles using OpenGL primitives.
|
||||
/// Shows how to create colored triangles (CV) and colored triangles with normals (CNV).
|
||||
/// Illustrates packing of vertex attributes (color, normal, position) into arrays for rendering.
|
||||
/// </summary>
|
||||
public static void DrawTrianglesByPrimitives()
|
||||
{
|
||||
int n = 10;// triangle num
|
||||
@ -151,6 +170,11 @@ namespace Sample.Disp
|
||||
new DispList(new RgbTreat(1, 0, 0), drawTrisCV, drawTrisCNV));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Demonstrates drawing 3D triangles using the Tri3d helper class.
|
||||
/// Creates a series of triangles and renders them as both face (filled) and line (wireframe) drawings.
|
||||
/// Shows how to apply different colors to faces and lines of the same geometry.
|
||||
/// </summary>
|
||||
public static void DrawTri3d()
|
||||
{
|
||||
int n = 10;
|
||||
|
@ -4,6 +4,11 @@ using Hi.Native;
|
||||
|
||||
namespace Sample.Disp
|
||||
{
|
||||
/// <summary>
|
||||
/// Demonstrates basic object picking with mouse interaction in the HiAPI system.
|
||||
/// Shows how to create a pickable 3D object that responds to mouse events by changing its appearance.
|
||||
/// Implements the Pickable base class to enable mouse event handling.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoPick1.cs)]
|
||||
@ -35,7 +40,11 @@ namespace Sample.Disp
|
||||
{
|
||||
isMouseOver = false;
|
||||
}
|
||||
public static void Main()
|
||||
/// <summary>
|
||||
/// Entry point for the DemoPick1 example.
|
||||
/// Creates and displays a simple pickable object that changes color on mouse hover.
|
||||
/// </summary>
|
||||
static void Main()
|
||||
{
|
||||
DemoUtil.RunApplication("DemoPick1", new DemoPick1());
|
||||
}
|
||||
|
@ -5,6 +5,11 @@ using Hi.Coloring;
|
||||
|
||||
namespace Sample.Disp
|
||||
{
|
||||
/// <summary>
|
||||
/// Demonstrates advanced object picking with multiple pickable objects.
|
||||
/// Shows how to create and manage multiple pickable objects with different visual appearances.
|
||||
/// Implements proper resource cleanup through the IDisposable interface.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoPick2.cs)]
|
||||
@ -59,7 +64,13 @@ namespace Sample.Disp
|
||||
Dispose(true);
|
||||
}
|
||||
#endregion
|
||||
public static void Main()
|
||||
|
||||
/// <summary>
|
||||
/// Entry point for the DemoPick2 example.
|
||||
/// Creates and displays multiple pickable objects with distinct colors and positions.
|
||||
/// Demonstrates separation of picking behavior from visual representation.
|
||||
/// </summary>
|
||||
static void Main()
|
||||
{
|
||||
DemoUtil.RunApplication("DemoPick2", new DemoPick2());
|
||||
}
|
||||
|
@ -4,6 +4,11 @@ using System;
|
||||
|
||||
namespace Sample.Disp
|
||||
{
|
||||
/// <summary>
|
||||
/// Demonstrates creation of pickable 3D geometry at the primitive level.
|
||||
/// Shows how to assign picking IDs directly to geometry vertices and create interactive triangles.
|
||||
/// Uses a lower-level approach than the Pickable base class for more precise control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoPickable.cs)]
|
||||
@ -13,6 +18,10 @@ namespace Sample.Disp
|
||||
private readonly Drawing draw;
|
||||
private readonly ShowEventPickable pickable;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of DemoPickable.
|
||||
/// Creates a pickable triangle with a specific picking ID for user interaction.
|
||||
/// </summary>
|
||||
public DemoPickable()
|
||||
{
|
||||
pickable = new ShowEventPickable();
|
||||
@ -36,6 +45,11 @@ namespace Sample.Disp
|
||||
draw.ExpandToBox3d(dst);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Entry point for the DemoPickable example.
|
||||
/// Creates and displays a pickable triangle that can respond to mouse events.
|
||||
/// Demonstrates integration of picking functionality with geometric primitives.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
public static void Main()
|
||||
{
|
||||
|
@ -3,6 +3,11 @@ using Hi.Disp;
|
||||
|
||||
namespace Sample.Disp
|
||||
{
|
||||
/// <summary>
|
||||
/// Demonstrates a simple solar system animation using <see cref="IDisplayee"/> interface.
|
||||
/// Shows how to create a hierarchical transform structure with sun, earth and moon using
|
||||
/// <see cref="Mat4d"/> matrices and model matrix stack transformations.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoSatellite.cs)]
|
||||
|
@ -4,6 +4,10 @@ using Hi.Disp;
|
||||
|
||||
namespace Sample.Disp
|
||||
{
|
||||
/// <summary>
|
||||
/// Demonstrates the loading, manipulation, and display of STL (stereolithography) files in HiAPI.
|
||||
/// Shows operations like loading STL data, transforming geometries, and basic visualization.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoStl.cs)]
|
||||
|
@ -6,12 +6,24 @@ using System.Windows;
|
||||
|
||||
namespace Sample.Disp
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides utility functions for running HiAPI display examples in a WPF environment.
|
||||
/// Contains helper methods that simplify the setup and execution of WPF applications with HiAPI rendering.
|
||||
/// Handles common initialization and cleanup tasks for visualization examples.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoUtil.cs)]
|
||||
/// </remarks>
|
||||
public static class DemoUtil
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates and runs a WPF application with a RenderingWindow to display 3D content.
|
||||
/// Handles proper initialization and cleanup of HiAPI resources including MongoDB server,
|
||||
/// display engine, and licensing.
|
||||
/// </summary>
|
||||
/// <param name="title">The title for the application window</param>
|
||||
/// <param name="displayee">The object that implements IDisplayee to be rendered</param>
|
||||
public static void RunApplication(string title, IDisplayee displayee)
|
||||
{
|
||||
Application app = new Application();
|
||||
|
@ -11,7 +11,9 @@ using Hi.Disp;
|
||||
namespace Sample.Machining
|
||||
{
|
||||
/// <summary>
|
||||
/// This example demonstrates how to integrate HiAPI's machining visualization capabilities into a WPF application. It utilizes the Hi.Wpf.Disp namespace to render machining processes in a 3D environment and implement user interaction features like strip position selection. The sample shows how to set up the rendering pipeline, handle camera controls, and connect machining data with the visualization system. This example is essential for developers building interactive CAM applications that require both rich visualization capabilities and user interaction with the machining model.
|
||||
/// Demonstrates integration of machining process visualization with interactive strip position selection.
|
||||
/// Shows how to load a machining project, configure rendering options, and implement user interaction.
|
||||
/// Provides a complete example of a 3D visualization application with HiAPI and WPF.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// ### Source Code
|
||||
@ -20,7 +22,7 @@ namespace Sample.Machining
|
||||
public static class DemoRenderingMachiningProcessAndStripPosSelection
|
||||
{
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
static void Main(string[] args)
|
||||
{
|
||||
#region Initialize Environment
|
||||
License.LogInAll();
|
||||
@ -36,7 +38,7 @@ namespace Sample.Machining
|
||||
Console.WriteLine($"Load Project: {projectPath}");
|
||||
MachiningProject machiningProject = MachiningProject.LoadFile(projectPath);
|
||||
|
||||
machiningProject.ShellApi.MillingStepSelected += (MillingStep step) =>
|
||||
machiningProject.ShellApi.MillingStepSelected += (MachiningStep step) =>
|
||||
{
|
||||
var sourceCommand = step.SourceCommand;
|
||||
Console.WriteLine($"Step Selected: MRR = {step.Mrr_mm3ds} At \"{sourceCommand?.FilePath}\" (Line {sourceCommand?.GetLineNo()}) \"{sourceCommand?.Line}\"");
|
||||
|
Loading…
x
Reference in New Issue
Block a user