OCCTProxy

occtProxy内核文件接口文档


GetTraceCenter

<p><strong>事件名称</strong>:GetTraceCenter</p> <p><strong>接口形式</strong>:方法</p> <p><strong>请求方式</strong>:调用<code>OCCTProxy</code>的<code>GetTraceCenter</code>方法</p> <p><strong>接口描述</strong>: 在Ctrl选中轮辐后,调用此方法可以获取轨迹的中心点坐标以及相关的位置信息。需要注意的是,如果轮辐不完整,计算得到的中心可能会发生偏移。</p> <p><strong>返回数据格式</strong>: <code>Dictionary&amp;lt;String, Object&amp;gt;</code></p> <pre><code class="language-json"> { &amp;quot;ResultFlag&amp;quot;: int, // 操作结果标志,1表示成功,非1表示出错 &amp;quot;ResultMsg&amp;quot;: String, // 操作结果信息或错误消息 &amp;quot;Data&amp;quot;: Dictionary&amp;lt;String, Object&amp;gt; // 包含轨迹中心信息的字典 { &amp;quot;CenterX&amp;quot;: double, // 轨迹中心的X坐标 &amp;quot;CenterY&amp;quot;: double, // 轨迹中心的Y坐标 &amp;quot;CenterZ&amp;quot;: double, // 轨迹中心的Z坐标 &amp;quot;WheelX&amp;quot;: double, // 轮辐所在位置的X坐标(可能是轮辐中心点或某个参考点) &amp;quot;WheelY&amp;quot;: double, // 轮辐所在位置的Y坐标 &amp;quot;WheelZ&amp;quot;: double, // 轮辐所在位置的Z坐标 &amp;quot;CenterXToWheel&amp;quot;: double, // 轨迹中心到轮辐位置的X方向距离 &amp;quot;CenterYToWheel&amp;quot;: double, // 轨迹中心到轮辐位置的Y方向距离 &amp;quot;CenterZToWheel&amp;quot;: double, // 轨迹中心到轮辐位置的Z方向距离 &amp;quot;Radius&amp;quot;: double // 轨迹中心到轮辐位置的半径(可能是直线距离或某种计算得出的半径) } }</code></pre> <p><strong>请求参数</strong>: 无</p> <p><strong>注意事项</strong>:</p> <ul> <li>在调用此接口之前,请确保已经通过Ctrl选中了要计算中心的轮辐,并且<code>OCCTProxy</code>实例已经正确初始化,DLL已经加载。</li> <li>如果轮辐不完整,计算的中心可能会发生偏移,请在使用时注意验证结果的准确性。</li> <li>如果在获取轨迹中心时发生错误,<code>ResultFlag</code> 将不为1,并且 <code>ResultMsg</code> 将包含错误信息,请根据这些信息进行排查和处理。</li> </ul>

页面列表

ITEM_HTML