fix cubetree init crash.

This commit is contained in:
2026-02-17 15:51:23 +08:00
parent 1a8a3b59d2
commit a21240016f
671 changed files with 12580 additions and 1166 deletions
@@ -150,9 +150,10 @@ Shows operations like loading STL data, transforming geometries, and basic visua
<h2 id="Sample_Disp_DemoStl_remarks">Remarks</h2>
<div class="markdown level0 remarks"><h3 id="source-code">Source Code</h3>
<pre><code class="lang-csharp" name="SampleCode">using Hi.Geom;
<pre><code class="lang-csharp" name="SampleCode">using Hi.Disp;
using Hi.Geom;
using Hi.WpfPlus.Disp;
using System;
using Hi.Disp;
namespace Sample.Disp
{
@@ -193,7 +194,7 @@ namespace Sample.Disp
Console.WriteLine(&quot;bouindingbox.Min: &quot; + bouindingbox.Min);
Console.WriteLine(&quot;bouindingbox.Max: &quot; + bouindingbox.Max);
Console.WriteLine(&quot;bouindingbox.Center: &quot; + bouindingbox.Center);
DispUtil.CallRenderingFrame(&quot;DemoForm&quot;, stl.ToFaceDrawing());
DispFrameUtil.Call(&quot;DemoForm&quot;, stl.ToFaceDrawing());
#endregion
}
@@ -157,40 +157,39 @@ using Hi.Licenses;
using Hi.WpfPlus.Disp;
using System.Windows;
namespace Sample.Disp
namespace Sample.Disp;
/// &lt;summary&gt;
/// 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.
/// &lt;/summary&gt;
/// &lt;remarks&gt;
/// ### Source Code
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoUtil.cs)]
/// &lt;/remarks&gt;
public static class DemoUtil
{
/// &lt;summary&gt;
/// 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.
/// 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.
/// &lt;/summary&gt;
/// &lt;remarks&gt;
/// ### Source Code
/// [!code-csharp[SampleCode](~/../Hi.Sample.Wpf/Disp/DemoUtil.cs)]
/// &lt;/remarks&gt;
public static class DemoUtil
/// &lt;param name=&quot;title&quot;&gt;The title for the application window&lt;/param&gt;
/// &lt;param name=&quot;displayee&quot;&gt;The object that implements IDisplayee to be rendered&lt;/param&gt;
public static void RunApplication(string title, IDisplayee displayee)
{
/// &lt;summary&gt;
/// 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.
/// &lt;/summary&gt;
/// &lt;param name=&quot;title&quot;&gt;The title for the application window&lt;/param&gt;
/// &lt;param name=&quot;displayee&quot;&gt;The object that implements IDisplayee to be rendered&lt;/param&gt;
public static void RunApplication(string title, IDisplayee displayee)
LocalApp.AppBegin();
Application app = new Application();
app.Exit += (o, e) =&gt;
{
LocalApp.AppBegin();
Application app = new Application();
app.Exit += (o, e) =&gt;
{
LocalApp.AppEnd();
};
app.Run(new RenderingWindow()
{
Title = title,
Displayee = displayee
});
}
LocalApp.AppEnd();
};
app.Run(new RenderingWindow()
{
Title = title,
Displayee = displayee
});
}
}
</code></pre></div>