fix bug of cubetree init SAT and triangles-tip-cube-corner margin case.

This commit is contained in:
2026-03-25 12:40:37 +08:00
parent ff2cfa6210
commit 8aa17a0280
58 changed files with 1123 additions and 986 deletions
@@ -154,37 +154,6 @@ Class XmlUtil
<h3 id="Hi_Common_XmlUtils_XmlUtil_FileXName" data-uid="Hi.Common.XmlUtils.XmlUtil.FileXName">
FileXName
</h3>
<div class="markdown level1 summary"><p>Alias for XmlFileXName, used for backward compatibility.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string FileXName = &quot;XmlSource&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h3 id="Hi_Common_XmlUtils_XmlUtil_SelfHostName" data-uid="Hi.Common.XmlUtils.XmlUtil.SelfHostName">
SelfHostName
@@ -301,101 +270,6 @@ Class XmlUtil
<a id="Hi_Common_XmlUtils_XmlUtil_GetFileUnwrappedXElement_" data-uid="Hi.Common.XmlUtils.XmlUtil.GetFileUnwrappedXElement*"></a>
<h3 id="Hi_Common_XmlUtils_XmlUtil_GetFileUnwrappedXElement_System_Xml_Linq_XElement_System_String_System_String__" data-uid="Hi.Common.XmlUtils.XmlUtil.GetFileUnwrappedXElement(System.Xml.Linq.XElement,System.String,System.String@)">
GetFileUnwrappedXElement(XElement, string, out string)
</h3>
<div class="markdown level1 summary"><p>Unwraps a file reference XML element to load its actual content.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static XElement GetFileUnwrappedXElement(this XElement src, string baseDirectory, out string relFile)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>The source XML element that may be a file reference</p>
</dd>
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Output parameter that receives the relative file path if src is a file reference, or null otherwise</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>If src is a file reference element, returns the XML content loaded from the referenced file;
otherwise, returns the original element</p>
</dd>
</dl>
<a id="Hi_Common_XmlUtils_XmlUtil_GetFileWrappedXElement_" data-uid="Hi.Common.XmlUtils.XmlUtil.GetFileWrappedXElement*"></a>
<h3 id="Hi_Common_XmlUtils_XmlUtil_GetFileWrappedXElement_System_Xml_Linq_XElement_System_String_System_String_System_Boolean_" data-uid="Hi.Common.XmlUtils.XmlUtil.GetFileWrappedXElement(System.Xml.Linq.XElement,System.String,System.String,System.Boolean)">
GetFileWrappedXElement(XElement, string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Wraps an XML element in a file reference element or returns it as-is.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static XElement GetFileWrappedXElement(this XElement src, string baseDirectory, string sourceFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>The source XML element to wrap</p>
</dd>
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving paths</p>
</dd>
<dt><code>sourceFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path to save the element to, or null to return the element as-is</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>See <a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html#Hi_Common_XmlUtils_IMakeXmlSource_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a> for parameter description.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>If sourceFile is null, returns the original element;
otherwise, saves the element to the specified file and returns a file reference element</p>
</dd>
</dl>
<a id="Hi_Common_XmlUtils_XmlUtil_GetFirstChildElement_" data-uid="Hi.Common.XmlUtils.XmlUtil.GetFirstChildElement*"></a>
<h3 id="Hi_Common_XmlUtils_XmlUtil_GetFirstChildElement_System_Xml_Linq_XElement_" data-uid="Hi.Common.XmlUtils.XmlUtil.GetFirstChildElement(System.Xml.Linq.XElement)">
@@ -528,10 +402,102 @@ otherwise, saves the element to the specified file and returns a file reference
<a id="Hi_Common_XmlUtils_XmlUtil_MakeXmlSourceFile_" data-uid="Hi.Common.XmlUtils.XmlUtil.MakeXmlSourceFile*"></a>
<a id="Hi_Common_XmlUtils_XmlUtil_LoadFromFileRef_" data-uid="Hi.Common.XmlUtils.XmlUtil.LoadFromFileRef*"></a>
<h3 id="Hi_Common_XmlUtils_XmlUtil_MakeXmlSourceFile_Hi_Common_XmlUtils_IMakeXmlSource_System_String_System_Boolean_" data-uid="Hi.Common.XmlUtils.XmlUtil.MakeXmlSourceFile(Hi.Common.XmlUtils.IMakeXmlSource,System.String,System.Boolean)">
MakeXmlSourceFile(IMakeXmlSource, string, bool)
<h3 id="Hi_Common_XmlUtils_XmlUtil_LoadFromFileRef_System_Xml_Linq_XElement_System_String_System_String__" data-uid="Hi.Common.XmlUtils.XmlUtil.LoadFromFileRef(System.Xml.Linq.XElement,System.String,System.String@)">
LoadFromFileRef(XElement, string, out string)
</h3>
<div class="markdown level1 summary"><p>Unwraps a file reference XML element to load its actual content.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static XElement LoadFromFileRef(this XElement src, string baseDirectory, out string relFile)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>The source XML element that may be a file reference</p>
</dd>
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving paths</p>
</dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Output parameter that receives the relative file path if src is a file reference, or null otherwise</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>If src is a file reference element, returns the XML content loaded from the referenced file;
otherwise, returns the original element</p>
</dd>
</dl>
<a id="Hi_Common_XmlUtils_XmlUtil_LoadWithFileRefSupport_" data-uid="Hi.Common.XmlUtils.XmlUtil.LoadWithFileRefSupport*"></a>
<h3 id="Hi_Common_XmlUtils_XmlUtil_LoadWithFileRefSupport_System_Xml_Linq_XElement_System_String_Hi_Common_XmlUtils_SetFileDelegate_" data-uid="Hi.Common.XmlUtils.XmlUtil.LoadWithFileRefSupport(System.Xml.Linq.XElement,System.String,Hi.Common.XmlUtils.SetFileDelegate)">
LoadWithFileRefSupport(XElement, string, SetFileDelegate)
</h3>
<div class="markdown level1 summary"><p>Unwraps an XML element if it contains a file reference element.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static XElement LoadWithFileRefSupport(this XElement src, string baseDirectory, SetFileDelegate setFileAction)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>The source XML element that may contain a file reference</p>
</dd>
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving paths</p>
</dd>
<dt><code>setFileAction</code> <a class="xref" href="Hi.Common.XmlUtils.SetFileDelegate.html">SetFileDelegate</a></dt>
<dd><p>Action to execute with the file path, or null if no file reference is found</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>If the source element contains a file reference, returns the XML content loaded from the referenced file;
otherwise, returns the original element</p>
</dd>
</dl>
<a id="Hi_Common_XmlUtils_XmlUtil_MakeXmlSourceToFile_" data-uid="Hi.Common.XmlUtils.XmlUtil.MakeXmlSourceToFile*"></a>
<h3 id="Hi_Common_XmlUtils_XmlUtil_MakeXmlSourceToFile_Hi_Common_XmlUtils_IMakeXmlSource_System_String_System_Boolean_" data-uid="Hi.Common.XmlUtils.XmlUtil.MakeXmlSourceToFile(Hi.Common.XmlUtils.IMakeXmlSource,System.String,System.Boolean)">
MakeXmlSourceToFile(IMakeXmlSource, string, bool)
</h3>
@@ -540,7 +506,7 @@ otherwise, saves the element to the specified file and returns a file reference
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void MakeXmlSourceFile(this IMakeXmlSource src, string filePath, bool exhibitionOnly = false)</code></pre>
<pre><code class="lang-csharp hljs">public static void MakeXmlSourceToFile(this IMakeXmlSource src, string filePath, bool exhibitionOnly = false)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@@ -567,10 +533,10 @@ otherwise, saves the element to the specified file and returns a file reference
<a id="Hi_Common_XmlUtils_XmlUtil_MakeXmlSourceWithRebaseFile_" data-uid="Hi.Common.XmlUtils.XmlUtil.MakeXmlSourceWithRebaseFile*"></a>
<a id="Hi_Common_XmlUtils_XmlUtil_MakeXmlSourceToFileRef_" data-uid="Hi.Common.XmlUtils.XmlUtil.MakeXmlSourceToFileRef*"></a>
<h3 id="Hi_Common_XmlUtils_XmlUtil_MakeXmlSourceWithRebaseFile_Hi_Common_XmlUtils_IMakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.Common.XmlUtils.XmlUtil.MakeXmlSourceWithRebaseFile(Hi.Common.XmlUtils.IMakeXmlSource,System.String,System.String,System.Boolean)">
MakeXmlSourceWithRebaseFile(IMakeXmlSource, string, string, bool)
<h3 id="Hi_Common_XmlUtils_XmlUtil_MakeXmlSourceToFileRef_Hi_Common_XmlUtils_IMakeXmlSource_System_String_System_String_System_Boolean_" data-uid="Hi.Common.XmlUtils.XmlUtil.MakeXmlSourceToFileRef(Hi.Common.XmlUtils.IMakeXmlSource,System.String,System.String,System.Boolean)">
MakeXmlSourceToFileRef(IMakeXmlSource, string, string, bool)
</h3>
@@ -579,7 +545,7 @@ otherwise, saves the element to the specified file and returns a file reference
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static XElement MakeXmlSourceWithRebaseFile(this IMakeXmlSource src, string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
<pre><code class="lang-csharp hljs">public static XElement MakeXmlSourceToFileRef(this IMakeXmlSource src, string baseDirectory, string relFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@@ -709,6 +675,55 @@ otherwise, saves the XML to the specified file and returns a file reference elem
<a id="Hi_Common_XmlUtils_XmlUtil_SaveToFileRef_" data-uid="Hi.Common.XmlUtils.XmlUtil.SaveToFileRef*"></a>
<h3 id="Hi_Common_XmlUtils_XmlUtil_SaveToFileRef_System_Xml_Linq_XElement_System_String_System_String_System_Boolean_" data-uid="Hi.Common.XmlUtils.XmlUtil.SaveToFileRef(System.Xml.Linq.XElement,System.String,System.String,System.Boolean)">
SaveToFileRef(XElement, string, string, bool)
</h3>
<div class="markdown level1 summary"><p>Wraps an XML element in a file reference element or returns it as-is.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static XElement SaveToFileRef(this XElement src, string baseDirectory, string sourceFile, bool exhibitionOnly)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>The source XML element to wrap</p>
</dd>
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving paths</p>
</dd>
<dt><code>sourceFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The relative file path to save the element to, or null to return the element as-is</p>
</dd>
<dt><code>exhibitionOnly</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>See <a class="xref" href="Hi.Common.XmlUtils.IMakeXmlSource.html#Hi_Common_XmlUtils_IMakeXmlSource_MakeXmlSource_System_String_System_String_System_Boolean_">MakeXmlSource(string, string, bool)</a> for parameter description.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>If sourceFile is null, returns the original element;
otherwise, saves the element to the specified file and returns a file reference element</p>
</dd>
</dl>
<a id="Hi_Common_XmlUtils_XmlUtil_SetNameNote_" data-uid="Hi.Common.XmlUtils.XmlUtil.SetNameNote*"></a>
<h3 id="Hi_Common_XmlUtils_XmlUtil_SetNameNote_Hi_Common_INameNote_System_Xml_Linq_XElement_" data-uid="Hi.Common.XmlUtils.XmlUtil.SetNameNote(Hi.Common.INameNote,System.Xml.Linq.XElement)">
@@ -793,52 +808,6 @@ otherwise, saves the XML to the specified file and returns a file reference elem
<a id="Hi_Common_XmlUtils_XmlUtil_UnWrapIfFileBased_" data-uid="Hi.Common.XmlUtils.XmlUtil.UnWrapIfFileBased*"></a>
<h3 id="Hi_Common_XmlUtils_XmlUtil_UnWrapIfFileBased_System_Xml_Linq_XElement_System_String_Hi_Common_XmlUtils_SetFileDelegate_" data-uid="Hi.Common.XmlUtils.XmlUtil.UnWrapIfFileBased(System.Xml.Linq.XElement,System.String,Hi.Common.XmlUtils.SetFileDelegate)">
UnWrapIfFileBased(XElement, string, SetFileDelegate)
</h3>
<div class="markdown level1 summary"><p>Unwraps an XML element if it contains a file reference element.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static XElement UnWrapIfFileBased(this XElement src, string baseDirectory, SetFileDelegate setFileAction)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>src</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>The source XML element that may contain a file reference</p>
</dd>
<dt><code>baseDirectory</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The base directory for resolving paths</p>
</dd>
<dt><code>setFileAction</code> <a class="xref" href="Hi.Common.XmlUtils.SetFileDelegate.html">SetFileDelegate</a></dt>
<dd><p>Action to execute with the file path, or null if no file reference is found</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>If the source element contains a file reference, returns the XML content loaded from the referenced file;
otherwise, returns the original element</p>
</dd>
</dl>
</article>