This commit is contained in:
2026-09-17 10:22:49 +08:00
parent bfa3106a69
commit 8f2d00155b
41 changed files with 4244 additions and 698 deletions
@@ -2854,6 +2854,66 @@ public void ErrorMessage(string message)</code></pre>
<a id="Hi_MachiningProcs_SessionShell_EstimateSetupAngle_" data-uid="Hi.MachiningProcs.SessionShell.EstimateSetupAngle*"></a>
<h3 id="Hi_MachiningProcs_SessionShell_EstimateSetupAngle_Hi_MillingForces_Fittings_SampleFlag_System_String_System_Boolean_System_Double_System_String_" data-uid="Hi.MachiningProcs.SessionShell.EstimateSetupAngle(Hi.MillingForces.Fittings.SampleFlag,System.String,System.Boolean,System.Double,System.String)">
EstimateSetupAngle(SampleFlag, string, bool, double, string)
</h3>
<div class="markdown level1 summary"><p>Estimates the cutter setup angle from the mapped smart-holder data and
the workpiece's cutting parameter (the seed <a class="xref" href="Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ReTrainMillingPara_Hi_MillingForces_Fittings_SampleFlag_System_String_System_Double_">ReTrainMillingPara(SampleFlag, string, double)</a>
uses), one estimate per tool. The estimate is the rotation of the
measured (Mx, My) against the model's, folded into the flute period;
with <code class="paramref">applyToTool</code> the tool's uniform-fluting setup
angle is advanced by it (<a class="xref" href="Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_SetUniformFlutingShiftAngle_deg_System_Int32_System_Double_">SetUniformFlutingShiftAngle_deg(int, double)</a>).
Read the diagnostics before trusting it: a low contrast means the cut
does not constrain the angle, a preferred mirror means the sensor axes
are swapped rather than rotated.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsAce(&quot;EstimateSetupAngle(Mx|My, $1dstFile, false)&quot;)]
public List&lt;SetupAngleEstimate&gt; EstimateSetupAngle(SampleFlag sampleFlag, string dstRelFile = null, bool applyToTool = false, double outlierRatio = 0.1, string knownParaRelFile = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>sampleFlag</code> <a class="xref" href="Hi.MillingForces.Fittings.SampleFlag.html">SampleFlag</a></dt>
<dd><p>Channels to use; must include Mx and My (Mz only sharpens the phase alignment).</p>
</dd>
<dt><code>dstRelFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Optional JSON report (relative to the project base directory).</p>
</dd>
<dt><code>applyToTool</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>Advance each estimated tool's setup angle by its estimate. Call <a class="xref" href="Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ResetRuntime">ResetRuntime()</a> before replaying: the physics session snapshots the flute geometry.</p>
</dd>
<dt><code>outlierRatio</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>Fraction of the worst-fitting steps trimmed before the final estimate.</p>
</dd>
<dt><code>knownParaRelFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Optional cutting-parameter file (relative to the project base directory) to use instead of the workpiece's.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="Hi.MillingForces.Training.SetupAngleEstimate.html">SetupAngleEstimate</a>&gt;</dt>
<dd><p>The estimates, one per tool.</p>
</dd>
</dl>
<a id="Hi_MachiningProcs_SessionShell_ExportMeshedGeomToObj_" data-uid="Hi.MachiningProcs.SessionShell.ExportMeshedGeomToObj*"></a>
<h3 id="Hi_MachiningProcs_SessionShell_ExportMeshedGeomToObj_System_String_System_Double_" data-uid="Hi.MachiningProcs.SessionShell.ExportMeshedGeomToObj(System.String,System.Double)">