This repository has been archived on 2026-10-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2026-09-09 17:35:23 +08:00

167 lines
10 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cutter-location (CL) playback and CL-to-NC | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Cutter-location (CL) playback and CL-to-NC | 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="">
<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="Release-Upgrading-ClPlayback">
<h1 id="cutter-location-cl-playback-and-cl-to-nc">Cutter-location (CL) playback and CL-to-NC</h1>
<ul>
<li><strong>Replay an NX CLSF / APT-source toolpath directly.</strong>
<a class="xref" href="../../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_PlayClFile_">PlayClFile</a> reads <code>MSYS</code> / <code>FROM</code> / <code>GOTO</code> / <code>CIRCLE</code> /
<code>RAPID</code> / <code>FEDRAT</code> / <code>SPINDL</code> / <code>COOLNT</code> / <code>TLDATA</code> / <code>LOAD</code>. The parser is the
<a class="xref" href="../../api/Hi.Numerical.ClsfParsers.NxClRunner.html">NxClRunner</a> preset — a <a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> composition —
and the project holds a third runner suit <a class="xref" href="../../api/Hi.MachiningProcs.MachiningProject.html#Hi_MachiningProcs_MachiningProject_ClsfRunnerSuit">ClsfRunnerSuit</a>
beside the NC and CSV suits. A <code>TLDATA</code> record creates the tool geometry when the tool house has no
matching id. Run-ops are first class: <a class="xref" href="../../api/Hi.MachiningSteps.IMachiningService.html#Hi_MachiningSteps_IMachiningService_ClRunner">ClRunner</a>,
<code>MachiningSession.PlayClFile</code> / <code>RunClFile</code>. See
<a class="xref" href="../../technique/scripting/cutter-location-playback.html">Cutter-Location (CL) Playback</a>.</li>
<li><strong>A CL file can now drive a machine-tool chain</strong>, not only a
<a class="xref" href="../../api/HiMachining.Milling.ClMillingDevice.html">ClMillingDevice</a>. When the pipeline's kinematics dependency resolves to a
live solver, <a class="xref" href="../../api/Hi.Numerical.ClsfParsers.ClToMcTransformSyntax.html">ClToMcTransformSyntax</a> inverse-solves every CLSF motion
endpoint at parse time and expresses the result in the same <code>ProgramToMcTransform</code> vocabulary the NC
pipeline uses — a tool-height entry from the active tool, a pivot entry anchored to the workpiece
frame, and the solved rotary axes in raw degrees for the cyclic wrap tail-pass — so <code>McLinear</code> and
the wrap are reused unchanged. Played onto a <code>ClMillingDevice</code> the same file is still pure
cutter-location motion, which is what you want for verifying a CAM toolpath before any post-processor
is involved.</li>
<li><strong>CL moves resample along the true path.</strong> <a class="xref" href="../../api/Hi.Numerical.Acts.ActUtil.html#Hi_Numerical_Acts_ActUtil_GetClSteps_">GetClSteps</a> walks
<code>IClPath.At</code> for each intermediate step rather than linearly interpolating between the path's begin
and end, so a CL arc actually curves and the tool axis rotates <em>along</em> the path instead of through
it. <a class="xref" href="../../api/Hi.CutterLocations.ClPath.ClLinear.html">ClLinear</a> gained two guards on the same path: the near-parallel
begin/end normal case short-circuits instead of falling into a degenerate cross product that yielded
a NaN rotation axis, and the interpolation reads its rotation delta through the lazily-built property
rather than a still-null backing field.</li>
<li><strong>CL tool changes teleport instead of stepping.</strong> A stepping change stamps collision detection and
volume removal at the chain's current pose, and at CL session start that pose is identity — the tool
sitting at program zero inside the workpiece. The CSV pipeline's teleporting semantic is promoted to
the shared <a class="xref" href="../../api/Hi.NcParsers.Semantics.ToolingTeleportSemantic.html">ToolingTeleportSemantic</a> (the old <code>CsvToolingTeleportSemantic</code>
element name is kept as a load-only alias), and the first <code>GOTO</code> after a <code>LOAD</code> / <code>TOOL</code> is forced
into a reposition so a new tool never sweeps a cut from the previous operation's endpoint.</li>
<li><strong>Convert a played CL program into Fanuc NC files.</strong>
<a class="xref" href="../../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_ConvertClToNcFiles_">ConvertClToNcFiles</a>, its HTTP action, and the
<code>LocalProjectService</code> / <code>MachiningSession</code> entry points walk the session's final syntax-piece layer,
group pieces per source file and write one NC file per source, template-substituting <code>[NcName]</code>
(default <code>Output/[NcName].nc</code>). It requires a prior play on a machine chain — a pure-CL device leaves
no machine-solved sections to serialize — and reports <code>ConvertClToNc--NoPlay</code> otherwise. Stage-one
results are retained in <a class="xref" href="../../api/Hi.MachiningProcs.MachiningSession.html#Hi_MachiningProcs_MachiningSession_NcConversions">NcConversions</a> as the hook for
source↔output cross-navigation. A mission can declare the writeback through
<a class="xref" href="../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_EnableConvertClToNcFiles">EnableConvertClToNcFiles</a> and
<a class="xref" href="../../api/Hi.SessionCommands.PostExecutionCommand.html#Hi_SessionCommands_PostExecutionCommand_ClToNcFileTemplate">ClToNcFileTemplate</a>.</li>
<li><strong>CL→MC hardening.</strong> Tool-offset resolution walked back to the distant <code>LOAD</code> block for every motion
(O(N²) on production-scale files) and is now O(1) through a modal active-tool section; the
documentary program-to-Pn stamp is stamped once per run rather than walked per motion; the
program-zero query no longer deep-clones the whole equipment assembly per motion block; the
warned-tool-id set is run-scoped, so the <code>ClToMc--NoToolOffset</code> warning is no longer suppressed on
every run after the first; and <a class="xref" href="../../api/Hi.NcParsers.Dependencys.Generic.MachineAxisConfig.html">MachineAxisConfig</a> gains a
public <code>Clear()</code> so a machine switch rebuilds the axis table instead of accumulating stale rotary
axes.</li>
</ul>
</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>