deploy webservice static-file routing for docsite folder URLs, per-instance step-cache db, and constant-height panel title bars.
This commit is contained in:
@@ -87,11 +87,199 @@
|
||||
<article data-uid="">
|
||||
<h1 id="release-note">Release Note</h1>
|
||||
|
||||
<h2 id="hinc-packages-version-326">HiNc Packages Version 3.2.6</h2>
|
||||
<h3 id="at-a-glance">At a glance</h3>
|
||||
<p>3.2 is largely one piece of work: the NC interpreter that reads a controller program is now composed
|
||||
from configurable parts rather than written into one class, and most of this release is the brand
|
||||
coverage that made possible. A Siemens or Heidenhain program that 3.1.175 could not interpret past
|
||||
its first computed coordinate or subprogram call now replays end to end.</p>
|
||||
<p><strong>Control-language coverage.</strong> The figure is <strong>how far our own verification has reached</strong> on that
|
||||
dialect — it is not the share of the language that is implemented, and it is not a guarantee for a
|
||||
program we have not seen:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Control language</th>
|
||||
<th>Verification reached</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Cutter location (NX CLSF / APT source)</td>
|
||||
<td>~90%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fanuc</td>
|
||||
<td>~80%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Siemens SINUMERIK</td>
|
||||
<td>~60%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heidenhain (klartext and DIN/ISO)</td>
|
||||
<td>~40%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Syntec and Mazak run on the Fanuc-family vocabulary; their brand-specific syntax has not been worked
|
||||
through and they are not covered by the figures above. The per-construct picture — including what is
|
||||
recognized and deliberately <em>not</em> simulated — is in the
|
||||
<a href="../fundamentals/nc-parsing/index.html#brand-support">brand support matrix</a>.</p>
|
||||
<p><strong>Failures say what went wrong.</strong> The class of defect this release spent most effort on is the
|
||||
silent one: a Siemens tool offset with no table row that resolved to zero and machined a whole
|
||||
program one tool length low, a G68 rotation that did nothing while reporting itself active, a tilted
|
||||
plane the machine could not reach. Each of those is now a named, searchable diagnostic rather than a
|
||||
plausible-looking wrong result — see the <a href="upgrading-to-3.2.html#new-diagnostics-you-may-now-see">diagnostic id
|
||||
table</a>.</p>
|
||||
<p><strong>Simulation is faster and holds a bigger program.</strong> Physics moved into the native kernel (a paired
|
||||
play: 59.3 s / 16.1 GB allocated → 40.6 s / 3.4 GB), building the topology of a large STL is linear
|
||||
rather than quadratic in triangle count, and a long program no longer degrades as it plays. Figures
|
||||
and their conditions are under
|
||||
<a href="upgrading-to-3.2.html#performance-and-footprint">Performance and footprint</a>.</p>
|
||||
<p><strong>The application product moves to the web API.</strong> From 3.2 the shipped application is the web
|
||||
service, and its source is the same <code>HiNC-2025-webservice</code> sample we publish — what you read there is
|
||||
what the product runs. The Blazor front end is not on this line.</p>
|
||||
<div class="IMPORTANT">
|
||||
<h5>Important</h5>
|
||||
<p><strong>Adoption status.</strong> This drop is published for review. Verification is still in progress across
|
||||
most areas, and the coverage figures above are the honest state of it.</p>
|
||||
<p><strong>Do not put 3.2 NC optimization into production.</strong> It is not finished on this line. Work that
|
||||
depends on optimization should stay on the 3.1 line, which is serviced as <code>3.1.175.<patch></code>. The
|
||||
Blazor front end likewise remains on 3.1.</p>
|
||||
</div>
|
||||
<h3 id="what-changed">What changed</h3>
|
||||
<p><strong>This one entry covers everything since 3.1.175.</strong> The 3.1 line is closed at the 3.1.175 package
|
||||
set and is serviced only as <code>3.1.175.<patch></code>; <code>master</code> moved all ten packages onto the <strong>3.2</strong> line
|
||||
on 2026-07-26 and restarted their build counters. So a 3.2 build number starts low — <code>3.2.6</code> is
|
||||
newer than <code>3.1.204</code>, the two counters are not comparable, and the gap between them is expected
|
||||
rather than a missing upload. The versions in between were never published as a release set, which
|
||||
is why they are merged here rather than listed separately.</p>
|
||||
<p>Everything below therefore lands at once on a caller moving a 3.1.175 reference to 3.2.
|
||||
<strong>See <a href="upgrading-to-3.2.html">Upgrading from 3.1.175 to 3.2</a> for the full detail</strong> — the summary here
|
||||
is the shape of the upgrade, not the whole of it.</p>
|
||||
<h3 id="breaking-changes">Breaking changes</h3>
|
||||
<p>In the order they will bite. Full table with replacements on the upgrade page.</p>
|
||||
<ul>
|
||||
<li><strong>Registration:</strong> <code>XFactory.Generators</code> becomes a <code>ConcurrentDictionary</code> (a caller declaring the
|
||||
old type breaks at compile time), and <code>LocalProjectService.Reg()</code> must still be called once at
|
||||
startup before any project XML is deserialized</li>
|
||||
<li><strong>Messages:</strong> <code>MixedProgress0</code>, <code>MultiTagMessage</code> and <code>MultiTagMessageUtil</code> are removed; every
|
||||
message parameter is retyped from <code>IProgress<object></code> to <code>IProgress<IMessage></code>; <code>Category.General</code>
|
||||
is deleted and <code>NcDiagnostic.Text</code> renames to <code>Notification</code></li>
|
||||
<li><strong>Session lifetime:</strong> <code>LocalProjectService.SessionShell</code> is null outside a session and
|
||||
<code>ShellProgress</code> is recreated per session — hold no long-lived reference; <code>MachiningSession</code> takes
|
||||
an injected <code>IMachiningService</code>, and <code>IMachiningService</code> replaces
|
||||
<code>PlayerCancellationToken</code> / <code>PausePlayer</code> with one <code>PacePlayer</code></li>
|
||||
<li><strong>Play verbs:</strong> <code>PlayNcFile</code> / <code>RunNcFile</code> gain an <code>NcKind kind = NcKind.Auto</code> parameter and
|
||||
dispatch by extension; the old narrow verbs become <code>PlayBrandNcFile</code> / <code>RunBrandNcFile</code>. The
|
||||
“Control” vocabulary retires with them (<code>IControlRunner</code> → <code>INcRunner</code>, <code>RunControlLines</code> →
|
||||
<code>RunNcLines</code>, <code>ControlKind</code> → <code>NcKind</code>)</li>
|
||||
<li><strong>Hard renames, no shim:</strong> runtime geom → <strong>meshed geom</strong> across <code>WorkpieceService</code>;
|
||||
<code>IContourTray</code> / <code>UniformContourTray</code> / <code>FreeContourTray</code> → <strong><code>IFluting</code> / <code>UniformFluting</code> /
|
||||
<code>FreeFluting</code></strong> and <code>MillingCutter.FluteContourTray</code> → <code>Fluting</code>; HiNc's <code>Hi.Common.ResourceUtil</code>
|
||||
→ <code>ResourceLayout</code> (it was shadowing HiGeom's same-named type); the native topo-STL wrappers move
|
||||
to <code>Hi.Geom.Topo</code>; <code>ITimeGetter</code> → <code>ITimecoded</code>; <code>ClStrip.DrawingRefreshing</code> →
|
||||
<code>DrawingRefreshed</code>; <code>SoftNcRunner.NcDependencyList</code> → <code>PipelineNcDependencyList</code></li>
|
||||
<li><strong>Removals:</strong> <code>CsvRunner0</code> and <code>EnableSoftCsvRunner</code>, <code>RawCsvRunner</code>, <code>IndexedSentence</code>,
|
||||
<code>SimpleSessionCommand</code>, <code>LsStl</code>; the GUI-layer types <code>MachiningProjectDisplayee</code>,
|
||||
<code>IsoCoordinateEntryDisplayee</code>, <code>HeidenhainCoordinateEntryDisplayee</code>, <code>UserConfig</code>, <code>UserService</code>
|
||||
and <code>PlayerDivConfig</code>; the managed physics kernel types <code>FluteZData</code>,
|
||||
<code>MillingForceUtil.RuntimePack</code> / <code>LayerPack</code> / <code>AnglePack</code> and
|
||||
<code>MillingPhysicsBrief.YieldStressMinHeight_mm</code>; <code>CultureUtil.SupportedCultureNames</code> and
|
||||
<code>SetCurrentCulture(string)</code>; eight <code>gl*</code> P/Invoke declarations that had no backing export; and
|
||||
<code>PostExecutionCommand</code>'s meshed-geometry output pair (use <code>RecordMeshedGeomCommand</code> /
|
||||
<code>ExportMeshedGeomToStlCommand</code> instead)</li>
|
||||
<li><strong>Shapes:</strong> <code>MachiningToolHouse</code> derives from <code>Dictionary<int, IMachiningTool></code>;
|
||||
<code>MachiningStep.ActualTimecode</code> / <code>ActualDateTime</code> become get-only views onto the new
|
||||
<code>ActualTime</code>; <code>PreSettingCommand</code> becomes a legacy bundle that expands on load into five
|
||||
single-setting commands and is never written back; <code>ToPresentDto</code> wire keys change</li>
|
||||
<li><strong>Defaults:</strong> <code>EnableSoftNcRunner</code> is <code>true</code> — SoftNc is the NC engine and <code>HardNcRunner</code> is the
|
||||
opt-out fallback; <code>EnableNativeMillingPhysics</code> is <code>true</code> and a shipping build throws if you set
|
||||
it <code>false</code>; <code>YieldingStressRatio</code> reports <strong><code>NaN</code></strong> instead of <code>0</code> when it cannot be evaluated, so
|
||||
a caller reading <code>0</code> as “no constraint” must add a <code>NaN</code> branch</li>
|
||||
<li><strong>New licence feature <code>NcComposition</code> (id 22)</strong> gates registering a non-built-in unit into a
|
||||
<code>SoftNcRunner</code> pipeline and executing an NC-embedded C# script. Degradation is silent and
|
||||
functional — the unit is skipped with one <code>Composition--NotLicensed</code> — so an unlicensed
|
||||
installation produces a <em>different simulation</em>, not an error</li>
|
||||
<li><strong>Packaging:</strong> x64 only; the shipped machine-tool packages are renamed and now carry the <code>.default</code>
|
||||
marker (<code>MachineTool/Table-B1.default</code>, <code>MachineTool/CT-350.default</code>), so a project that refers to
|
||||
one by its earlier path must be repointed; HiNcServer pins request localization to English and
|
||||
HiNcRcl drops the inert <code>HiNC:DisplayEngine:FontFile</code> key</li>
|
||||
</ul>
|
||||
<p>Some results change without any code change — the pivot-transform anchor, a G68 rotation that was a
|
||||
silent no-op, blank lines resetting G90/G91, Heidenhain absolute arc centres, five-axis IK about
|
||||
1000× tighter, and MC-linear moves stepping by euclidean tip travel. They are listed with their
|
||||
symptoms under
|
||||
<a href="upgrading-to-3.2.html#results-that-change-on-upgrade">Results that change on upgrade</a>.</p>
|
||||
<h3 id="new-in-this-release">New in this release</h3>
|
||||
<ul>
|
||||
<li><strong>Siemens SINUMERIK programs replay end to end</strong> — real <code>.mpf</code> / <code>.spf</code> files rather than an ISO
|
||||
subset: modal vocabulary and <code>T="name"</code> tool calls, an expression evaluator over R-parameters and
|
||||
<code>$</code>-system variables, programmable frames and <code>$P_UIFR</code>, <code>TRAORI</code> RTCP and <code>CYCLE800</code> swivel,
|
||||
subprogram and <code>MCALL</code> cycle calls, full control flow with iteration watchdogs, the
|
||||
<code>AC()</code> / <code>IC()</code> / <code>DC()</code> per-word coordinate functions and the coded-position family</li>
|
||||
<li><strong>Heidenhain plays both dialects on one preset</strong> — klartext motion, datums, tool calls, arcs and
|
||||
cycles; Q-parameter evaluation with FN 9–12 conditional jumps; the <code>PLANE</code> / <code>FUNCTION TCPM</code> /
|
||||
<code>M128</code> tilt and RTCP stack; subprogram and <code>CALL PGM</code> calls; post-processed spellings written
|
||||
without separators; and the DIN/ISO dialect with its absolute <code>I</code> / <code>J</code> / <code>K</code> arc centres</li>
|
||||
<li><strong>Fanuc Custom Macro B and polar interpolation</strong> — <code>#var</code> expressions, <code>IF</code> / <code>GOTO</code> / <code>WHILE</code>,
|
||||
<code>M98</code> / <code>M99</code> subprograms and <code>G65</code> / <code>G66</code> macro calls; <code>G12.1</code> / <code>G13.1</code> polar coordinate
|
||||
interpolation with <code>G41</code> / <code>G42</code> compensation on the hypothetical plane</li>
|
||||
<li><strong><a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> is the default NC pipeline.</strong> See
|
||||
<a href="../fundamentals/nc-parsing/index.html">NC Parsing Engine</a> for its architecture and the per-brand
|
||||
support matrix</li>
|
||||
<li><strong>NC optimization runs on that pipeline</strong> — <em>not finished on this line, see Adoption status above</em>
|
||||
— regenerating text as anchored token edits over the verbatim source block, so lines the optimizer
|
||||
does not touch round-trip byte-identically. Output follows the source's decimal digits and is
|
||||
written back in the source file's encoding, so a GBK or Big5 program keeps its comments</li>
|
||||
<li><strong>Cutter-location files drive a real machine chain</strong>, not only a <code>ClMillingDevice</code>, and a played CL
|
||||
program converts to Fanuc NC through <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ConvertClToNcFiles_">ConvertClToNcFiles</a></li>
|
||||
<li><strong>Milling physics moved into the native kernel</strong> — engagement, force and the sequential thermal
|
||||
chain — with the tool's scalar physics frozen once per session into
|
||||
<a class="xref" href="../api/Hi.Milling.MillingTools.MillingToolPhysicsPack.html">MillingToolPhysicsPack</a>, which also makes force waveforms
|
||||
reproducible between two plays of the same program</li>
|
||||
<li><strong>Session commands declare themselves</strong> through
|
||||
<a class="xref" href="../api/Hi.SessionCommands.CommandCatalogAttribute.html">CommandCatalogAttribute</a> and
|
||||
<a class="xref" href="../api/Hi.SessionCommands.CommandFieldAttribute.html">CommandFieldAttribute</a>, so a generic editor renders them without a
|
||||
hand-written form; the HTTP surface answers a no-session or no-project call with 409 and an
|
||||
<a class="xref" href="../api/Hi.MachiningProcs.ApiActionResult.html">ApiActionResult</a> envelope carrying the call's notifications</li>
|
||||
<li><strong>Diagnostics carry a template and its arguments</strong>, so a front end can re-render a notification in
|
||||
its own language, and repeats fold into one per-run summary instead of one message per block</li>
|
||||
<li><strong>Shipped resources carry a <code>.default</code> marker</strong> distinguishing system territory from user files,
|
||||
and HiNc-Resource ships the five brand controller presets and three coolant presets so those load
|
||||
browsers start populated</li>
|
||||
<li><strong>A parser configuration is a file, and it is shareable.</strong> <a class="xref" href="../api/Hi.NcParsers.NcRunnerSuit.html">NcRunnerSuit</a> bundles
|
||||
a runner with its per-case data as one loadable unit, and per-case data now travels as proxy
|
||||
placeholders that resolve against the owning project — so one controller configuration is no longer
|
||||
welded to the job it was first built for</li>
|
||||
<li><strong>A long program no longer degrades as it plays.</strong> A dead equality guard made the session append an
|
||||
NC-optimization option entry for every played act instead of only at change points, and reading the
|
||||
last one walked the whole map — together, quadratic. On a 2.35-million-line Siemens program the
|
||||
per-100,000-line rate now stays flat instead of climbing from 73 s to about 11 minutes. It applied
|
||||
to every runner, including sessions doing no optimization at all</li>
|
||||
<li><strong>Performance and footprint, measured</strong> — physics in the native kernel takes a paired play from
|
||||
59.3 s / 16.1 GB allocated to 40.6 s / 3.4 GB; building the topology of a large STL is linear
|
||||
instead of quadratic in triangle count (18.7× at 300k triangles, and it was 99.6% of the load);
|
||||
re-triangulating after a cut is about 2.2× faster; and a long program no longer exhausts client
|
||||
memory (session retention on a 25,000-block play: 406 MB → 142 MB). Every figure with its
|
||||
conditions — including the two things that cost more on purpose — is under
|
||||
<a href="upgrading-to-3.2.html#performance-and-footprint">Performance and footprint</a></li>
|
||||
<li><strong>Stability and data integrity</strong> — the native crashes from disposing a display or geometry object
|
||||
still in use, the intermittent “No cut / No data for step” on freshly-simulated steps, the
|
||||
project-file race between a Load and a Save, and non-reproducible milling-force waveforms are all
|
||||
fixed; large geometry now builds its display topology off-thread instead of freezing the UI</li>
|
||||
</ul>
|
||||
<h2 id="hinc-packages-version-31175">HiNc Packages Version 3.1.175</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="../api/Hi.NcMech.Workpieces.WorkpieceService.html">WorkpieceService</a> file IO now takes <strong>relative</strong> paths and resolves them against a base-directory <code>Func<string></code> injected by <a class="xref" href="../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> — the runtime-geometry write/read no longer requires the caller to pre-combine an absolute path. <code>WorkpieceService.ReadRuntimeGeom</code> (now <code>ReadMeshedGeom</code>) now returns whether the source file existed (the not-found notice moves to the calling shell)</li>
|
||||
<li>Rename runtime-geometry mesh-export methods to the <code>Export*</code> convention (STL/OBJ/PLY are foreign interchange formats, not native writes): <code>WriteRuntimeGeomToStl/Obj/Ply</code> → <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ExportRuntimeGeomToStl_">ExportRuntimeGeomToStl</a> / <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ExportRuntimeGeomToObj_">ExportRuntimeGeomToObj</a> / <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ExportRuntimeGeomToPly_">ExportRuntimeGeomToPly</a>; the session command <code>WriteRuntimeGeomToStlCommand</code> → <code>ExportRuntimeGeomToStlCommand</code> (now <a class="xref" href="../api/Hi.SessionCommands.ExportMeshedGeomToStlCommand.html">ExportMeshedGeomToStlCommand</a>) keeps the old <code><WriteRuntimeGeomToStlCommand></code> element name as a back-compat alias so existing projects still load</li>
|
||||
</ul>
|
||||
<h2 id="hinc-packages-version-31173">HiNc Packages Version 3.1.173</h2>
|
||||
<ul>
|
||||
<li>Improve <a class="xref" href="../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_Mrr_mm3ds">Mrr_mm3ds</a> precision: the material-removal-rate now sums each cut contour's signed area-vector (fan triangulation, skipping non-finite triangles) projected on the feed direction, replacing the per-contour bounding-box area that over-estimated the cut cross-section</li>
|
||||
<li>Add <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_AlignWorkpieceProgramZeroToIso_">AlignWorkpieceProgramZeroToIso</a> script command: resolves a G54/G55/… entry from the project ISO coordinate table and places workpiece + fixture so the program zero coincides with that machine coordinate (topology math delegated to the new <a class="xref" href="../api/Hi.Machining.MachiningEquipmentUtils.MachiningEquipmentUtil.html#Hi_Machining_MachiningEquipmentUtils_MachiningEquipmentUtil_AlignWorkpieceProgramZeroToIso_">AlignWorkpieceProgramZeroToIso</a> extension)</li>
|
||||
<li>Drop gRPC plumbing from the HiNc package: remove <code>Hi.Grpcs.*</code> ClStrip/Player service runners and protos, <code>MachiningProjectGrpcServer</code>, <code>MonitoringPlayer</code>, and <code>UniversalNcMonitorClient</code>; fold <code>CsvRunnerConfig</code> back into <a class="xref" href="../api/Hi.Numerical.FilePlayers.CsvRunner.html">CsvRunner</a> (gRPC services now ship in HiNcRcl / UJoinRcl)</li>
|
||||
<li>Drop gRPC plumbing from the HiNc package: remove <code>Hi.Grpcs.*</code> ClStrip/Player service runners and protos, <code>MachiningProjectGrpcServer</code>, <code>MonitoringPlayer</code>, and <code>UniversalNcMonitorClient</code>; fold <code>CsvRunnerConfig</code> back into <code>CsvRunner0</code> (gRPC services now ship in HiNcRcl / UJoinRcl)</li>
|
||||
</ul>
|
||||
<h2 id="hinc-packages-version-31172">HiNc Packages Version 3.1.172</h2>
|
||||
<ul>
|
||||
@@ -106,7 +294,7 @@
|
||||
</ul>
|
||||
<h2 id="hinc-packages-version-31167">HiNc Packages Version 3.1.167</h2>
|
||||
<ul>
|
||||
<li>Introduce <a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> as a pluggable NC parser/runner replacing the legacy <code>HardNcRunner</code>; opt in via <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EnableSoftNcRunner">EnableSoftNcRunner</a>. <strong>see <a href="softnc-rewrite-report.html">HardNc → SoftNc Rewrite — Progress Report</a> for the in-flight rewrite scope and remaining work</strong></li>
|
||||
<li>Introduce <a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> as a pluggable NC parser/runner replacing the legacy <code>HardNcRunner</code>, opt-in at the time via <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EnableSoftNcRunner">EnableSoftNcRunner</a>. It became the default pipeline in 3.2 — see <a href="../fundamentals/nc-parsing/index.html">NC Parsing Engine</a></li>
|
||||
<li>Extend coolant model to <a class="xref" href="../api/Hi.Numerical.CoolantMode.html">CoolantMode</a> Flood/Mist/Off and refactor <a class="xref" href="../api/Hi.Physics.CoolantHeatCondition.html">CoolantHeatCondition</a> / <code>MillingTemperatureUtil</code> for multi-mode coolant</li>
|
||||
<li>Bind session events to <a class="xref" href="../api/Hi.MachiningProcs.MachiningSession.html">MachiningSession</a> lifetime: <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_SessionStepBuilt">SessionStepBuilt</a>, <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_SessionStepSelected">SessionStepSelected</a>, <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_SessionSyntaxPieceRan">SessionSyntaxPieceRan</a>, <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_SessionSourcedActEntry">SessionSourcedActEntry</a> (legacy aliases kept as <code>[Obsolete]</code>); add <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_RegisterWriteSyntaxPieces_">RegisterWriteSyntaxPieces</a> / <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_RegisterWriteSyntaxPiecesWithActs_">RegisterWriteSyntaxPiecesWithActs</a> for syntax-piece debug tracing</li>
|
||||
<li>Add <a class="xref" href="../api/Hi.Common.XmlUtils.ProjectApiVersion.html">ProjectApiVersion</a> carrier through <a class="xref" href="../api/Hi.Common.XmlUtils.XFactory.html">XFactory</a> deserialization for project-XML version negotiation; resolve <a class="xref" href="../api/Hi.NcMech.Workpieces.Workpiece.html">Workpiece</a> through a lazy <code>Func</code> getter in <a class="xref" href="../api/Hi.NcMech.Workpieces.WorkpieceService.html">WorkpieceService</a></li>
|
||||
@@ -118,8 +306,8 @@
|
||||
<li>Add <a class="xref" href="../api/Hi.Common.Messages.ActionProgress-1.html">ActionProgress<T></a>.<a class="xref" href="../api/Hi.Common.Messages.ActionProgress-1.html#Hi_Common_Messages_ActionProgress_1_FromLogger_">FromLogger</a> to bridge <code>IProgress<object></code> APIs to <code>ILogger</code></li>
|
||||
<li>Rename <code>ShowIfCatched</code> → <a class="xref" href="../api/Hi.Common.Messages.ExceptionUtil.html#Hi_Common_Messages_ExceptionUtil_CatchExceptions_">CatchExceptions</a> with explicit <code>Action<Exception></code> handler; remove <code>RoutineBlocker0</code></li>
|
||||
<li>Extract <a class="xref" href="../api/Hi.NcMech.Workpieces.WorkpieceService.html">WorkpieceService</a> from <a class="xref" href="../api/Hi.NcMech.Workpieces.Workpiece.html">Workpiece</a> for runtime geometry operations</li>
|
||||
<li>Update ISO coordinate rendering for 3+2 axis machines: coordinate position now uses <a class="xref" href="../api/Hi.Numerical.IsoCoordinateEntryDisplayee.html">IsoCoordinateEntryDisplayee</a> with full machining chain anchor instead of table-buckle-only anchor</li>
|
||||
<li>Rename <code>SessionMessageHost</code> → <code>SessionProgress</code> on both <a class="xref" href="../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_SessionProgress">SessionProgress</a> and <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_SessionProgress">SessionProgress</a> (<code>SessionShell.SessionMessageHost</code> is kept as <code>[Obsolete]</code>)</li>
|
||||
<li>Update ISO coordinate rendering for 3+2 axis machines: coordinate position now uses <code>IsoCoordinateEntryDisplayee</code> with full machining chain anchor instead of table-buckle-only anchor</li>
|
||||
<li>Rename <code>SessionMessageHost</code> → <code>SessionProgress</code> on both <a class="xref" href="../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_ShellProgress">ShellProgress</a> and <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ShellProgress">ShellProgress</a> (<code>SessionShell.SessionMessageHost</code> is kept as <code>[Obsolete]</code>)</li>
|
||||
<li>Remove obsolete <code>HiLog</code> logging utility and <code>DynamicMachiningProjectDisplayee0</code></li>
|
||||
</ul>
|
||||
<h2 id="hinc-packages-version-31160">HiNc Packages Version 3.1.160</h2>
|
||||
@@ -152,7 +340,7 @@
|
||||
<ul>
|
||||
<li>Add cubetree geometry defect scanning (<a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ScanRuntimeGeomInfDefect_">ScanRuntimeGeomInfDefect</a>) and clearing (<a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ClearDefectDisplayee_">ClearDefectDisplayee</a>) for detecting and visualizing geometry anomalies in workpieces (see <a class="xref" href="../workflows/geometry-validation.html">Workflow: Geometry Validation</a>)</li>
|
||||
<li>Upgrade internal fraction representation to float128 precision for improved cubetree geometry accuracy and numerical stability</li>
|
||||
<li>Refactor messaging system from <code>IMessageHost</code> to standard <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress<T></a> pattern; <a class="xref" href="../api/Hi.MachiningProcs.SessionProgress.html">SessionProgress</a> (formerly <code>SessionMessageHost</code>) now implements <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress<T></a>, and all messaging methods renamed from <code>Add*</code> to <code>Report*</code> (e.g., <code>AddProgress</code> → <a class="xref" href="../api/Hi.Common.Messages.MultiTagMessageUtil.html#Hi_Common_Messages_MultiTagMessageUtil_ReportProgress_">ReportProgress</a>)</li>
|
||||
<li>Refactor messaging system from <code>IMessageHost</code> to standard <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress<T></a> pattern; <a class="xref" href="../api/Hi.MachiningProcs.ShellProgress.html">ShellProgress</a> (formerly <code>SessionMessageHost</code>) now implements <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.iprogress-1">IProgress<T></a>, and all messaging methods renamed from <code>Add*</code> to <code>Report*</code> (e.g., <code>AddProgress</code> → <code>MultiTagMessageUtil.ReportProgress</code>)</li>
|
||||
<li>Fix cubetree initialization crash</li>
|
||||
<li>Improve postprocess precision by applying sin–cos parameterization instead of direct angle-based formulation for rotary axis numerical solving in <a class="xref" href="../api/Hi.Numerical.Xyzabc.XyzabcSolver.html">XyzabcSolver</a></li>
|
||||
<li>Add asynchronous anchor solid preparation on project load for improved startup performance</li>
|
||||
@@ -199,13 +387,13 @@
|
||||
<li>Improve <a class="xref" href="../api/Hi.MillingForces.Training.MillingTraining.html">MillingTraining</a> module with separate lead and result parameter templates for more accurate cutting parameter training</li>
|
||||
<li>Separate C++ library for code protection</li>
|
||||
<li>Add UTF-8 file path support for runtime geometry IO operations</li>
|
||||
<li>Improve <a class="xref" href="../api/Hi.Numerical.FilePlayers.CsvRunner.html">CsvRunner</a> with enhanced time mapping pattern</li>
|
||||
<li>Improve <code>CsvRunner0</code> with enhanced time mapping pattern</li>
|
||||
<li>Various architecture improvements and bug fixes</li>
|
||||
</ul>
|
||||
<h2 id="hinc-packages-version-3191">HiNc Packages Version 3.1.91</h2>
|
||||
<ul>
|
||||
<li>Add <a class="xref" href="../api/Hi.NcOpt.NcOptimizationEmbeddedLogMode.html">NcOptimizationEmbeddedLogMode</a> to control embedded log detail level (None/SimpleLog/FullLog) (see <a href="../workflows/nc-optimization.html#embedded-log-comments">Embedded Log Comments</a>).</li>
|
||||
<li>Fix bug of <a class="xref" href="../api/Hi.NcOpt.NcOptProc.html">NcOptProc</a> duplicated feedrate assignment</li>
|
||||
<li>Fix bug of <code>NcOptProc</code> duplicated feedrate assignment</li>
|
||||
</ul>
|
||||
<h2 id="hinc-packages-version-3190">HiNc Packages Version 3.1.90</h2>
|
||||
<ul>
|
||||
@@ -216,7 +404,7 @@
|
||||
</ul>
|
||||
<h2 id="hinc-packages-version-3186">HiNc Packages Version 3.1.86</h2>
|
||||
<ul>
|
||||
<li>Re-build <a class="xref" href="../api/Hi.NcOpt.NcOptProc.html">NcOptProc</a> with stricter optimization logics</li>
|
||||
<li>Re-build <code>NcOptProc</code> with stricter optimization logics</li>
|
||||
<li>Add optimization logging features (see <a href="../workflows/nc-optimization.html#optimization-logs">Optimization Logs</a>):
|
||||
<ul>
|
||||
<li><code>.flatproc.log</code> file output for optimization process analysis</li>
|
||||
@@ -232,14 +420,14 @@
|
||||
<li>Optimize memory usage by shrinking map-size of clStripPos</li>
|
||||
<li>Fix design pattern of cutting parameter training module (<a class="xref" href="../api/Hi.MillingForces.Training.MillingTraining.html">MillingTraining</a>)</li>
|
||||
<li>Add <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_LoadCuttingParaByFile_">LoadCuttingParaByFile</a> function to load cutting parameters from file</li>
|
||||
<li>Improve <a class="xref" href="../api/Hi.Numerical.FilePlayers.CsvRunner.html">CsvRunner</a> actual time parsing: automatically calculate step duration from actual time when duration is not provided</li>
|
||||
<li>Enhance message handling in <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html">SessionShell</a> by unifying <a class="xref" href="../api/Hi.MachiningProcs.SessionProgress.html">SessionProgress</a> usage</li>
|
||||
<li>Improve <code>CsvRunner0</code> actual time parsing: automatically calculate step duration from actual time when duration is not provided</li>
|
||||
<li>Enhance message handling in <a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html">SessionShell</a> by unifying <a class="xref" href="../api/Hi.MachiningProcs.ShellProgress.html">ShellProgress</a> usage</li>
|
||||
<li>Improve optimization performance with better task scheduling</li>
|
||||
<li>Various performance improvements and bug fixes</li>
|
||||
</ul>
|
||||
<h2 id="hinc-packages-version-3175">HiNc Packages Version 3.1.75</h2>
|
||||
<ul>
|
||||
<li>Add actual time tracking functionality (<a class="xref" href="../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_ActualTime_">ActualTime</a>)</li>
|
||||
<li>Add actual time tracking functionality (<a class="xref" href="../api/Hi.MachiningSteps.MachiningStep.html#Hi_MachiningSteps_MachiningStep_ActualTimecode_">ActualTimecode</a>)</li>
|
||||
<li>Various stability improvements and bug fixes</li>
|
||||
</ul>
|
||||
<h2 id="hinc-packages-version-3174">HiNc Packages Version 3.1.74</h2>
|
||||
|
||||
@@ -1,542 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>HardNc 到 SoftNc 改寫進度報告 | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="HardNc 到 SoftNc 改寫進度報告 | 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 "{query}"">
|
||||
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||
<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="">
|
||||
<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="SoftNc-Rewrite-Report">
|
||||
<h1 id="hardnc--softnc-改寫進度報告">HardNc → SoftNc 改寫進度報告</h1>
|
||||
|
||||
<blockquote>
|
||||
<p><strong>說明:</strong> 此頁為從最新 release note 連入的暫時性進度頁面。
|
||||
內容描述進行中的改寫,未來可能重整、改置或移除,因此並未列入主導覽選單。</p>
|
||||
</blockquote>
|
||||
<p>HiAPIs 的 NC 解譯器正從早期單體式 <code>HardNcXxx</code> 全面改寫為可重組(reconfigurable)的
|
||||
<code>SoftNcXxx</code> pipeline。本頁說明改寫動機、架構轉變、目前完成度,以及剩餘工作。</p>
|
||||
<p><strong>Last Updated:</strong> 2026-04-26</p>
|
||||
<hr>
|
||||
<h2 id="1-executive-summary">1. Executive Summary</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>指標</th>
|
||||
<th>內容</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>客戶需求</td>
|
||||
<td>NC 解譯器需「Reconfigurable(可重組)」 — 不同廠牌、不同機械架構、不同 G/M code 集合,必須可由設定檔切換而不需重編譯。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>改寫策略</td>
|
||||
<td>將 3,000+ 行的 <a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> 單體類別解構為 <a class="xref" href="../api/Hi.NcParsers.Segmenters.ISegmenter.html">ISegmenter</a> + <a class="xref" href="../api/Hi.NcParsers.Initializers.INcInitializer.html">INcInitializer</a> + 多層 <a class="xref" href="../api/Hi.NcParsers.Syntaxs.INcSyntax.html">INcSyntax</a> + <a class="xref" href="../api/Hi.NcParsers.Semantics.INcSemantic.html">INcSemantic</a> + <a class="xref" href="../api/Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a> 五段 pipeline,全部以介面為主、可由 XML 序列化。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>完成度估算</td>
|
||||
<td><strong>ISO 共通部分接近完成</strong> — 主流 G/M code、modal 行為、ISO 座標系、刀具補償、CL/MC 兩段路徑、Cycle、G43.4 RTCP、G68/G68.2 傾斜、單位/暫停/冷卻、診斷系統皆已上線。其他廠牌(Siemens / Syntec / Mazak / Heidenhain)特定語法尚未深入盤點,不敢稱為接近完成。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>仍未動工</td>
|
||||
<td>(1) 程式呼叫 / 巨集 / 子程式(<code>CALL</code>, <code>M98</code>, <code>LBL CALL</code>) (2) 數學/邏輯函式(<code>#var = expr</code>, <code>IF/GOTO/WHILE</code>, Q-parameter 算式) (3) <a class="xref" href="../api/Hi.NcOpt.NcOptProc.html">NcOptProc</a> 模組(仍綁定舊 <a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> / <a class="xref" href="../api/Hi.Numerical.HardNcEnv.html">HardNcEnv</a>,尚未深入規劃)。</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>風險評估</td>
|
||||
<td>程式呼叫 / 數學邏輯:低 — 可在現有 <a class="xref" href="../api/Hi.NcParsers.Syntaxs.IExpandingNcSyntax.html">IExpandingNcSyntax</a> / <a class="xref" href="../api/Hi.NcParsers.Syntaxs.INcSyntax.html">INcSyntax</a> / <a class="xref" href="../api/Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a> 介面下,以「新增實作」而非「改架構」的方式落地。NcOpt:不算低風險,仍有未知的設計工作待釐清。</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<blockquote>
|
||||
<p><strong>Hard → Soft 不是改寫一個類別,而是把「規則寫在程式裡」搬成「規則寫在資料裡」。</strong></p>
|
||||
</blockquote>
|
||||
<hr>
|
||||
<h2 id="2-設計哲學三大支柱">2. 設計哲學:三大支柱</h2>
|
||||
<p><a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> 的彈性奠基於三個彼此正交的設計原則。任何一條缺失,整個 pipeline 都會退化回 <a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> 那種「想改任何東西都要動到中央類別」的狀態。</p>
|
||||
<h3 id="21-xml-configurable--結構即資料">2.1 XML-configurable — 結構即資料</h3>
|
||||
<p><code>SoftNcRunner</code> 本身只是一個容器,內部 5 個 List 全部由 XML 載入:</p>
|
||||
<pre><code class="lang-xml"><SoftNcRunner>
|
||||
<NcDependencyList>...</NcDependencyList> <!-- 1. 依賴設定 -->
|
||||
<Segmenter>...</Segmenter> <!-- 2. 段落切分器 -->
|
||||
<NcInitializationList>...</NcInitializationList> <!-- 3. 初始化 -->
|
||||
<NcSyntaxList>...</NcSyntaxList> <!-- 4. 語法層 -->
|
||||
<NcSemanticList>...</NcSemanticList> <!-- 5. 語義層 -->
|
||||
</SoftNcRunner>
|
||||
</code></pre>
|
||||
<p>每個 <a class="xref" href="../api/Hi.NcParsers.Syntaxs.INcSyntax.html">INcSyntax</a> / <a class="xref" href="../api/Hi.NcParsers.Semantics.INcSemantic.html">INcSemantic</a> / <a class="xref" href="../api/Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a> 都實作 <a class="xref" href="../api/Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a>,透過 <a class="xref" href="../api/Hi.Common.XmlUtils.XFactory.html">XFactory</a>.<code>Regs.Add(XName, ...)</code> 自動註冊。<strong>新增一個 G code 不需改 SoftNcRunner,只需新增一個 syntax class 並在 XML 加一行。</strong></p>
|
||||
<h3 id="22-dataflow-transparent--json-為共通通貨">2.2 DataFlow-transparent — JSON 為共通通貨</h3>
|
||||
<p>每個 <a class="xref" href="../api/Hi.NcParsers.Sentence.html">Sentence</a> 通過 pipeline 時帶著一個 <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a>,每一層 syntax 都是「讀某些鍵 → 寫某些鍵 → 移除已消費的鍵」。整段 dataflow 對外可序列化為 JSON,方便:</p>
|
||||
<ul>
|
||||
<li><strong>除錯</strong> — 可在任何一層之間印出 JSON snapshot 看狀態。</li>
|
||||
<li><strong>測試</strong> — unit test 可直接斷言 JSON 結構,不需 mock 整個 NcEnv。</li>
|
||||
<li><strong>跨語言整合</strong> — 未來若要做 Web API / Python binding,JSON 即現成傳輸格式。</li>
|
||||
</ul>
|
||||
<p>JSON 鍵名採「Section + Term」雙層結構:section key 用語義名稱(<code>Unit</code>、<code>Feedrate</code>、<code>Motion</code> ...)跨廠牌一致;NC 代碼實際關鍵字(<code>G21</code> / <code>G94</code> / <code>G01</code>、Heidenhain <code>BLK FORM</code> / <code>LBL</code> / <code>PGM</code> 等)放在子物件的 <code>Term</code> 欄位以保留與原始 NC 的對應。</p>
|
||||
<h4 id="範例--一行-nc-block-的-json-結構">範例 — 一行 NC block 的 JSON 結構</h4>
|
||||
<p>原始 NC(Fanuc 風格):</p>
|
||||
<pre><code class="lang-text">N162 X-14.696 Y-6.42 Z45.638
|
||||
</code></pre>
|
||||
<p>該 block 通過 pipeline 後的 <a class="xref" href="../api/Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>.<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">JsonObject</a> 內容(截自實機輸出,矩陣數值省略):</p>
|
||||
<pre><code class="lang-json">{
|
||||
"IndexNote": {"Symbol":"N","Number":162},
|
||||
"Positioning": {"Term":"G90","Mode":"Absolute"},
|
||||
"Unit": {"Term":"G21","System":"Metric"},
|
||||
"PlaneSelect": {"Term":"G17","Plane":"XY"},
|
||||
"Feedrate": {"FeedrateValue":400,"Term":"G94","Unit":"mm/min"},
|
||||
"SpindleSpeed": {"SpindleSpeed_rpm":20000,"Direction":"CW"},
|
||||
"Coolant": {"IsOn":true,"Mode":"Flood"},
|
||||
"ToolChange": {"ToolId":4,"IsChange":false},
|
||||
"TiltTransform": {"Term":"G68.2"},
|
||||
"EndPointProgramToMcTransform": [
|
||||
{"Source":"TiltTransform", "Mat4d":[ /* 16 doubles */ ]},
|
||||
{"Source":"ToolHeightCompensation", "Mat4d":[ /* 16 doubles */ ]},
|
||||
{"Source":"CoordinateOffset", "Mat4d":[ /* 16 doubles */ ]},
|
||||
{"Source":"PivotTransform", "Mat4d":[ /* 16 doubles */ ]}
|
||||
],
|
||||
"ToolHeightCompensation": {"Offset_mm":16,"Term":"G43","OffsetId":4},
|
||||
"CoordinateOffset": {"CoordinateId":"G54","Offset_X":72.4,"Offset_Y":-72.4,"Offset_Z":-116.44},
|
||||
"ProgramXyz": {"X":-14.696,"Y":-6.42,"Z":45.638},
|
||||
"MachineCoordinate": {"X":140.5947...,"Y":-78.8200...,"Z":-124.4559...},
|
||||
"MotionState": {"Term":"G01"},
|
||||
"MotionEvent": {"Form":"McLinear","IsRapid":false},
|
||||
"RadiusCompensation": {"Term":"G40","OffsetId":0,"Radius_mm":0}
|
||||
}
|
||||
</code></pre>
|
||||
<p>幾點觀察:</p>
|
||||
<ul>
|
||||
<li>每一個區塊(<code>Positioning</code>, <code>Feedrate</code>, <code>Coolant</code>, <code>ToolChange</code>, ...)都是某一個 syntax 的輸出 — 例如 <code>Feedrate</code> 來自 <a class="xref" href="../api/Hi.NcParsers.LogicSyntaxs.FeedrateSyntax.html">FeedrateSyntax</a>,<code>MachineCoordinate</code> 來自 <a class="xref" href="../api/Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a>。</li>
|
||||
<li><code>ProgramXyz</code> 與 <code>MachineCoordinate</code> 並陳:原始 NC 寫的是程式座標,pipeline 終點同時保留兩者,方便 UI / 報表選用。</li>
|
||||
<li><code>EndPointProgramToMcTransform</code> 把 Program → MC 的成因鏈攤平為四段(Tilt、ToolHeight、CoordinateOffset、Pivot),每段附上來源變換矩陣 — 若 MC 結果不如預期,看這個陣列就知道是哪一段補正在作怪,不需重跑除錯器。</li>
|
||||
<li>modal 狀態(<code>Unit</code> / <code>Positioning</code> / <code>PlaneSelect</code> / 等)即使這一行沒有顯式寫出,也會被前一節的 modal lookback 帶到此處,確保每個 block 的 JSON 都是自足的。</li>
|
||||
</ul>
|
||||
<h3 id="23-interface-based--消費者導向依賴">2.3 Interface-based — 消費者導向依賴</h3>
|
||||
<p>舊系統的 <a class="xref" href="../api/Hi.Numerical.HardNcEnv.html">HardNcEnv</a> 是一個 God Object — 上百個欄位塞在一起,修改任何一個都可能波及無關的 syntax。新系統反過來:每個 syntax 自己宣告需要什麼介面,由 <code>NcDependencyList.OfType<T>()</code> 拉取:</p>
|
||||
<pre><code class="lang-csharp">// 範例:G28 ReferenceReturnSyntax 需要 home 座標
|
||||
var homeConfig = ncDependencyList.OfType<IHomeMcConfig>().FirstOrDefault();
|
||||
</code></pre>
|
||||
<p>依賴設定本身也是物件,只要實作對應介面即可注入。新增廠牌只需新增一個 <code>XxxParameterTable : </code> <a class="xref" href="../api/Hi.NcParsers.Dependencys.ControllerParameterTableBase.html">ControllerParameterTableBase</a>。</p>
|
||||
<hr>
|
||||
<h2 id="3-架構對照圖">3. 架構對照圖</h2>
|
||||
<h3 id="31-舊架構hardnc">3.1 舊架構(HardNc)</h3>
|
||||
<pre><code class="lang-mermaid">graph TD
|
||||
A[NC raw lines] --> B[HardNcRunner]
|
||||
B --> C[new HardNcLine ctor]
|
||||
C --> D[HardNcEnv God Object<br/>~80 fields, 4 brands hard-coded]
|
||||
C --> E[NcProc.GetActs]
|
||||
D -.coupled.-> C
|
||||
D -.coupled.-> E
|
||||
E --> F[IAct stream]
|
||||
|
||||
style D fill:#fdd,stroke:#c33,color:#000
|
||||
style C fill:#fdd,stroke:#c33,color:#000
|
||||
</code></pre>
|
||||
<p><strong>痛點:</strong></p>
|
||||
<ul>
|
||||
<li><a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> 建構子 = 解析 + modal 累計 + MC 計算 + 補償,全部混在 3,000 行內。</li>
|
||||
<li><a class="xref" href="../api/Hi.Numerical.HardNcEnv.html">HardNcEnv</a> 包含所有廠牌設定,CncBrand 切換時用 if/switch 在內部分流。</li>
|
||||
<li>新增廠牌 / 自訂語法 = 修改 <a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a>、<a class="xref" href="../api/Hi.Numerical.HardNcEnv.html">HardNcEnv</a>、<a class="xref" href="../api/Hi.Numerical.NcProc.html">NcProc</a> 三處。</li>
|
||||
<li><a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> 同時是資料載體、解析狀態機、輸出來源 — 無法在管線中插入第三方步驟。</li>
|
||||
</ul>
|
||||
<h3 id="32-新架構softnc">3.2 新架構(SoftNc)</h3>
|
||||
<pre><code class="lang-mermaid">graph TD
|
||||
A[NC raw lines] --> SEG[ISegmenter]
|
||||
SEG --> SENT[Sentence stream]
|
||||
SENT --> INIT[INcInitializer<br/>HomeMc / Static]
|
||||
INIT --> P[ParsingSyntaxs<br/>Layer 1]
|
||||
P --> L1[LogicSyntaxs Layer 2<br/>ProgramXyz / McXyz / Motion]
|
||||
L1 --> L2[LogicSyntaxs Layer 3<br/>McAbcCyclic / Cleanup]
|
||||
L2 --> POST[PostSyntaxs<br/>Cache / Snapshot]
|
||||
POST --> SEM[INcSemantic<br/>→ IAct]
|
||||
SEM --> OUT[SourcedActEntry]
|
||||
|
||||
DEP[INcDependency List<br/>BrandTable / IsoCoord / ToolOffset / ...]
|
||||
DEP -. injected .-> P
|
||||
DEP -. injected .-> L1
|
||||
DEP -. injected .-> L2
|
||||
DEP -. injected .-> SEM
|
||||
|
||||
style P fill:#dfd,stroke:#393,color:#000
|
||||
style L1 fill:#dfd,stroke:#393,color:#000
|
||||
style L2 fill:#dfd,stroke:#393,color:#000
|
||||
style POST fill:#dfd,stroke:#393,color:#000
|
||||
style SEM fill:#dfd,stroke:#393,color:#000
|
||||
</code></pre>
|
||||
<p>每一層的「步驟個數、順序、實作類別」都由 XML 決定。新增 G code = 新增一個 syntax 並在 XML 中插入;汰除舊 G code = 從 XML 拿掉那一行。</p>
|
||||
<hr>
|
||||
<h2 id="4-元件對照表">4. 元件對照表</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>角色</th>
|
||||
<th>HardNc</th>
|
||||
<th>SoftNc</th>
|
||||
<th>進度</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>主 Runner</td>
|
||||
<td><a class="xref" href="../api/Hi.Numerical.FilePlayers.HardNcRunner.html">HardNcRunner</a>(約 165 行)</td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a>(約 870 行,純編排)</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>設定容器</td>
|
||||
<td><a class="xref" href="../api/Hi.Numerical.HardNcEnv.html">HardNcEnv</a>(約 571 行 God Object)</td>
|
||||
<td><code>List<</code><a class="xref" href="../api/Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a><code>></code> 多介面</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NC 行物件</td>
|
||||
<td><a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a>(約 3,118 行)</td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.Sentence.html">Sentence</a> + <a class="xref" href="../api/Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>(<code>JsonObject</code>)</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>段落切分</td>
|
||||
<td>寫死於 <code>HardNcRunner.BuildNcLinesByRawNcLines</code></td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.Segmenters.ISegmenter.html">ISegmenter</a>(3 種實作)</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>初始化</td>
|
||||
<td><code>RefNcLineOnInit</code> 隱式</td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.Initializers.INcInitializer.html">INcInitializer</a> 顯式(2 種實作)</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>文字解析</td>
|
||||
<td><a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> 建構子內 regex</td>
|
||||
<td><code>ParsingSyntaxs/</code>(約 15 種,寫入 <code>Parsing</code>)</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Modal / 跨行邏輯</td>
|
||||
<td><a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> 內 <code>last:</code> 參考</td>
|
||||
<td><code>LogicSyntaxs/</code>(約 36 種,跨節點 lookback)</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>廠牌專屬語法</td>
|
||||
<td><code>if (CncBrand == ...)</code> 內聯</td>
|
||||
<td><code>XxxSyntaxUtil.DefaultSyntaxList</code> 五份</td>
|
||||
<td>ISO 共通已完成;廠牌特定進行中</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cycle 處理</td>
|
||||
<td><code>HardNcLine.cs</code> 內函式群</td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.LogicSyntaxs.BoringCycleSyntax.html">BoringCycleSyntax</a> / <a class="xref" href="../api/Hi.NcParsers.LogicSyntaxs.DrillingCycleSyntax.html">DrillingCycleSyntax</a> / <a class="xref" href="../api/Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> 等</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>座標系 / 偏移</td>
|
||||
<td><code>HardNcEnv.IsoCoordinateTable</code> 等欄位</td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.Dependencys.Generic.IsoCoordinateTable.html">IsoCoordinateTable</a> / <code>HeidenhainDatumTable</code> / <a class="xref" href="../api/Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a> 介面</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>廠牌參數表</td>
|
||||
<td><code>HardNcEnv.ConfigurationTable</code> 字典</td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.Dependencys.Fanuc.FanucParameterTable.html">FanucParameterTable</a> / <a class="xref" href="../api/Hi.NcParsers.Dependencys.Syntec.SyntecParameterTable.html">SyntecParameterTable</a> / <a class="xref" href="../api/Hi.NcParsers.Dependencys.Siemens.SiemensMachineDataTable.html">SiemensMachineDataTable</a> / <a class="xref" href="../api/Hi.NcParsers.Dependencys.Heidenhain.HeidenhainParameterTable.html">HeidenhainParameterTable</a>(繼承 <a class="xref" href="../api/Hi.NcParsers.Dependencys.ControllerParameterTableBase.html">ControllerParameterTableBase</a>)</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>行程界限</td>
|
||||
<td><code>HardNcEnv.CheckStrokeLimit</code></td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.Dependencys.IStrokeLimitConfig.html">IStrokeLimitConfig</a> + <a class="xref" href="../api/Hi.NcParsers.Semantics.StrokeLimitCheckSemantic.html">StrokeLimitCheckSemantic</a></td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>動作輸出</td>
|
||||
<td><a class="xref" href="../api/Hi.Numerical.NcProc.html">NcProc</a>.<code>GetActs</code></td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.Semantics.INcSemantic.html">INcSemantic</a>.<code>Resolve</code>(12 種)</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>診斷</td>
|
||||
<td><code>sessionProgress.ReportError</code> 字串</td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a> 結構化(severity / category / ID / sentence)</td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cs Script</td>
|
||||
<td><code>HardNcUtil.GetSimCsScript</code> 字串切割</td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.ParsingSyntaxs.CsScriptSyntax.html">CsScriptSyntax</a> + <a class="xref" href="../api/Hi.NcParsers.Semantics.CsScriptBeginSemantic.html">CsScriptBeginSemantic</a> / <a class="xref" href="../api/Hi.NcParsers.Semantics.CsScriptEndSemantic.html">CsScriptEndSemantic</a></td>
|
||||
<td>已完成</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>子程式 / <code>CALL</code></td>
|
||||
<td><a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> 內部分支處理</td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.Syntaxs.IExpandingNcSyntax.html">IExpandingNcSyntax</a> 介面已備好,待建構</td>
|
||||
<td>待建構</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>數學 / 邏輯函式</td>
|
||||
<td><a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> 內 <code>IsoNC_Proc</code> P/Invoke</td>
|
||||
<td>待建構</td>
|
||||
<td>待建構</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NcOpt 模組</td>
|
||||
<td>綁 <a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> / <a class="xref" href="../api/Hi.Numerical.HardNcEnv.html">HardNcEnv</a></td>
|
||||
<td>待建構</td>
|
||||
<td>待建構</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<h2 id="5-進度狀態">5. 進度狀態</h2>
|
||||
<h3 id="51-已完成--主路徑全綠">5.1 已完成 — 主路徑全綠</h3>
|
||||
<p>ISO 共通部分皆已就緒:三層 <a class="xref" href="../api/Hi.NcParsers.Syntaxs.INcSyntax.html">INcSyntax</a> 架構、<a class="xref" href="../api/Hi.NcParsers.Semantics.INcSemantic.html">INcSemantic</a> 動作輸出、<a class="xref" href="../api/Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a>
|
||||
注入、廠牌參數表、ISO Logic Syntax、Motion + Compound Motion + Spindle 語義、
|
||||
Canned Cycle G73–G89、Group-09 Cycle modal 狀態管理、G41/G42 Radius Compensation、
|
||||
G68/G68.2/G69 傾斜、G43.4 RTCP、G53/G53.1、Mc ABC 旋轉軸最短路徑、ProgramXyz 追蹤、
|
||||
ISO Coordinate Table 字串 key 遷移、Block Skip 多層管控、Unit / ProgramStop /
|
||||
Coolant Mist、G28 / Comment / CncBrand / 版本 / CsScript、Cache Syntax(modal
|
||||
lookback O(N·Pace))、結構化 <a class="xref" href="../api/Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a> 診斷、<a class="xref" href="../api/Hi.MachiningProcs.LocalProjectService.html">LocalProjectService</a> / <a class="xref" href="../api/Hi.MachiningProcs.MachiningProject.html">MachiningProject</a> 整合,以及
|
||||
<a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html">SessionShell</a> Session Events。</p>
|
||||
<h3 id="52-仍未動工">5.2 仍未動工</h3>
|
||||
<h4 id="521-各廠牌特定語法尚未深入盤點">5.2.1 各廠牌特定語法尚未深入盤點</h4>
|
||||
<p>ISO 共通部分接近完成;但每個廠牌都有大量自有語法尚未動工,下表僅是樣本:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>廠牌</th>
|
||||
<th>待動工樣本</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Fanuc</td>
|
||||
<td>Custom Macro B 細節、<code>G10</code> Programmable Data Setting、<code>G50</code> 主軸限制、<code>G31</code> Skip、Polar 完整支援</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Siemens</td>
|
||||
<td><code>TRAORI</code> / <code>TRAFOOF</code>、<code>CYCLE800</code> 傾斜、<code>MSG</code> / <code>STOPRE</code>、Frame 體系(<code>TRANS</code> / <code>ROT</code> / <code>SCALE</code> / <code>MIRROR</code>)、GUD/PUD 變數、<code>SETAL</code> 警報</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Syntec</td>
|
||||
<td>自訂 G 巨集、Pr 系列參數對應、雙頭 / 雙刀塔語法</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mazak</td>
|
||||
<td>Mazatrol 對話式區段、MAZATROL ↔ EIA/ISO 切換、Mazak 特有 G/M 號碼差異</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heidenhain</td>
|
||||
<td><code>FK</code> Free Contour、<code>SL</code> Cycle、<code>PATTERN DEF</code>、<code>TCH PROBE</code> 量測循環、<code>TOOL DEF</code> / <code>TOOL CALL</code> 進階欄位、<code>PLANE</code> 完整 7 種模式</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>架構上不需改 pipeline;新增廠牌語法 = 新增 <a class="xref" href="../api/Hi.NcParsers.Syntaxs.INcSyntax.html">INcSyntax</a> 實作 + 註冊 + 加入該廠牌
|
||||
<code>XxxSyntaxUtil.DefaultSyntaxList</code>。但實作數量大,需依客戶優先序逐項展開。</p>
|
||||
<h4 id="522-程式呼叫--subprogram--macro-call">5.2.2 程式呼叫 — subprogram / macro call</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>對象</th>
|
||||
<th>描述</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>ISO <code>M98 P_ L_</code> / <code>M99</code></td>
|
||||
<td>Fanuc / Syntec / Mazak 子程式呼叫與返回</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heidenhain <code>LBL <n></code> / <code>CALL LBL <n> REPn</code></td>
|
||||
<td>標籤定義與重複呼叫</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heidenhain <code>PGM CALL "<file>"</code></td>
|
||||
<td>外部檔案呼叫</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Siemens <code><name></code> 子程式</td>
|
||||
<td>自訂子程式名稱呼叫</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><a class="xref" href="../api/Hi.NcParsers.Syntaxs.IExpandingNcSyntax.html">IExpandingNcSyntax</a>.<code>Expand()</code> 介面正是為此設計 — 允許一個 <a class="xref" href="../api/Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> 在管線中被展開為多個。已有 <a class="xref" href="../api/Hi.NcParsers.ParsingSyntaxs.Heidenhain.HeidenhainCallSyntax.html">HeidenhainCallSyntax</a>、<a class="xref" href="../api/Hi.NcParsers.ParsingSyntaxs.Heidenhain.HeidenhainLblSyntax.html">HeidenhainLblSyntax</a> 在 ParsingSyntax 層解析出 <code>Parsing.CALL</code> / <code>Parsing.LBL</code> 結構但尚未連到 expander。</p>
|
||||
<h4 id="523-數學--邏輯函式macro--control-flow">5.2.3 數學 / 邏輯函式(macro / control flow)</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>對象</th>
|
||||
<th>描述</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Fanuc Custom Macro B</td>
|
||||
<td><code>#100=...</code>、<code>IF [...] GOTO n</code>、<code>WHILE [...] DO n / END n</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Heidenhain Q-Parameter</td>
|
||||
<td><code>Q1 = Q2 + Q3</code>、<code>FN0</code> ~ <code>FN26</code>、<code>IF Q1 EQU 0 GOTO LBL</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Siemens R-parameter / GUD</td>
|
||||
<td><code>R1 = R2 * SIN(R3)</code>、<code>IF / GOTOB / GOTOF</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><a class="xref" href="../api/Hi.NcParsers.ParsingSyntaxs.Heidenhain.HeidenhainFnAssignmentSyntax.html">HeidenhainFnAssignmentSyntax</a> 與 <a class="xref" href="../api/Hi.NcParsers.ParsingSyntaxs.NamedVarAssignmentSyntax.html">NamedVarAssignmentSyntax</a> 已能將指派寫入 JSON;但 expression evaluator、條件跳轉、迴圈展開尚未實作。</p>
|
||||
<h4 id="524-ncopt-模組重寫">5.2.4 NcOpt 模組重寫</h4>
|
||||
<p>目前 <code>Hi.NcOpt</code>(<a class="xref" href="../api/Hi.NcOpt.NcOptProc.html">NcOptProc</a>、<a class="xref" href="../api/Hi.NcOpt.NcOptOption.html">NcOptOption</a>)仍綁定舊系統:透過 <a class="xref" href="../api/Hi.Numerical.HardNcLine.html">HardNcLine</a> 鏈結串列做最佳化(feedrate、深度切分、加速度限制等)。此模組尚未深入規劃,仍可能有未知工作量需釐清。</p>
|
||||
<hr>
|
||||
<h2 id="6-客戶可重組性reconfigurable展示">6. 客戶可重組性(Reconfigurable)展示</h2>
|
||||
<p>新系統下,下列三類客製化全部 <strong>不需重編譯</strong>:</p>
|
||||
<h3 id="61-切換廠牌內建-5-組-preset">6.1 切換廠牌(內建 5 組 preset)</h3>
|
||||
<pre><code class="lang-csharp">var runner = SoftNcRunner.HeidenhainNcRunner;
|
||||
runner.ConfigureByMachiningChain(machine.Chain);
|
||||
</code></pre>
|
||||
<p>亦可由 XML 載入由專案反序列化挑選。詳見 <a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a>。</p>
|
||||
<h3 id="62-客製某廠牌特定語法不影響其他廠牌">6.2 客製某廠牌特定語法(不影響其他廠牌)</h3>
|
||||
<p>例如某客戶 Fanuc 機台用了非標準 <code>M168</code> 進行夾具控制:</p>
|
||||
<ol>
|
||||
<li>新增一個 <code>MyClampMSyntax : </code> <a class="xref" href="../api/Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a> 類別。</li>
|
||||
<li>在客戶專案的 <a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> XML 中插入一行 <code><MyClampMSyntax/></code>。</li>
|
||||
<li>不需改動 HiAPIs 任何原始檔。</li>
|
||||
</ol>
|
||||
<h3 id="63-跨廠牌共用機構配置">6.3 跨廠牌共用機構配置</h3>
|
||||
<p><a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_ConfigureByMachiningChain_">ConfigureByMachiningChain</a> 把機台軸序、旋轉軸 / 線性軸區分、<a class="xref" href="../api/Hi.NcParsers.Dependencys.SystemWired.NcKinematicsDependency.html">NcKinematicsDependency</a> 的注入交由 <code>IMachiningChain</code> 驅動 — 5 軸機、4 軸機、雙轉台都共用同一條程式路徑。</p>
|
||||
<hr>
|
||||
<h2 id="7-過渡相容性">7. 過渡相容性</h2>
|
||||
<p>為了不破壞既有客戶專案:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>機制</th>
|
||||
<th>位置</th>
|
||||
<th>用途</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_FromLegacyNcEnvXml_">FromLegacyNcEnvXml</a></td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> 內 <code>Legacy HardNcEnv XML support</code> 區段</td>
|
||||
<td>讀舊 <a class="xref" href="../api/Hi.Numerical.HardNcEnv.html">HardNcEnv</a> XML 自動建構 <a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../api/Hi.Common.XmlUtils.XFactory.html">XFactory</a>.<code>Regs.Add("NcEnv", ...)</code></td>
|
||||
<td><a class="xref" href="../api/Hi.Numerical.HardNcEnv.html">HardNcEnv</a> 靜態建構子</td>
|
||||
<td>舊 XML key <code>NcEnv</code> 也能載入</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ApplyLegacyVersionPatches</code></td>
|
||||
<td><a class="xref" href="../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a></td>
|
||||
<td>依 <a class="xref" href="../api/Hi.Common.XmlUtils.ProjectApiVersion.html">ProjectApiVersion</a> 補上後續版本新增的 syntax/semantic(3.1.163 起 4 道補丁)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EnableSoftNcRunner">EnableSoftNcRunner</a></td>
|
||||
<td><a class="xref" href="../api/Hi.MachiningProcs.SessionShell.html">SessionShell</a></td>
|
||||
<td>客戶可在 script 中切換新舊 runner 比對結果</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</article>
|
||||
|
||||
<div class="contribution d-print-none">
|
||||
</div>
|
||||
|
||||
<div class="next-article d-print-none border-top" id="nextArticle"></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>
|
||||
@@ -15,6 +15,9 @@
|
||||
<li>
|
||||
<a href="index.html" name="" title="Release Note">Release Note</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="upgrading-to-3.2.html" name="" title="Upgrading from 3.1.175 to 3.2">Upgrading from 3.1.175 to 3.2</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
|
||||
{"items":[{"name":"Release Note","href":"index.html","topicHref":"index.html"}]}
|
||||
{"items":[{"name":"Release Note","href":"index.html","topicHref":"index.html"},{"name":"Upgrading from 3.1.175 to 3.2","href":"upgrading-to-3.2.html","topicHref":"upgrading-to-3.2.html"}]}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user