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
@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class ToolHeightOffsetSyntax | HiAPI-C# 2025 ">
<meta name="description" content="Resolves tool height offset ID to the effective offset value (mm) and composes the offset as a translation into the accumulated matrix. Reads parsed G43/G43.4/G44/G49 flags and H numbers from upstream parsing syntaxes, looks up the offset value from dependency, writes the resolved state to a section for debuggability, and composes ProgramToMcTransform.Trans += toolOrientation * height_mm. The tool orientation direction is read from a &quot;ToolOrientation&quot; key in JSON (written by a prior syntax, e.g., ToolOrientationSyntax). If absent, falls back to the current &#39;s (rotated Z). If no transformation exists yet, defaults to .">
<meta name="description" content="Resolves ISO tool height offset (G43/G44/G49) to the effective offset value (mm) and composes the offset as a translation into the accumulated matrix. RTCP modes (G43.4, TRAORI, M128) are handled by separate brand-specific syntaxes (e.g., ).">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
@@ -97,22 +97,12 @@ Class ToolHeightOffsetSyntax
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
</div>
<div class="markdown summary"><p>Resolves tool height offset ID to the effective offset value (mm)
and composes the offset as a translation into the accumulated
<div class="markdown summary"><p>Resolves ISO tool height offset (G43/G44/G49) to the effective offset
value (mm) and composes the offset as a translation into the accumulated
<a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a> matrix.</p>
<p>
Reads parsed G43/G43.4/G44/G49 flags and H numbers from upstream parsing syntaxes,
looks up the offset value from <a class="xref" href="Hi.NcParsers.Dependencys.IToolOffsetConfig.html">IToolOffsetConfig</a> dependency,
writes the resolved state to a <a class="xref" href="Hi.NcParsers.Keywords.IToolHeightCompensationDef.html">IToolHeightCompensationDef</a>
section for debuggability, and composes
<code>ProgramToMcTransform.Trans += toolOrientation * height_mm</code>.
</p>
<p>
The tool orientation direction is read from a "ToolOrientation" key in JSON
(written by a prior syntax, e.g., ToolOrientationSyntax). If absent, falls back
to the current <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>'s
<a class="xref" href="Hi.Geom.Mat4d.html#Hi_Geom_Mat4d_AxialNormal">AxialNormal</a> (rotated Z). If no transformation exists yet,
defaults to <a class="xref" href="Hi.Geom.Vec3d.html#Hi_Geom_Vec3d_UnitZ">UnitZ</a>.
RTCP modes (G43.4, TRAORI, M128) are handled by separate brand-specific
syntaxes (e.g., <a class="xref" href="Hi.NcParsers.LogicSyntaxs.G43p4RtcpSyntax.html">G43p4RtcpSyntax</a>).
</p>
</div>
<div class="markdown conceptual"></div>
@@ -198,7 +188,7 @@ defaults to <a class="xref" href="Hi.Geom.Vec3d.html#Hi_Geom_Vec3d_UnitZ">UnitZ<
<h2 id="Hi_NcParsers_LogicSyntaxs_ToolHeightOffsetSyntax_remarks">Remarks</h2>
<div class="markdown level0 remarks"><p>Input data locations in <a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html#Hi_NcParsers_Syntaxs_SyntaxPiece_JsonObject">JsonObject</a>:</p>
<ul><li>Parsing.G43 / Parsing.G43.4 / Parsing.G44 → from ParameterizedFlagSyntax, {"H": "5"}</li><li>Parsing.H → from IntegerTagSetupSyntax, standalone modal H (int)</li><li>Parsing.Flags → from NumberedFlagSyntax, "G49" for cancellation</li><li>ToolOrientation → from a prior syntax (optional, default = Transformation.AxialNormal or UnitZ)</li></ul>
<ul><li>Parsing.G43 / Parsing.G44 → from ParameterizedFlagSyntax, {"H": "5"}</li><li>Parsing.H → from IntegerTagSetupSyntax, standalone modal H (int)</li><li>Parsing.Flags → from NumberedFlagSyntax, "G49" for cancellation</li><li>ToolOrientation → from a prior syntax (optional, default = Transformation.AxialNormal or UnitZ)</li></ul>
Modal state is persisted in the <a class="xref" href="Hi.NcParsers.Keywords.IToolHeightCompensationDef.html">IToolHeightCompensationDef</a>
section (not syntax fields) and recovered from backward node traversal.
</div>
@@ -340,7 +330,8 @@ section (not syntax fields) and recovered from backward node traversal.
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 summary"><p>Syntax kind name (typically the concrete type name).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">