fix SoftNcRunner GM code normalization.

This commit is contained in:
2026-05-16 18:08:13 +08:00
parent e026da61b3
commit 8b285cc863
765 changed files with 18689 additions and 9785 deletions
@@ -144,7 +144,7 @@
<p>All file paths used in script commands are relative to the project directory unless an absolute path is given.</p>
</div>
<h3 id="script-access">Script Access</h3>
<p>The workpiece and fixture objects are available through <a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Workpiece">Workpiece</a><small>(API)</small> and <a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Fixture">Fixture</a><small>(API)</small>.</p>
<p>The workpiece and fixture objects are available through <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_Workpiece">Workpiece</a><small>(API)</small> and <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_Fixture">Fixture</a><small>(API)</small>.</p>
<pre><code class="lang-csharp">var workpiece = Workpiece;
var fixture = Fixture;
</code></pre>
@@ -154,7 +154,7 @@ var fixture = Fixture;
<h2 id="3-tune-simulation-options">3. Tune Simulation Options</h2>
<p>Simulation options control the trade-off between accuracy and speed.</p>
<h3 id="31-workpiece-entity-resolution">3.1 Workpiece Entity Resolution</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MachiningResolution_mm">MachiningResolution_mm</a><small>(API)</small> sets the smallest cube width of the workpiece mesh.</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_MachiningResolution_mm">MachiningResolution_mm</a><small>(API)</small> sets the smallest cube width of the workpiece mesh.</p>
<pre><code class="lang-csharp">MachiningResolution_mm = 0.125;
</code></pre>
<p>Valid values are <strong>powers of 2</strong> (e.g., 4, 2, 1, 0.5, 0.25, 0.125). If you supply a non-power-of-2 value the system rounds to the nearest power of 2.</p>
@@ -211,22 +211,22 @@ var fixture = Fixture;
<h2 id="4-run-simulation">4. Run Simulation</h2>
<p>There are three ways to drive the simulation.</p>
<h3 id="41-playncfile--execute-from-a-file">4.1 PlayNcFile — Execute from a File</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayNcFile_">PlayNcFile</a><small>(API)</small> reads and executes an NC file.</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_PlayNcFile_">PlayNcFile</a><small>(API)</small> reads and executes an NC file.</p>
<pre><code class="lang-csharp">PlayNcFile(&quot;NC/file1.nc&quot;);
</code></pre>
<h3 id="42-plaync--execute-from-a-string">4.2 PlayNc — Execute from a String</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayNc_">PlayNc</a><small>(API)</small> executes NC code directly from a string, useful for programmatic or dynamically generated commands.</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_PlayNc_">PlayNc</a><small>(API)</small> executes NC code directly from a string, useful for programmatic or dynamically generated commands.</p>
<pre><code class="lang-csharp">double x = 10.0;
PlayNc($&quot;G01 X{x} Y20 F100&quot;, &quot;Generated Command&quot;);
</code></pre>
<h3 id="43-playcsvfile--drive-from-csv-data">4.3 PlayCsvFile — Drive from CSV Data</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayCsvFile_">PlayCsvFile</a><small>(API)</small> drives the simulation from a CSV file containing axis positions, spindle speed, and feed rate.</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_PlayCsvFile_">PlayCsvFile</a><small>(API)</small> drives the simulation from a CSV file containing axis positions, spindle speed, and feed rate.</p>
<pre><code class="lang-csharp">PlayCsvFile(&quot;Data/file1.csv&quot;);
</code></pre>
<p>Required CSV columns (default headers): <code>MC.X</code>, <code>MC.Y</code>, <code>MC.Z</code>, <code>ToolId</code>, <code>SpindleSpeed_rpm</code>, <code>Feedrate_mmdmin</code>. Optional: <code>MC.A</code>, <code>MC.B</code>, <code>MC.C</code>, <code>ActualTime</code>, <code>StepDuration</code>.</p>
<div class="TIP">
<h5>Tip</h5>
<p>CSV files exported by <a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_WriteStepFiles_">WriteStepFiles</a><small>(API)</small> can be directly read back with <a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayCsvFile_">PlayCsvFile</a><small>(API)</small>.</p>
<p>CSV files exported by <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_WriteStepFiles_">WriteStepFiles</a><small>(API)</small> can be directly read back with <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_PlayCsvFile_">PlayCsvFile</a><small>(API)</small>.</p>
</div>
<h3 id="44-player-control">4.4 Player Control</h3>
<table>
@@ -238,15 +238,15 @@ PlayNc($&quot;G01 X{x} Y20 F100&quot;, &quot;Generated Command&quot;);
</thead>
<tbody>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Pace">Pace()</a><small>(API)</small></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_Pace">Pace()</a><small>(API)</small></td>
<td>Insert a pausable checkpoint</td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Pause">Pause()</a><small>(API)</small></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_Pause">Pause()</a><small>(API)</small></td>
<td>Pause execution</td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_Reset">Reset()</a><small>(API)</small></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_Reset">Reset()</a><small>(API)</small></td>
<td>Reset player state</td>
</tr>
</tbody>
@@ -327,7 +327,7 @@ AppendMessagesToFile(&quot;Output/messages.txt&quot;);
<li><a href="../manual/runtime/step-intro.html">Simulation Step</a> — what a step is</li>
<li><a href="../manual/runtime/step-output.html">Simulation Step Output</a> — step field reference</li>
<li><a class="xref" href="../manual/runtime/script-command.html">Glossary: Script Commands</a> — script command basics</li>
<li><a class="xref" href="../manual/runtime/runtime-api.html">Glossary: RuntimeApi Quick-Reference</a>RuntimeApi quick-reference</li>
<li><a class="xref" href="../manual/runtime/session-shell.html">Glossary: SessionShell Quick-Reference</a>SessionShell quick-reference</li>
</ul>
</article>