<?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: Post processor help: How to get WCS origin's X, Y and Z values in Fusion Manufacture</title>
    <link>https://forums.autodesk.com/t5/fusion-manufacture/post-processor-help-how-to-get-wcs-origin-s-x-y-and-z-values/m-p/11728126#M133889</link>
    <description>&lt;P&gt;Is it ALWAYS that same exact line of code?&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 17:48:33 GMT</pubDate>
    <dc:creator>seth.madore</dc:creator>
    <dc:date>2023-02-03T17:48:33Z</dc:date>
    <item>
      <title>Post processor help: How to get WCS origin's X, Y and Z values</title>
      <link>https://forums.autodesk.com/t5/fusion-manufacture/post-processor-help-how-to-get-wcs-origin-s-x-y-and-z-values/m-p/11728117#M133886</link>
      <description>&lt;P&gt;Hi everyone!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having a little bit of trouble getting my post processor to write a simple line of code like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;G10 L2 P1 X0. Y0. Z-381.926 (G54 WCS)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;That line, on a Fanuc control will set the G54 WCS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the part I'm working right now, the WCS origin on my setup is set at &lt;STRONG&gt;(X=0, Y=0, Z=-381.926)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I dump the information I can get this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;currentSection.fcsOrigin=(1.7859e-13, 1.10939e-13, 381.926)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which are the X, Y and Z values that I'm looking for, well sort of.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have three problems:&lt;/P&gt;&lt;P&gt;&amp;nbsp;1. I don't know how to access the individual values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;2. Even though my WCS origin is at &lt;STRONG&gt;X=0&lt;/STRONG&gt; and &lt;STRONG&gt;Y=0&lt;/STRONG&gt;, I get a scientific notation of a number that's very close to zero but not exactly zero (&lt;STRONG&gt;X= 1.7859e-13, Y= 1.10939e-13&lt;/STRONG&gt;).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;3. I always get the values inverted. What I mean is that they are presented as if they are multiplied by -1. Why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on how to get my post to write this line of code?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;G10 L2 P1 X0. Y0. Z-381.926&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;G10 L2 P1 will always be the same, but the X, Y and Z coordinates will change whenever I change the WCS origin.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Isami&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 19:12:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manufacture/post-processor-help-how-to-get-wcs-origin-s-x-y-and-z-values/m-p/11728117#M133886</guid>
      <dc:creator>isamiBDSPX</dc:creator>
      <dc:date>2023-02-03T19:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Post processor help: How to get WCS origin's X, Y and Z values</title>
      <link>https://forums.autodesk.com/t5/fusion-manufacture/post-processor-help-how-to-get-wcs-origin-s-x-y-and-z-values/m-p/11728126#M133889</link>
      <description>&lt;P&gt;Is it ALWAYS that same exact line of code?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 17:48:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manufacture/post-processor-help-how-to-get-wcs-origin-s-x-y-and-z-values/m-p/11728126#M133889</guid>
      <dc:creator>seth.madore</dc:creator>
      <dc:date>2023-02-03T17:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Post processor help: How to get WCS origin's X, Y and Z values</title>
      <link>https://forums.autodesk.com/t5/fusion-manufacture/post-processor-help-how-to-get-wcs-origin-s-x-y-and-z-values/m-p/11728138#M133890</link>
      <description>G10L2P1 is always the same&lt;BR /&gt;but the X,Y and Z values depend on where I've established my WCS origin which changes on every part.</description>
      <pubDate>Fri, 03 Feb 2023 17:54:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manufacture/post-processor-help-how-to-get-wcs-origin-s-x-y-and-z-values/m-p/11728138#M133890</guid>
      <dc:creator>isamiBDSPX</dc:creator>
      <dc:date>2023-02-03T17:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Post processor help: How to get WCS origin's X, Y and Z values</title>
      <link>https://forums.autodesk.com/t5/fusion-manufacture/post-processor-help-how-to-get-wcs-origin-s-x-y-and-z-values/m-p/11729964#M133939</link>
      <description>&lt;P&gt;I've found the solution. Once I've discovered the WCS is stored in a &lt;STRONG&gt;Vector Object&lt;/STRONG&gt; everything was very straight forward.&lt;/P&gt;&lt;P&gt;This is the code I needed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  var setupWCSorigin = getSection(0).fcsOrigin.negated;
  var setupWCS = getSection(0).workOffset;
  gAbsIncModal.reset();
  writeBlock(
    gAbsIncModal.format(90),
    gFormat.format(10),
    "L2P" + (1 + setupWCS),
    "X"+xyzFormat.format(setupWCSorigin.x),
    "Y"+xyzFormat.format(setupWCSorigin.y),
    "Z"+xyzFormat.format(setupWCSorigin.z),
    formatComment("G" + (54 + setupWCS) + " WCS")
  );
  writeBlock(gFormat.format(11));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The vector object logically has the &lt;STRONG&gt;x, y and z attributes&lt;/STRONG&gt;, &lt;EM&gt;problem 1 solved&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;xyzFormat&lt;/STRONG&gt; takes care of the scientific notation, &lt;EM&gt;problem 2 solved&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;The vector object also has the &lt;STRONG&gt;negated&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;attribute&lt;/STRONG&gt;&amp;nbsp;which, as its name implies, gives you the negated vector, &lt;EM&gt;problem 3 solved&lt;/EM&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With that code, on a FANUC control, I can have the program update automatically the WCS.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;G90 G10 L2 P2 X56. Y-284. Z-395.926 (G55 WCS)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will update the G55 WCS to those coordinates which is the origin of my Setup. You can update other WCS changing the P value. (P1 = G54, P2 = G55, P3 = G56, P4 = G57, P5 = G58, P6 = G59)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found this very useful to have a relatively accurate position of the WCS before probing the part to have the exact location of the WCS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this can help others!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Isami&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 16:56:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manufacture/post-processor-help-how-to-get-wcs-origin-s-x-y-and-z-values/m-p/11729964#M133939</guid>
      <dc:creator>isamiBDSPX</dc:creator>
      <dc:date>2023-02-04T16:56:38Z</dc:date>
    </item>
  </channel>
</rss>

