OCCTProxy

occtProxy内核文件接口文档


GetPointsInfo

<p><strong>接口名称</strong>:GetPointsInfo</p> <p><strong>接口形式</strong>:DLL</p> <p><strong>请求方式</strong>:调用<code>WireWrapper</code>的<code>GetPointsInfo()</code>方法</p> <p><strong>接口描述</strong>:此接口无需传递参数,其主要功能是返回轨迹上的点位数据。</p> <p><strong>返回数据格式</strong>:<code>Dictionary&amp;lt;String, Object&amp;gt;</code></p> <ul> <li><strong>ResultFlag</strong> (int): 结果标志,用于指示操作是否成功。</li> <li><strong>ResultMsg</strong> (String): 结果消息,包含操作结果的详细描述或错误信息。</li> <li><strong>Data</strong> (Dictionary&lt;String, Object&gt;): 点位数据字典,其中每个键(&quot;pointN&quot;)对应一个点位的信息。 <ul> <li><strong>XCoord</strong>, <strong>YCoord</strong>, <strong>ZCoord</strong>, <strong>WCoord</strong>, <strong>PCoord</strong>, <strong>RCoord</strong> (double): 点位的坐标值。</li> <li><strong>RX</strong>, <strong>RY</strong>, <strong>RZ</strong> (double): 点位的旋转值。</li> <li><strong>feedCutDepth</strong> (double): 进给切割深度。</li> <li><strong>cutDepth</strong> (double): 切割深度。</li> </ul></li> </ul> <p><strong>请求参数</strong>:无</p> <p><strong>调用示例</strong>(伪代码): ```c# // 假设已经有一个WireWrapper实例wireWrapper,该实例包含轨迹信息 Dictionary&lt;String, Object&gt; pointsInfo = wireWrapper.GetPointsInfo(); // 检查返回结果 if ((int)pointsInfo[&quot;ResultFlag&quot;] == 1) { // 处理点位数据 Dictionary&lt;String, Object&gt; data = (Dictionary&lt;String, Object&gt;)pointsInfo[&quot;Data&quot;]; foreach (KeyValuePair&lt;String, Object&gt; pointEntry in data) { Dictionary&lt;String, double&gt; pointData = (Dictionary&lt;String, double&gt;)pointEntry.Value; double xCoord = pointData[&quot;XCoord&quot;]; double yCoord = pointData[&quot;YCoord&quot;]; } } else { // 处理错误情况 string errorMessage = (string)pointsInfo[&quot;ResultMsg&quot;]; Console.WriteLine(&quot;获取点位信息失败: &quot; + errorMessage); }</p> <pre><code> **注意事项**: * 确保在调用`GetPointsInfo()`方法之前,`WireWrapper`实例已经被正确初始化和填充了轨迹数据。 * 返回的`ResultFlag`用于判断操作是否成功,具体的值和意义可能需要根据DLL的实现来确定。通常情况下,1示成功,-1有错误或异常情况发生。 * 在实际应用中,需要处理可能出现的异常和错误情况,确保程序的健壮性。例如,检查返回结果中的`ResultFlag`和`ResultMsg`来确定操作是否成功以及如何处理失败情况。</code></pre>

页面列表

ITEM_HTML