<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Differenciate toolpath process as per XY &amp;amp; Z thickness. in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11092837#M6529</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try it like this this, i've contained each check in it's own brackets.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$type_thk = $tp.Thickness&lt;BR /&gt;$type_axial_thk = $tp.AxialThickness&lt;BR /&gt;if ($UseAxialThickness == '1') AND ($type_thk &amp;gt; 0.08) AND ($type_axial_thk &amp;lt; 0.06) {&lt;BR /&gt;$type = "REST"&lt;BR /&gt;} elseif ($UseAxialThickness == '1') AND ($type_thk &amp;lt; 0.01) AND ($type_axial_thk &amp;lt; 0.01) {&lt;BR /&gt;$type = "FINISH"&lt;BR /&gt;} elseif ($UseAxialThickness == '1') AND ($type_thk &amp;lt; 0.2) AND ($type_axial_thk &amp;lt; 0.0) {&lt;BR /&gt;$type = "FLOORING"&lt;BR /&gt;} elseif ($UseAxialThickness == '1') AND ($type_thk &amp;gt; 0.05) AND ($type_axial_thk &amp;gt; 0.05) {&lt;BR /&gt;$type = "SEMI"&lt;BR /&gt;} elseif ($UseAxialThickness == '0') AND ($type_thk &amp;gt; 0.1) {&lt;BR /&gt;$type = "ROUGH"&lt;BR /&gt;} elseif ($UseThickness == '0') AND ($type_thk &amp;lt; 0.1) {&lt;BR /&gt;$type = "RRR"&lt;/P&gt;</description>
    <pubDate>Fri, 08 Apr 2022 10:15:09 GMT</pubDate>
    <dc:creator>kevin.hammond3WX4X</dc:creator>
    <dc:date>2022-04-08T10:15:09Z</dc:date>
    <item>
      <title>Differenciate toolpath process as per XY &amp; Z thickness.</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11089520#M6526</link>
      <description>&lt;P&gt;Hi ! All,&lt;/P&gt;&lt;P&gt;I was working with a macro and I stuck at some place.&lt;/P&gt;&lt;P&gt;Thanks to who help me figuring out the issue..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My macro is intended to diffrenciate the toolpath as per (Radial and Axial thickness).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Macro I use is .......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;STRING $type = ' '
REAL $type_thk = 0
REAL $type_axial_thk = 0
REAL $type_radial_thk = 0


FOREACH tp IN FOLDER (active_folder()) {
ACTIVATE TOOLPATH $tp.name

$type_thk = $tp.Thickness
$type_axial_thk = $tp.AxialThickness
if ($UseAxialThickness == '1' AND $type_thk &amp;gt; 0.1 AND $type_axial_thk = 0) {
$type = "-Rest"
} elseif ($UseAxialThickness == '1' AND $type_thk &amp;lt; 0.0) {
$type = "-Finish"
} elseif ($UseAxialThickness == '1' AND $type_thk &amp;gt;= 0.1) {
$type = "-Bottom-face"
} elseif ($UseAxialThickness == '1' AND $type_thk &amp;lt; 0.06) {
$type = "-Semi"
} elseif ($UseAxialThickness == '1' AND $type_thk &amp;gt; 0.1) {
$type = "-Rough"
} elseif ($UseThickness == '0' AND $type_thk &amp;lt; 0.1) {
$type = "-RRR"

} else {
$type  = "-!!!_Process-Unknown"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="36.JPG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1051598i51B63C21EE2BA035/image-size/large?v=v2&amp;amp;px=999" role="button" title="36.JPG" alt="36.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 07:23:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11089520#M6526</guid>
      <dc:creator>karan30782</dc:creator>
      <dc:date>2022-04-07T07:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Differenciate toolpath process as per XY &amp; Z thickness.</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11089873#M6527</link>
      <description>&lt;P&gt;It looks like you forgot the double equals sign.&lt;/P&gt;&lt;P&gt;You have $type_axial_thk = 0.&amp;nbsp; &amp;nbsp; It should be&amp;nbsp;$type_axial_thk == 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When assigning a value use 1 =.&amp;nbsp; When comparing or checking a value, use 2 =.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 10:16:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11089873#M6527</guid>
      <dc:creator>cfastNJWK6</dc:creator>
      <dc:date>2022-04-07T10:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Differenciate toolpath process as per XY &amp; Z thickness.</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11092121#M6528</link>
      <description>&lt;P&gt;HI !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for replying.&lt;/P&gt;&lt;P&gt;No, It's not working like that.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My intention of using this macro is ..&lt;/P&gt;&lt;P&gt;When Radial thickness is &amp;gt;0.2 (AND) Axial thickness is &amp;gt;0.1 -- &lt;FONT color="#339966"&gt;&lt;STRONG&gt;ROUGH&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;When Radial thickness is &amp;gt;0.22 (AND) Axial thickness is =0.0 -- &lt;FONT color="#339966"&gt;&lt;STRONG&gt;FLOORING&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;When Radial thickness is &amp;lt;0.18 (AND) Axial thickness is &amp;gt;0.1 -- &lt;FONT color="#339966"&gt;&lt;STRONG&gt;REST&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;When Radial thickness is &amp;gt;0.1 (AND) Axial thickness is &amp;gt;0.1 -- &lt;FONT color="#339966"&gt;&lt;STRONG&gt;SEMI&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;When Radial thickness is &amp;gt;0.0 (AND) Axial thickness is &amp;gt;0.0 -- &lt;FONT color="#339966"&gt;&lt;STRONG&gt;FINISH&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;When Radial thickness is &amp;lt;0.0 (AND) Axial thickness is =0.0 -- &lt;FONT color="#339966"&gt;&lt;STRONG&gt;BEARING FIN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have tried several tricks without any success.&lt;/P&gt;&lt;P&gt;Code is attached.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 04:11:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11092121#M6528</guid>
      <dc:creator>karan30782</dc:creator>
      <dc:date>2022-04-08T04:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Differenciate toolpath process as per XY &amp; Z thickness.</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11092837#M6529</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try it like this this, i've contained each check in it's own brackets.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$type_thk = $tp.Thickness&lt;BR /&gt;$type_axial_thk = $tp.AxialThickness&lt;BR /&gt;if ($UseAxialThickness == '1') AND ($type_thk &amp;gt; 0.08) AND ($type_axial_thk &amp;lt; 0.06) {&lt;BR /&gt;$type = "REST"&lt;BR /&gt;} elseif ($UseAxialThickness == '1') AND ($type_thk &amp;lt; 0.01) AND ($type_axial_thk &amp;lt; 0.01) {&lt;BR /&gt;$type = "FINISH"&lt;BR /&gt;} elseif ($UseAxialThickness == '1') AND ($type_thk &amp;lt; 0.2) AND ($type_axial_thk &amp;lt; 0.0) {&lt;BR /&gt;$type = "FLOORING"&lt;BR /&gt;} elseif ($UseAxialThickness == '1') AND ($type_thk &amp;gt; 0.05) AND ($type_axial_thk &amp;gt; 0.05) {&lt;BR /&gt;$type = "SEMI"&lt;BR /&gt;} elseif ($UseAxialThickness == '0') AND ($type_thk &amp;gt; 0.1) {&lt;BR /&gt;$type = "ROUGH"&lt;BR /&gt;} elseif ($UseThickness == '0') AND ($type_thk &amp;lt; 0.1) {&lt;BR /&gt;$type = "RRR"&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 10:15:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11092837#M6529</guid>
      <dc:creator>kevin.hammond3WX4X</dc:creator>
      <dc:date>2022-04-08T10:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Differenciate toolpath process as per XY &amp; Z thickness.</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11092883#M6530</link>
      <description>&lt;P&gt;It appears to me that you need to add more conditional statements to assign the correct 'type'.&amp;nbsp; Currently, If you have a toolpath that uses 0.21 radial thickness and 0.11 axial thickness, it could be assigned both 'ROUGH' and 'FINISH' types with the logic in your post above.&amp;nbsp; I'm not sure how you actually want to assign the 'types', so I can't finish the logic for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Remember, you can check the same parameter multiple times in the same elseif line:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;elseif ($UseAxialThickness == '1' AND $type_thk &amp;lt;= 0.2 AND $type_thk &amp;gt;= 0 AND $type_axial_thk &amp;lt;= 0.0) {
$type = "FLOORING"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I prefer to use &amp;gt;= &amp;amp; &amp;lt;= for checking multiple conditions.&amp;nbsp; This prevents you from assigning the wrong value when the value you are checking equals the value you are checking against.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The most important thing when writing a macro with a long if/elseif chain, is to make sure you understand your conditions and to make sure it is not possible to assign two different values to the same condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 10:35:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/differenciate-toolpath-process-as-per-xy-amp-z-thickness/m-p/11092883#M6530</guid>
      <dc:creator>cfastNJWK6</dc:creator>
      <dc:date>2022-04-08T10:35:00Z</dc:date>
    </item>
  </channel>
</rss>

