fix SoftNcRunner GM code normalization.

This commit is contained in:
2026-05-06 13:21:19 +08:00
parent 0fe9497552
commit 2f57932000
1238 changed files with 69405 additions and 22511 deletions
@@ -213,8 +213,8 @@ Class SoftNcRunner
<a id="Hi_NcParsers_SoftNcRunner__ctor_" data-uid="Hi.NcParsers.SoftNcRunner.#ctor*"></a>
<h3 id="Hi_NcParsers_SoftNcRunner__ctor_System_Xml_Linq_XElement_System_String_System_String_" data-uid="Hi.NcParsers.SoftNcRunner.#ctor(System.Xml.Linq.XElement,System.String,System.String)">
SoftNcRunner(XElement, string, string)
<h3 id="Hi_NcParsers_SoftNcRunner__ctor_System_Xml_Linq_XElement_System_String_System_String_System_IProgress_System_Object__System_Object___" data-uid="Hi.NcParsers.SoftNcRunner.#ctor(System.Xml.Linq.XElement,System.String,System.String,System.IProgress{System.Object},System.Object[])">
SoftNcRunner(XElement, string, string, IProgress&lt;object&gt;, object[])
</h3>
@@ -222,7 +222,7 @@ Class SoftNcRunner
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public SoftNcRunner(XElement src, string baseDirectory, string relFile)</code></pre>
<pre><code class="lang-csharp hljs">public SoftNcRunner(XElement src, string baseDirectory, string relFile, IProgress&lt;object&gt; progress, object[] res = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@@ -233,6 +233,10 @@ Class SoftNcRunner
<dd></dd>
<dt><code>relFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>progress</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd></dd>
<dt><code>res</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</dt>
<dd></dd>
</dl>
@@ -281,38 +285,6 @@ Class SoftNcRunner
<a id="Hi_NcParsers_SoftNcRunner_FileIndexOnRunCommand_" data-uid="Hi.NcParsers.SoftNcRunner.FileIndexOnRunCommand*"></a>
<h3 id="Hi_NcParsers_SoftNcRunner_FileIndexOnRunCommand" data-uid="Hi.NcParsers.SoftNcRunner.FileIndexOnRunCommand">
FileIndexOnRunCommand
</h3>
<div class="markdown level1 summary"><p>Gets the current file index for run commands.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int FileIndexOnRunCommand { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_SoftNcRunner_HeidenhainNcRunner_" data-uid="Hi.NcParsers.SoftNcRunner.HeidenhainNcRunner*"></a>
<h3 id="Hi_NcParsers_SoftNcRunner_HeidenhainNcRunner" data-uid="Hi.NcParsers.SoftNcRunner.HeidenhainNcRunner">
@@ -627,36 +599,125 @@ Class SoftNcRunner
</h2>
<a id="Hi_NcParsers_SoftNcRunner_GetFullSyntaxPieceLinkedList_" data-uid="Hi.NcParsers.SoftNcRunner.GetFullSyntaxPieceLinkedList*"></a>
<a id="Hi_NcParsers_SoftNcRunner_ConfigureByMachiningChain_" data-uid="Hi.NcParsers.SoftNcRunner.ConfigureByMachiningChain*"></a>
<h3 id="Hi_NcParsers_SoftNcRunner_GetFullSyntaxPieceLinkedList_System_String_System_Collections_Generic_IEnumerable_System_String__Hi_NcParsers_NcDiagnosticProgress_System_Threading_CancellationToken_" data-uid="Hi.NcParsers.SoftNcRunner.GetFullSyntaxPieceLinkedList(System.String,System.Collections.Generic.IEnumerable{System.String},Hi.NcParsers.NcDiagnosticProgress,System.Threading.CancellationToken)">
GetFullSyntaxPieceLinkedList(string, IEnumerable&lt;string&gt;, NcDiagnosticProgress, CancellationToken)
<h3 id="Hi_NcParsers_SoftNcRunner_ConfigureByMachiningChain_Hi_Mech_IMachiningChain_" data-uid="Hi.NcParsers.SoftNcRunner.ConfigureByMachiningChain(Hi.Mech.IMachiningChain)">
ConfigureByMachiningChain(IMachiningChain)
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 summary"><p>Configures this <a class="xref" href="Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> to match the kinematic
<code class="paramref">chain</code> of a machine tool. Registers every axis
present on the chain into the <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html">IMachineAxisConfig</a> in
<a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcDependencyList">NcDependencyList</a> (linear or rotary, derived from
whether the chain's transformer implements
<a class="xref" href="Hi.Mech.Topo.IDynamicRotation.html">IDynamicRotation</a>). When the chain carries any rotary
axis, a <a class="xref" href="Hi.NcParsers.Dependencys.Generic.NcKinematicsDependency.html">NcKinematicsDependency</a> is appended so that
downstream syntaxes / semantics (e.g. <code>G53.1</code>, <code>G68.2</code>,
<a class="xref" href="Hi.NcParsers.Semantics.McLinearMotionSemantic.html">McLinearMotionSemantic</a>) can resolve
orientation; its <a class="xref" href="Hi.NcParsers.Dependencys.Generic.NcKinematicsDependency.html#Hi_NcParsers_Dependencys_Generic_NcKinematicsDependency_KinematicsProvider">KinematicsProvider</a>
is intentionally left null — the owning project service wires it up
after the solver instance is available (see
<code>LocalProjectService.BuildCoordinateConverter</code>).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public LazyLinkedList&lt;SyntaxPiece&gt; GetFullSyntaxPieceLinkedList(string relFilePath, IEnumerable&lt;string&gt; lines, NcDiagnosticProgress ncDiagnosticProgress, CancellationToken cancellationToken)</code></pre>
<pre><code class="lang-csharp hljs">public void ConfigureByMachiningChain(IMachiningChain chain)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>relFilePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>lines</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
<dd></dd>
<dt><code>ncDiagnosticProgress</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>
<dt><code>cancellationToken</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken">CancellationToken</a></dt>
<dt><code>chain</code> <a class="xref" href="Hi.Mech.IMachiningChain.html">IMachiningChain</a></dt>
<dd><p>The machining chain whose axes and kinematics
the runner should match. No-op when null.</p>
</dd>
</dl>
<a id="Hi_NcParsers_SoftNcRunner_EnumerateSnapshotSyntaxs_" data-uid="Hi.NcParsers.SoftNcRunner.EnumerateSnapshotSyntaxs*"></a>
<h3 id="Hi_NcParsers_SoftNcRunner_EnumerateSnapshotSyntaxs" data-uid="Hi.NcParsers.SoftNcRunner.EnumerateSnapshotSyntaxs">
EnumerateSnapshotSyntaxs()
</h3>
<div class="markdown level1 summary"><p>Enumerates every <a class="xref" href="Hi.NcParsers.InspectionSyntaxs.SnapshotSyntax.html">SnapshotSyntax</a> reachable from
<a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcSyntaxList">NcSyntaxList</a>, including those nested inside any
top-level <a class="xref" href="Hi.NcParsers.Syntaxs.BundleSyntax.html">BundleSyntax</a>'s inner list.
Yields in pipeline-execution order: each top-level slot in turn,
and within a bundle slot the bundle's <code>SyntaxList</code> order.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IEnumerable&lt;SnapshotSyntax&gt; EnumerateSnapshotSyntaxs()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.SnapshotSyntax.html">SnapshotSyntax</a>&gt;</dt>
<dd></dd>
</dl>
<a id="Hi_NcParsers_SoftNcRunner_FromLegacyNcEnvXml_" data-uid="Hi.NcParsers.SoftNcRunner.FromLegacyNcEnvXml*"></a>
<h3 id="Hi_NcParsers_SoftNcRunner_FromLegacyNcEnvXml_System_Xml_Linq_XElement_Hi_Mech_IMachiningChain_" data-uid="Hi.NcParsers.SoftNcRunner.FromLegacyNcEnvXml(System.Xml.Linq.XElement,Hi.Mech.IMachiningChain)">
FromLegacyNcEnvXml(XElement, IMachiningChain)
</h3>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> from legacy <code>HardNcEnv</code> XML.
Picks the brand-specific runner by the <code>CncBrand</code> element and
populates dependencies from the legacy XML values. When a
<code class="paramref">chain</code> is provided, also calls
<a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_ConfigureByMachiningChain_Hi_Mech_IMachiningChain_">ConfigureByMachiningChain(IMachiningChain)</a> so the runner's axis
configuration and kinematics dependency reflect the machine tool
loaded alongside the legacy project.
Remove this region when <code>HardNcEnv</code> is fully replaced.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static SoftNcRunner FromLegacyNcEnvXml(XElement ncEnvXml, IMachiningChain chain = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>ncEnvXml</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.linq.xelement">XElement</a></dt>
<dd><p>The inner XML element of the legacy <code>HardNcEnv</code>.</p>
</dd>
<dt><code>chain</code> <a class="xref" href="Hi.Mech.IMachiningChain.html">IMachiningChain</a></dt>
<dd><p>Optional machining chain for axis/kinematics configuration.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html">LazyLinkedList</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd></dd>
<dt><a class="xref" href="Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a></dt>
<dd><p>A configured <a class="xref" href="Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a>.</p>
</dd>
</dl>
@@ -669,10 +730,10 @@ Class SoftNcRunner
<a id="Hi_NcParsers_SoftNcRunner_GetSourcedActEntrys_" data-uid="Hi.NcParsers.SoftNcRunner.GetSourcedActEntrys*"></a>
<a id="Hi_NcParsers_SoftNcRunner_GetSourcedActEntrysFromNode_" data-uid="Hi.NcParsers.SoftNcRunner.GetSourcedActEntrysFromNode*"></a>
<h3 id="Hi_NcParsers_SoftNcRunner_GetSourcedActEntrys_Hi_Common_Collections_LazyLinkedList_Hi_NcParsers_Syntaxs_SyntaxPiece__Hi_NcParsers_NcDiagnosticProgress_System_Threading_CancellationToken_" data-uid="Hi.NcParsers.SoftNcRunner.GetSourcedActEntrys(Hi.Common.Collections.LazyLinkedList{Hi.NcParsers.Syntaxs.SyntaxPiece},Hi.NcParsers.NcDiagnosticProgress,System.Threading.CancellationToken)">
GetSourcedActEntrys(LazyLinkedList&lt;SyntaxPiece&gt;, NcDiagnosticProgress, CancellationToken)
<h3 id="Hi_NcParsers_SoftNcRunner_GetSourcedActEntrysFromNode_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__Hi_NcParsers_NcDiagnosticProgress_System_Threading_CancellationToken_" data-uid="Hi.NcParsers.SoftNcRunner.GetSourcedActEntrysFromNode(Hi.Common.Collections.LazyLinkedListNode{Hi.NcParsers.Syntaxs.SyntaxPiece},Hi.NcParsers.NcDiagnosticProgress,System.Threading.CancellationToken)">
GetSourcedActEntrysFromNode(LazyLinkedListNode&lt;SyntaxPiece&gt;, NcDiagnosticProgress, CancellationToken)
</h3>
@@ -680,12 +741,12 @@ Class SoftNcRunner
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IEnumerable&lt;SourcedActEntry&gt; GetSourcedActEntrys(LazyLinkedList&lt;SyntaxPiece&gt; syntaxPieceLinkedList, NcDiagnosticProgress ncDiagnosticProgress, CancellationToken cancellationToken)</code></pre>
<pre><code class="lang-csharp hljs">public IEnumerable&lt;SourcedActEntry&gt; GetSourcedActEntrysFromNode(LazyLinkedListNode&lt;SyntaxPiece&gt; startNode, NcDiagnosticProgress ncDiagnosticProgress, CancellationToken cancellationToken)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>syntaxPieceLinkedList</code> <a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html">LazyLinkedList</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dt><code>startNode</code> <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html">LazyLinkedListNode</a>&lt;<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>&gt;</dt>
<dd></dd>
<dt><code>ncDiagnosticProgress</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
<dd></dd>
@@ -760,37 +821,10 @@ Since the folder can be moving with the configuration file.</p>
<a id="Hi_NcParsers_SoftNcRunner_ResetFileIndex_" data-uid="Hi.NcParsers.SoftNcRunner.ResetFileIndex*"></a>
<h3 id="Hi_NcParsers_SoftNcRunner_ResetFileIndex" data-uid="Hi.NcParsers.SoftNcRunner.ResetFileIndex">
ResetFileIndex()
</h3>
<div class="markdown level1 summary"><p>Resets the file index to zero.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ResetFileIndex()</code></pre>
</div>
<a id="Hi_NcParsers_SoftNcRunner_RunControlLines_" data-uid="Hi.NcParsers.SoftNcRunner.RunControlLines*"></a>
<h3 id="Hi_NcParsers_SoftNcRunner_RunControlLines_System_String_System_Collections_Generic_IEnumerable_System_String__Hi_MachiningProcs_SessionProgress_System_Threading_CancellationToken_" data-uid="Hi.NcParsers.SoftNcRunner.RunControlLines(System.String,System.Collections.Generic.IEnumerable{System.String},Hi.MachiningProcs.SessionProgress,System.Threading.CancellationToken)">
RunControlLines(string, IEnumerable&lt;string&gt;, SessionProgress, CancellationToken)
<h3 id="Hi_NcParsers_SoftNcRunner_RunControlLines_System_String_System_Collections_Generic_IEnumerable_System_String__Hi_MachiningProcs_MachiningSession_Hi_MachiningProcs_SessionProgress_System_Threading_CancellationToken_" data-uid="Hi.NcParsers.SoftNcRunner.RunControlLines(System.String,System.Collections.Generic.IEnumerable{System.String},Hi.MachiningProcs.MachiningSession,Hi.MachiningProcs.SessionProgress,System.Threading.CancellationToken)">
RunControlLines(string, IEnumerable&lt;string&gt;, MachiningSession, SessionProgress, CancellationToken)
</h3>
@@ -799,7 +833,7 @@ Since the folder can be moving with the configuration file.</p>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IEnumerable&lt;SourcedActEntry&gt; RunControlLines(string relFilePath, IEnumerable&lt;string&gt; lines, SessionProgress sessionProgress, CancellationToken cancellationToken)</code></pre>
<pre><code class="lang-csharp hljs">public IEnumerable&lt;SourcedActEntry&gt; RunControlLines(string relFilePath, IEnumerable&lt;string&gt; lines, MachiningSession machiningSession, SessionProgress sessionProgress, CancellationToken cancellationToken)</code></pre>
</div>
<h4 class="section">Parameters</h4>
@@ -809,6 +843,11 @@ Since the folder can be moving with the configuration file.</p>
</dd>
<dt><code>lines</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
<dd><p>The enumerable collection of command (control code) lines</p>
</dd>
<dt><code>machiningSession</code> <a class="xref" href="Hi.MachiningProcs.MachiningSession.html">MachiningSession</a></dt>
<dd><p>Session-scoped state shared across multiple
<a class="xref" href="Hi.Numerical.IControlRunner.html#Hi_Numerical_IControlRunner_RunControlLines_System_String_System_Collections_Generic_IEnumerable_System_String__Hi_MachiningProcs_MachiningSession_Hi_MachiningProcs_SessionProgress_System_Threading_CancellationToken_">RunControlLines(string, IEnumerable&lt;string&gt;, MachiningSession, SessionProgress, CancellationToken)</a> calls (e.g. lazy-initialized pipeline state,
file-index counter).</p>
</dd>
<dt><code>sessionProgress</code> <a class="xref" href="Hi.MachiningProcs.SessionProgress.html">SessionProgress</a></dt>
<dd></dd>
@@ -834,6 +873,44 @@ Since the folder can be moving with the configuration file.</p>
<a id="Hi_NcParsers_SoftNcRunner_SetAllSnapshotSyntaxEnabled_" data-uid="Hi.NcParsers.SoftNcRunner.SetAllSnapshotSyntaxEnabled*"></a>
<h3 id="Hi_NcParsers_SoftNcRunner_SetAllSnapshotSyntaxEnabled_System_Boolean_" data-uid="Hi.NcParsers.SoftNcRunner.SetAllSnapshotSyntaxEnabled(System.Boolean)">
SetAllSnapshotSyntaxEnabled(bool)
</h3>
<div class="markdown level1 summary"><p>Sets <a class="xref" href="Hi.NcParsers.InspectionSyntaxs.SnapshotSyntax.html#Hi_NcParsers_InspectionSyntaxs_SnapshotSyntax_IsEnabled">IsEnabled</a> on every
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.SnapshotSyntax.html">SnapshotSyntax</a> reachable from <a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcSyntaxList">NcSyntaxList</a>
(including those nested inside top-level
<a class="xref" href="Hi.NcParsers.Syntaxs.BundleSyntax.html">BundleSyntax</a>) to <code class="paramref">isEnabled</code>.
Callers that need finer control (per-section toggling, instance
inspection) should iterate <a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_EnumerateSnapshotSyntaxs">EnumerateSnapshotSyntaxs()</a>
directly.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void SetAllSnapshotSyntaxEnabled(bool isEnabled)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>isEnabled</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
</article>