HiNC-2025-win-desktop-Deploy/App/wwwroot/HiAPI-docsite/api/Hi.NcParsers.LogicSyntaxs.html

259 lines
15 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Namespace Hi.NcParsers.LogicSyntaxs | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Namespace Hi.NcParsers.LogicSyntaxs | HiAPI-C# 2025 ">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.LogicSyntaxs">
<h1 id="Hi_NcParsers_LogicSyntaxs" data-uid="Hi.NcParsers.LogicSyntaxs" class="text-break">Namespace Hi.NcParsers.LogicSyntaxs</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>
<div class="markdown level0 remarks"></div>
<h3 id="classes">
Classes
</h3>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.CoordinateOffsetUtil.html">CoordinateOffsetUtil</a></dt>
<dd><p>Shared utilities for all coordinate offset syntaxes
(ISO, Siemens, Heidenhain). Handles section IO,
backward lookback, and <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a> composition.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.FeedrateSyntax.html">FeedrateSyntax</a></dt>
<dd><p>Consumes F (feedrate) from <a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a> and
G94/G95 mode from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a>.
Both are modal — persist across blocks via backward node lookback.
Writes resolved state to a <a class="xref" href="Hi.NcParsers.Keywords.IFeedrateDef.html">IFeedrateDef</a> section.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoCoordinateOffsetSyntax.html">IsoCoordinateOffsetSyntax</a></dt>
<dd><p>ISO/Fanuc/Mazak/Okuma/Syntec: resolves G54G59.9 work coordinate offset.
Reads G54/G55/.../G59.9 from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a>,
looks up offset Vec3d from <a class="xref" href="Hi.NcParsers.Dependencys.Generic.IsoCoordinateTable.html">IsoCoordinateTable</a> dependency,
composes into <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>.
Modal — active coordinate persists via backward lookback.
Default coordinate ID is set by <a class="xref" href="Hi.NcParsers.Initializers.StaticInitializer.html">StaticInitializer</a>.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68RotationSyntax.html">IsoG68RotationSyntax</a></dt>
<dd><p>ISO/Fanuc: resolves G68 (2D coordinate rotation) and G69 (cancel).
Computes a rotation <a class="xref" href="Hi.Geom.Mat4d.html">Mat4d</a> around the active plane normal
and composes it into <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>.</p>
<p>
No <a class="xref" href="Hi.Numerical.Xyzabc.IMachineKinematics.html">IMachineKinematics</a> dependency needed —
G68 is pure geometric rotation.
</p>
<p>
Managed commands: G68, G69 (idempotent with <a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68p2TiltSyntax.html">IsoG68p2TiltSyntax</a>).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68p2TiltSyntax.html">IsoG68p2TiltSyntax</a></dt>
<dd><p>ISO/Fanuc: resolves G68.2 (tilted work plane) and G69 (cancel).
Computes a tilt <a class="xref" href="Hi.Geom.Mat4d.html">Mat4d</a> from I/J/K euler angles
(Fanuc ZXZ convention) and composes it into
<a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>.</p>
<p>
Managed commands: G68.2, G69 (idempotent with <a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68RotationSyntax.html">IsoG68RotationSyntax</a>).
Siemens equivalent: CYCLE800 (separate syntax).
Heidenhain equivalent: PLANE SPATIAL (separate syntax).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoLocalCoordinateOffsetSyntax.html">IsoLocalCoordinateOffsetSyntax</a></dt>
<dd><p>ISO G52: Local coordinate system offset (additive to G54-series).</p>
<p>
<code>G52 X10 Y20 Z5</code> → sets local offset.
<code>G52 X0 Y0 Z0</code> → cancels (resets to zero).
M30 (program end) → also cancels.
</p>
Reads <code>Parsing.G52</code> (from <a class="xref" href="Hi.NcParsers.Syntaxs.GeneralSyntaxKit.html#Hi_NcParsers_Syntaxs_GeneralSyntaxKit_G52Syntax">G52Syntax</a>),
writes <a class="xref" href="Hi.NcParsers.Keywords.LocalCoordinateOffset.html">LocalCoordinateOffset</a> section,
and adds a <code>"LocalCoordinateOffset"</code> entry to the transformation chain.
Modal — persists via backward lookback until changed or cancelled.
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcCyclicPathSyntax.html">McAbcCyclicPathSyntax</a></dt>
<dd><p>Resolve modular rotary axes to the shortest cyclic path relative to the previous node.
Uses <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html#Hi_NcParsers_Dependencys_IMachineAxisConfig_IsModularRotary_System_String_">IsModularRotary(string)</a> to determine which axes
within <a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateDef_MachineCoordinate">MachineCoordinate</a> need cyclic resolution.
Falls back to hardcoded A/B/C if no <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html">IMachineAxisConfig</a> is available.
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a> in <a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcSyntaxList">NcSyntaxList</a>.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.PositioningModeSyntax.html">PositioningModeSyntax</a></dt>
<dd><p>Resolves G90/G91 incremental positioning to absolute values in-place
within <a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a>.</p>
<p>
Fanuc/ISO: reads G90/G91 from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a> (global modal).
Heidenhain: would need a separate implementation reading I-prefix per axis.
Siemens: would extend with AC()/IC() per-axis override.
</p>
Uses <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html#Hi_NcParsers_Dependencys_IMachineAxisConfig_AxisNames">AxisNames</a> to determine which tags are motion axes.
Traces backward nodes for modal state and last known <a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a>
to resolve incremental values. No instance fields for state — all state lives in JsonObject.
After this syntax, all axis values in Parsing are absolute —
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a> can consume them without incremental logic.
Must be placed after <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.NumberedFlagSyntax.html">NumberedFlagSyntax</a>
and before <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a>.
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a></dt>
<dd><p>Compute MachineCoordinate and ProgramXyz (leaf coordinate) from syntax XYZ tags.
Writes individual double components to <a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>.<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html#Hi_NcParsers_Syntaxs_SyntaxPiece_JsonObject">JsonObject</a>
under <a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateDef_MachineCoordinate">MachineCoordinate</a> and <a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a> sub-objects.
Must be placed after <a class="xref" href="Hi.NcParsers.Syntaxs.BundleSyntax.html">BundleSyntax</a> since it uses cross-node lookback for last position.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.SpindleSpeedSyntax.html">SpindleSpeedSyntax</a></dt>
<dd><p>Consumes S (spindle speed) from <a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a>.
Modal — persists across blocks via backward node lookback.
Writes resolved state to a <a class="xref" href="Hi.NcParsers.Keywords.ISpindleSpeedDef.html">ISpindleSpeedDef</a> section.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.TiltTransformUtil.html">TiltTransformUtil</a></dt>
<dd><p>Shared utilities for all tilt transform syntaxes
(ISO, Siemens, Heidenhain). Handles section IO,
backward lookback, and <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a> composition.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.ToolHeightOffsetSyntax.html">ToolHeightOffsetSyntax</a></dt>
<dd><p>Resolves tool height offset ID 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>.
</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>