OCCTProxy

occtProxy内核文件接口文档


GetWireInfo

<p><strong>接口名称</strong>:GetWireInfo</p> <p><strong>接口形式</strong>:DLL</p> <p><strong>请求方式</strong>:通过<code>WireWrapper</code>实例调用<code>GetWireInfo()</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):操作结果标志,其中1表示成功,0或其他值表示失败。</li> <li><strong>ResultMsg</strong> (String):操作结果的详细描述或错误信息。</li> <li><strong>Data</strong> (Dictionary&lt;String, Object&gt;):包含轨迹属性信息的字典。</li> </ul> <p><strong>轨迹属性说明</strong>:</p> <ul> <li><strong>StraightLinePointDensity</strong> (double):直线段的点位密度。</li> <li><strong>ArcLinePointDensity</strong> (double):圆弧段的点位密度。</li> <li><strong>SharpLinePointDensity</strong> (double):尖角段的点位密度。</li> <li><strong>VerticalLinePointDensity</strong> (double):垂直段的点位密度。</li> <li><strong>StraightStdDipAngle</strong> (double):直线段的标准倾斜角度。</li> <li><strong>StraightStdDipAngleY</strong> (double):直线段标准倾斜角度在Y轴的分量。</li> <li><strong>StraightStdDipAngleZ</strong> (double):直线段标准倾斜角度在Z轴的分量。</li> <li><strong>ArcStdDipAngle</strong> (double):圆弧段的标准倾斜角度。</li> <li><strong>ArcStdDipAngleY</strong> (double):圆弧段标准倾斜角度在Y轴的分量。</li> <li><strong>ArcStdDipAngleZ</strong> (double):圆弧段标准倾斜角度在Z轴的分量。</li> <li><strong>SharpStdDipAngle</strong> (double):尖角段的标准倾斜角度。</li> <li><strong>SharpStdDipAngleY</strong> (double):尖角段标准倾斜角度在Y轴的分量。</li> <li><strong>SharpStdDipAngleZ</strong> (double):尖角段标准倾斜角度在Z轴的分量。</li> <li><strong>VerticalStdDipAngle</strong> (double):垂直段的标准倾斜角度。</li> <li><strong>VerticalStdDipAngleY</strong> (double):垂直段标准倾斜角度在Y轴的分量。</li> <li><strong>VerticalStdDipAngleZ</strong> (double):垂直段标准倾斜角度在Z轴的分量。</li> <li><strong>FeedCutDepth</strong> (double):进给切割深度。</li> <li><strong>ToolSpinEnabled</strong> (bool):工具旋转是否启用。</li> <li><strong>WireCenterX</strong> (double):轨迹中心点的X坐标。</li> <li><strong>WireCenterY</strong> (double):轨迹中心点的Y坐标。</li> <li><strong>WireCenterZ</strong> (double):轨迹中心点的Z坐标。</li> <li><strong>ChangeCL</strong> (bool):修改轨迹时是否修改起始点和远离点。</li> <li><strong>WubWires</strong> (int):子轨迹个数。</li> <li><strong>WireLength</strong> (double):轨迹的总长度。</li> <li><strong>StraightCutDepth</strong> (double):直线段的切割深度。</li> <li><strong>ArcCutDepth</strong> (double):圆弧段的切割深度。</li> <li><strong>SharpCutDepth</strong> (double):尖角段的切割深度。</li> <li><strong>VerticalCutDepth</strong> (double):垂直段的切割深度。</li> <li><strong>ToolStraightMoveSpeed</strong> (int):工具在直线段的移动速度。</li> <li><strong>ToolArcMoveSpeed</strong> (int):工具在圆弧段的移动速度。</li> <li><strong>ToolSharpMoveSpeed</strong> (int):工具在尖角段的移动速度。</li> <li><strong>ToolVerticalMoveSpeed</strong> (int):工具在垂直段的移动速度。</li> <li><strong>MaxAnglePerMM</strong> (double):每毫米的最大角度变化。</li> </ul> <p><strong>请求参数</strong>:无</p> <p><strong>调用示例</strong>(伪代码): ```c# // 假设已经有一个WireWrapper实例wireWrapper,该实例包含轨迹信息 try { // 调用GetWireInfo方法获取轨迹属性信息 Dictionary&lt;String, Object&gt; result = wireWrapper.GetWireInfo(); // 检查操作结果 if ((int)result[&quot;ResultFlag&quot;] == 1) { // 提取轨迹属性信息 Dictionary&lt;String, Object&gt; wireData = (Dictionary&lt;String, Object&gt;)result[&quot;Data&quot;]; // 使用轨迹属性信息... double straightLinePointDensity = (double)wireData[&quot;StraightLinePointDensity&quot;]; bool toolSpinEnabled = (bool)wireData[&quot;ToolSpinEnabled&quot;]; // ...其他属性 Console.WriteLine(&quot;直线段的点位密度:{0}&quot;, straightLinePointDensity); Console.WriteLine(&quot;工具旋转是否启用:{0}&quot;, toolSpinEnabled); } else { // 处理获取轨迹属性信息失败的情况 string errorMessage = (string)result[&quot;ResultMsg&quot;]; Console.WriteLine(&quot;获取轨迹属性信息失败:{0}&quot;, errorMessage); } } catch (Exception ex) { // 异常处理 Console.WriteLine(&quot;调用GetWireInfo方法时发生异常:{0}&quot;, ex.Message); }</p> <pre><code> **注意**: - `ToolSpinEnabled` 属性在返回的数据格式中重复了两次,这可能是个错误,实际使用中可能需要根据具体实现来确定使用哪一个或两者是否需要合并。 - 在调用`GetWireInfo`方法时,应确保`WireWrapper`实例已经被正确初始化并包含有效的轨迹信息。 - 具体参数多少参照方法实际返回的内容,此功能可能在不断添加或修改返回的数据</code></pre>

页面列表

ITEM_HTML