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>
@@ -89,7 +89,7 @@
<p>The example project can be downloaded here:</p>
<p><a href="https://superhightech-gitea.webredirect.org/HiNC-Deploy/DemoMapping">https://superhightech-gitea.webredirect.org/HiNC-Deploy/DemoMapping</a></p>
<p>This project uses <a class="xref" href="../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MapSingleByCsvFile_">MapSingleByCsvFile</a><small>(API)</small> and <a class="xref" href="../../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MapSeriesByCsvFile_">MapSeriesByCsvFile</a><small>(API)</small> to map controller data and sensor data to the virtual environment, and then update the milling coefficients.</p>
<p>This project uses <a class="xref" href="../../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_MapSingleByCsvFile_">MapSingleByCsvFile</a><small>(API)</small> and <a class="xref" href="../../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_MapSeriesByCsvFile_">MapSeriesByCsvFile</a><small>(API)</small> to map controller data and sensor data to the virtual environment, and then update the milling coefficients.</p>
<h2 id="related-pages">Related Pages</h2>
<ul>
<li><a class="xref" href="../sensor-mapping.html">Workflow: Sensor Data Mapping</a> — sensor data mapping workflow</li>
@@ -176,7 +176,7 @@ MachiningMotionResolution = FeedPerTooth;
<p>Training resolution should be ≤ 0.5× the production resolution for better accuracy.</p>
</div>
<h3 id="enable-physics">Enable Physics</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnablePhysics">EnablePhysics</a> must be enabled for force calculation:</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EnablePhysics">EnablePhysics</a> must be enabled for force calculation:</p>
<pre><code class="lang-csharp">EnablePhysics = true;
</code></pre>
<h3 id="milling-force-cycle-division">Milling Force Cycle Division</h3>
@@ -237,11 +237,11 @@ WriteShotFiles(&quot;Output/[NcName].shot.csv&quot;, 1);
<hr>
<h2 id="6-train-milling-parameters">6. Train Milling Parameters</h2>
<h3 id="trainmillingpara-new-training">TrainMillingPara (New Training)</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_TrainMillingPara_">TrainMillingPara</a> trains new coefficients independently of any existing workpiece parameters.</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_TrainMillingPara_">TrainMillingPara</a> trains new coefficients independently of any existing workpiece parameters.</p>
<pre><code class="lang-csharp">TrainMillingPara(Fx|Fy|Fz, &quot;StainlessSteel.mp&quot;);
</code></pre>
<h3 id="retrainmillingpara-calibration">ReTrainMillingPara (Calibration)</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ReTrainMillingPara_">ReTrainMillingPara</a> calibrates existing coefficients (10% original weight, 90% new sample weight).</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ReTrainMillingPara_">ReTrainMillingPara</a> calibrates existing coefficients (10% original weight, 90% new sample weight).</p>
<pre><code class="lang-csharp">ReTrainMillingPara(Fz|Mx|My|Mz, &quot;StainlessSteel.mp&quot;);
</code></pre>
<h3 id="sample-flag-requirements">Sample Flag Requirements</h3>
@@ -356,7 +356,7 @@ WriteShotFiles(&quot;Output/[NcName].shot.csv&quot;, 1);
<li><a class="xref" href="basic-simulation.html">Workflow: Basic Machining Simulation</a> — basic simulation setup</li>
<li><a class="xref" href="nc-optimization.html">Workflow: NC Optimization</a> — optimization after training</li>
<li><a class="xref" href="../manual/runtime/machining-step.html">Glossary: Machining Step</a> — step data reference</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>
<li><a href="examples/milling-training-dynamometer.html">Training with a Dynamometer (Example)</a></li>
<li><a href="examples/mapping-demo.html">Cascading Mapping (Example)</a></li>
</ul>
@@ -126,7 +126,7 @@ EnablePauseOnCollision = false; // set true to pause on collision
</tbody>
</table>
<h3 id="combined-with-pause-on-failure">Combined with Pause on Failure</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnablePauseOnFailure">EnablePauseOnFailure</a> provides a broader pause-on-error mechanism:</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EnablePauseOnFailure">EnablePauseOnFailure</a> provides a broader pause-on-error mechanism:</p>
<pre><code class="lang-csharp">EnablePauseOnFailure = true;
EnableCollisionDetection = true;
PlayNcFile(&quot;NC/file1.nc&quot;); // pauses if a collision occurs
@@ -193,7 +193,7 @@ PlayNcFile(&quot;NC/file1.nc&quot;); // pauses if a collision occurs
<h2 id="3-geometry-defect-scanning">3. Geometry Defect Scanning</h2>
<p>Geometry defect scanning helps debug abnormal workpiece or tool geometry. This is typically used only when geometry construction problems are suspected.</p>
<h3 id="scanruntimegeominfdefect">ScanRuntimeGeomInfDefect</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ScanRuntimeGeomInfDefect_">ScanRuntimeGeomInfDefect</a> scans for infinite edge cut defects in the runtime geometry. After scanning, defect areas are rendered with colored markers.</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ScanRuntimeGeomInfDefect_">ScanRuntimeGeomInfDefect</a> scans for infinite edge cut defects in the runtime geometry. After scanning, defect areas are rendered with colored markers.</p>
<pre><code class="lang-csharp">ScanRuntimeGeomInfDefect();
</code></pre>
<p>Return values:</p>
@@ -209,7 +209,7 @@ ClearDefectDisplayee(); // clear markers
PlayNcFile(&quot;NC/file1.nc&quot;);
</code></pre>
<h3 id="cleardefectdisplayee">ClearDefectDisplayee</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_ClearDefectDisplayee_">ClearDefectDisplayee</a> removes defect markers from the workpiece:</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ClearDefectDisplayee_">ClearDefectDisplayee</a> removes defect markers from the workpiece:</p>
<pre><code class="lang-csharp">ClearDefectDisplayee();
</code></pre>
<div class="NOTE">
@@ -256,7 +256,7 @@ WriteStepFiles(&quot;Output/[NcName].step.csv&quot;);
<h2 id="see-also">See Also</h2>
<ul>
<li><a class="xref" href="basic-simulation.html">Workflow: Basic Machining Simulation</a> — basic simulation setup</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>
@@ -112,7 +112,7 @@ LoadCuttingParaByFile(&quot;Material.mp&quot;);
<tbody>
<tr>
<td>Physics enabled</td>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnablePhysics">EnablePhysics</a> must be <code>true</code></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EnablePhysics">EnablePhysics</a> must be <code>true</code></td>
</tr>
<tr>
<td>Cutting parameters</td>
@@ -141,37 +141,37 @@ LoadCuttingParaByFile(&quot;Material.mp&quot;);
</thead>
<tbody>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptEnableFeedrate">OptEnableFeedrate</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptEnableFeedrate">OptEnableFeedrate</a></td>
<td>Enable sequential feed rate optimization</td>
<td><code>true</code></td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptEnableInterpolation">OptEnableInterpolation</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptEnableInterpolation">OptEnableInterpolation</a></td>
<td>Re-interpolation for smoother acceleration/deceleration</td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptRapidFeed_mmdmin">OptRapidFeed_mmdmin</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptRapidFeed_mmdmin">OptRapidFeed_mmdmin</a></td>
<td>Feed rate for non-cutting regions (mm/min)</td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptMinFeedrate_mmdmin">OptMinFeedrate_mmdmin</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptMinFeedrate_mmdmin">OptMinFeedrate_mmdmin</a></td>
<td>Minimum cutting-region feed rate (mm/min)</td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptMaxFeedrate_mmdmin">OptMaxFeedrate_mmdmin</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptMaxFeedrate_mmdmin">OptMaxFeedrate_mmdmin</a></td>
<td>Maximum cutting-region feed rate (mm/min)</td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptMaxAcceleration_mmds2">OptMaxAcceleration_mmds2</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptMaxAcceleration_mmds2">OptMaxAcceleration_mmds2</a></td>
<td>Acceleration/deceleration limit (mm/s²)</td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptFeedrateAssignmentRatio">OptFeedrateAssignmentRatio</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptFeedrateAssignmentRatio">OptFeedrateAssignmentRatio</a></td>
<td>Re-interpolation trigger threshold</td>
<td></td>
</tr>
@@ -187,11 +187,11 @@ LoadCuttingParaByFile(&quot;Material.mp&quot;);
</thead>
<tbody>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptExtendedPreDistance_mm">OptExtendedPreDistance_mm</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptExtendedPreDistance_mm">OptExtendedPreDistance_mm</a></td>
<td>Pre-distance for equivalent calculation of cutting regions (mm)</td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptExtendedPostDistance_mm">OptExtendedPostDistance_mm</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptExtendedPostDistance_mm">OptExtendedPostDistance_mm</a></td>
<td>Post-distance for equivalent calculation of cutting regions (mm)</td>
</tr>
</tbody>
@@ -206,19 +206,19 @@ LoadCuttingParaByFile(&quot;Material.mp&quot;);
</thead>
<tbody>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptSpindlePowerSafetyFactor">OptSpindlePowerSafetyFactor</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptSpindlePowerSafetyFactor">OptSpindlePowerSafetyFactor</a></td>
<td>Spindle power safety factor (0 = ignore)</td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptSpindleTorqueSafetyFactor">OptSpindleTorqueSafetyFactor</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptSpindleTorqueSafetyFactor">OptSpindleTorqueSafetyFactor</a></td>
<td>Spindle torque safety factor (0 = ignore)</td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptThermalYieldSafetyFactor">OptThermalYieldSafetyFactor</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptThermalYieldSafetyFactor">OptThermalYieldSafetyFactor</a></td>
<td>Thermal yield safety factor (0 = ignore)</td>
</tr>
<tr>
<td><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptPreferedForce_N">OptPreferedForce_N</a></td>
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptPreferedForce_N">OptPreferedForce_N</a></td>
<td>Target cutting force (N)</td>
</tr>
</tbody>
@@ -274,11 +274,11 @@ N0160 X-3.555 Y43.338 (;@EndPreserve();)
</code></pre>
<div class="WARNING">
<h5>Warning</h5>
<p>Do not combine <a class="xref" href="../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_UpdateNcOptOption_">UpdateNcOptOption</a> inside the <a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_SessionStepBuilt">SessionStepBuilt</a> event with NC-embedded optimization commands. This may cause undefined behavior due to parallel computation.</p>
<p>Do not combine <a class="xref" href="../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_UpdateNcOptOption_">UpdateNcOptOption</a> inside the <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_SessionStepBuilt">SessionStepBuilt</a> event with NC-embedded optimization commands. This may cause undefined behavior due to parallel computation.</p>
</div>
<hr>
<h2 id="4-generate-optimized-nc-files">4. Generate Optimized NC Files</h2>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_OptimizeToFiles_">OptimizeToFiles</a> writes the optimized NC programs:</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_OptimizeToFiles_">OptimizeToFiles</a> writes the optimized NC programs:</p>
<pre><code class="lang-csharp">OptimizeToFiles(&quot;Cache/Opt-[NcName]&quot;);
</code></pre>
<p>The <code>[NcName]</code> template is replaced with each input NC file name.</p>
@@ -297,7 +297,7 @@ N0160 X-3.555 Y43.338 (;@EndPreserve();)
<li><code>FrtByThermalYieldingRatio_mm</code> — feed per tooth from thermal yield</li>
</ul>
<h3 id="embedded-log-comments">Embedded Log Comments</h3>
<p>Control embedded log verbosity with <a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EmbeddedLogMode_">EmbeddedLogMode</a>:</p>
<p>Control embedded log verbosity with <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EmbeddedLogMode_">EmbeddedLogMode</a>:</p>
<table>
<thead>
<tr>
@@ -378,7 +378,7 @@ WriteStepFiles(&quot;Output/[NcName].step.csv&quot;);
<li><a href="../manual/analysis/corner-behavior.html">Corner Feed Rate Optimization</a></li>
<li><a class="xref" href="force-training.html">Workflow: Milling Force Parameter Training</a> — prerequisite: training cutting parameters</li>
<li><a class="xref" href="basic-simulation.html">Workflow: Basic Machining Simulation</a> — basic simulation setup</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>
@@ -150,12 +150,12 @@
<hr>
<h2 id="2-configure-time-mapping">2. Configure Time Mapping</h2>
<h3 id="strategy-a-one-to-one-mapping-mapsinglebycsvfile">Strategy A: One-to-One Mapping (MapSingleByCsvFile)</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_MapSingleByCsvFile_">MapSingleByCsvFile</a> reads a CSV file and uses time interpolation to map each data point to one simulation step.</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_MapSingleByCsvFile_">MapSingleByCsvFile</a> reads a CSV file and uses time interpolation to map each data point to one simulation step.</p>
<pre><code class="lang-csharp">PlayNcFile(&quot;NC/file1.nc&quot;);
MapSingleByCsvFile(&quot;Data/sensor.csv&quot;);
</code></pre>
<h3 id="strategy-b-one-to-one-via-playcsvfile">Strategy B: One-to-One via PlayCsvFile</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_PlayCsvFile_">PlayCsvFile</a> can drive the simulation directly from CSV data, where each row becomes one step. Custom fields in the CSV are automatically available on each step.</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_PlayCsvFile_">PlayCsvFile</a> can drive the simulation directly from CSV data, where each row becomes one step. Custom fields in the CSV are automatically available on each step.</p>
<pre><code class="lang-csharp">PlayCsvFile(&quot;Data/controller.csv&quot;);
</code></pre>
<h3 id="strategy-c-one-to-many-global-mapping-mapseriesbycsvfile">Strategy C: One-to-Many Global Mapping (MapSeriesByCsvFile)</h3>
@@ -237,7 +237,7 @@ X25. F10 ;@LineSelection(&quot;lineB&quot;, FirstTouch, null, LastTouch, null);
</code></pre>
</div>
<h3 id="map-on-selection-end">Map on Selection End</h3>
<p><a class="xref" href="../api/Hi.MachiningProcs.RuntimeApi.html#Hi_MachiningProcs_RuntimeApi_EnableMapOnSelectionEnd">EnableMapOnSelectionEnd</a> controls automatic mapping when a selection ends (default: <code>true</code>):</p>
<p><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EnableMapOnSelectionEnd">EnableMapOnSelectionEnd</a> controls automatic mapping when a selection ends (default: <code>true</code>):</p>
<pre><code class="lang-csharp">EnableMapOnSelectionEnd = true; // EndSelection triggers Map automatically
</code></pre>
<h3 id="clearing-mapping-data">Clearing Mapping Data</h3>
@@ -310,7 +310,7 @@ WriteStepFiles(&quot;Output/[NcName].step.csv&quot;);
<li><a class="xref" href="force-training.html">Workflow: Milling Force Parameter Training</a> — using mapped data for coefficient training</li>
<li><a class="xref" href="basic-simulation.html">Workflow: Basic Machining Simulation</a> — basic simulation setup</li>
<li><a class="xref" href="../manual/runtime/machining-step.html">Glossary: Machining Step</a> — step data model</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>
<li><a class="xref" href="examples/mapping-demo.html">Example Project: Mapping Controller and Sensor Data to Simulated NC Toolpaths and Updating Milling Coefficients</a> — mapping demo example project</li>
<li><a class="xref" href="examples/milling-training-dynamometer.html">Example Project: Training Milling Coefficients with a Dynamometer</a> — dynamometer training example project</li>
</ul>