<?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: Toolpath's_1st Segment_Z Value in PowerMill Forum</title>
    <link>https://forums.autodesk.com/t5/powermill-forum/toolpath-s-1st-segment-z-value/m-p/10735528#M7490</link>
    <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm trying to write an expression in order to have a quick observation of the toolpath's information....&lt;/P&gt;</description>
    <pubDate>Thu, 04 Nov 2021 13:38:58 GMT</pubDate>
    <dc:creator>kmarkopouliotis</dc:creator>
    <dc:date>2021-11-04T13:38:58Z</dc:date>
    <item>
      <title>Toolpath's_1st Segment_Z Value</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/toolpath-s-1st-segment-z-value/m-p/10735120#M7488</link>
      <description>&lt;P&gt;Hi does anyone have an idea on how to get "Toolpath's_1st Segment_Z Value" ???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 11:03:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/toolpath-s-1st-segment-z-value/m-p/10735120#M7488</guid>
      <dc:creator>kmarkopouliotis</dc:creator>
      <dc:date>2021-11-04T11:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Toolpath's_1st Segment_Z Value</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/toolpath-s-1st-segment-z-value/m-p/10735423#M7489</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4109666"&gt;@kmarkopouliotis&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;One way you can do it is via the function segment_get_point()&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;// Get details of the first point of the first segment
entity tp = entity('toolpath', 'mytp')
int segment_id = 0
int point_id = 0
object ptdata = segment_get_point(tp, segment_id, point_id)

// Round the z coord to 2 decimal places, to match the output in the 
// Reorder form. ptdata is a map, one of whose elements is an array
// with the xyz of the point.
real z_coord = ptdata['position'][2]
real rounded_z = round(z_coord, 2)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another way is to obtain values directly from the form:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;// Get the string in the first row and second column of the
// Toolpath Reorder form, which should be raised before values
// are obtained (the indices start from zero).
FORM TPLIST
string entry = list_cell_value('TPList.TPListView', 0, 1)

// This returns a string in the form "10, 20, 30". So, split the
// string.
string delim = ','
string list coords = tokens(entry, delim)

// This gives a list, whose 3rd element is the z-coord
real zval = coords[2]
print par $zval&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 12:59:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/toolpath-s-1st-segment-z-value/m-p/10735423#M7489</guid>
      <dc:creator>lokesh.kalia</dc:creator>
      <dc:date>2021-11-04T12:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Toolpath's_1st Segment_Z Value</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/toolpath-s-1st-segment-z-value/m-p/10735528#M7490</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm trying to write an expression in order to have a quick observation of the toolpath's information....&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2021 13:38:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/toolpath-s-1st-segment-z-value/m-p/10735528#M7490</guid>
      <dc:creator>kmarkopouliotis</dc:creator>
      <dc:date>2021-11-04T13:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Toolpath's_1st Segment_Z Value</title>
      <link>https://forums.autodesk.com/t5/powermill-forum/toolpath-s-1st-segment-z-value/m-p/10744363#M7491</link>
      <description>&lt;P&gt;In case you haven't considered it already, could you wrap either of those methods in a function and arrange to call that, e.g. something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;FUNCTION first_segment_z(ENTITY tp, OUTPUT REAL zcoord)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 07:00:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/powermill-forum/toolpath-s-1st-segment-z-value/m-p/10744363#M7491</guid>
      <dc:creator>lokesh.kalia</dc:creator>
      <dc:date>2021-11-09T07:00:54Z</dc:date>
    </item>
  </channel>
</rss>

