<?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: mapWorkOrigin =false - Pattern issue (HSMWorks) in HSM Post Processor Forum</title>
    <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111867#M18827</link>
    <description>&lt;P&gt;No, not sure what you are referring to, but a clue would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2017 18:19:08 GMT</pubDate>
    <dc:creator>mwhitten123</dc:creator>
    <dc:date>2017-05-26T18:19:08Z</dc:date>
    <item>
      <title>mapWorkOrigin =false - Pattern issue (HSMWorks)</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111826#M18825</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to post patterns using a Haas or Fanuc post with the map work origin set to false("mapWorkOrigin =false"). If I insert this line (mapWorkOrigin = false) into the top of the post as shown below, everything seems to work fine except that the patterns are output to the gcode in the same spot. In example, if I face off a part and then pattern it over 10", the gcode simply repeats the same exact values as the unpatterned toolpath.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dump file seems to be outputting the patterned values, but as indicated, the gcode does not. This would seem to be a post issue, but I am not sure as none of the stock posts I have tried will work with patterns when&amp;nbsp;&lt;SPAN&gt;mapWorkOrigin = false.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;.
.

allowSpiralMoves = true;
highFeedrate = (unit == IN) ? 500 : 5000;
mapWorkOrigin = false; &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;


// user-defined properties
properties = {
  writeMachine: true, // write machine
  writeTools: true, // writes the tools
.
.&lt;/PRE&gt;&lt;P&gt;I attached some very simple test files, I am using HSMWorks R1.41874 and the Haas.cps(ver 41433) for testing. I also tested in Inventor HSM and found the same results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;****test files attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have a clue if this is a post issue, user issue(me) or a software issue and a clue as to how to correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 17:53:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111826#M18825</guid>
      <dc:creator>mwhitten123</dc:creator>
      <dc:date>2017-05-26T17:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: mapWorkOrigin =false - Pattern issue (HSMWorks)</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111843#M18826</link>
      <description>Did you add your if ( properties.mapworkorigin statement ?</description>
      <pubDate>Fri, 26 May 2017 18:04:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111843#M18826</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-26T18:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: mapWorkOrigin =false - Pattern issue (HSMWorks)</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111867#M18827</link>
      <description>&lt;P&gt;No, not sure what you are referring to, but a clue would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 18:19:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111867#M18827</guid>
      <dc:creator>mwhitten123</dc:creator>
      <dc:date>2017-05-26T18:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: mapWorkOrigin =false - Pattern issue (HSMWorks)</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111910#M18828</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3207088"&gt;@mwhitten123&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to post patterns using a Haas or Fanuc post with the map work origin set to false("mapWorkOrigin =false"). If I insert this line (mapWorkOrigin = false) into the top of the post as shown below, everything seems to work fine except that the patterns are output to the gcode in the same spot. In example, if I face off a part and then pattern it over 10", the gcode simply repeats the same exact values as the unpatterned toolpath.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The dump file seems to be outputting the patterned values, but as indicated, the gcode does not. This would seem to be a post issue, but I am not sure as none of the stock posts I have tried will work with patterns when&amp;nbsp;&lt;SPAN&gt;mapWorkOrigin = false.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;.
.

allowSpiralMoves = true;
highFeedrate = (unit == IN) ? 500 : 5000;
mapWorkOrigin = false; &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;


// user-defined properties
properties = {
  writeMachine: true, // write machine
  writeTools: true, // writes the tools
.
.&lt;/PRE&gt;
&lt;P&gt;I attached some very simple test files, I am using HSMWorks R1.41874 and the Haas.cps(ver 41433) for testing. I also tested in Inventor HSM and found the same results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;****test files attached&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have a clue if this is a post issue, user issue(me) or a software issue and a clue as to how to correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hello Mike,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;SPAN&gt;"mapWorkOrigin =false" statement tells the post engine to not translate the operations based on the workOrigin of the operation. &amp;nbsp;Translated patterns use the workOrigin to inform the post where the pattern instance is located. &amp;nbsp;Since you disabled the automatic mapping of the workOrigin you will have to handle the translation yourself inside the post. &amp;nbsp;You can do this by using the following command.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;setTranslation(currentSection.workOrigin);&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;I don't know why you are not automatically mapping the work origin, but you will have to place a conditional around this statement so that it is not processed when the workOrigin is handled elsewhere in the post.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 18:43:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111910#M18828</guid>
      <dc:creator>bob.schultz</dc:creator>
      <dc:date>2017-05-26T18:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: mapWorkOrigin =false - Pattern issue (HSMWorks)</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111942#M18829</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://forums.autodesk.com/t5/hsm-post-processor-forum/tool-orientation-2-selected-points-no-difference/td-p/6102371" target="_blank"&gt;https://forums.autodesk.com/t5/hsm-post-processor-forum/tool-orientation-2-selected-points-no-difference/td-p/6102371&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 18:55:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111942#M18829</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-26T18:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: mapWorkOrigin =false - Pattern issue (HSMWorks)</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111960#M18830</link>
      <description>&lt;P&gt;Hello Bob,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;----------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't know why you are not automatically mapping the work origin, but you will have to place a conditional around this statement so that it is not processed when the workOrigin is handled elsewhere in the post.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;--------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It seems weird&amp;nbsp;to me that the "default" is to map the origin to the setup origin without warning the user; I have never seen a CAM system do this until now. Most/Many shops must have the origin set on the part. This is for a variety of reasons of course.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyhow, your help is much appreciated on this. It makes sense now, I just need to figure out how to add the logic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 19:06:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7111960#M18830</guid>
      <dc:creator>mwhitten123</dc:creator>
      <dc:date>2017-05-26T19:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: mapWorkOrigin =false - Pattern issue (HSMWorks)</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7371356#M18831</link>
      <description>&lt;P&gt;Hello Michael,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You asked that I supply the solution in the Forum after the MM problem was fixed and I seemed to have forgot, until this same issue came up again. &amp;nbsp;Here is a solution that solves this scenario.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, add the definedPatterns variable to the collected state section at the top of the program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;// collected state
var definedPatterns = new Array();&lt;/PRE&gt;
&lt;P&gt;Then add the 'offsetPattern' function above the 'onSection' function. &amp;nbsp;'offsetPattern' will translate the XYZ coordinates for the pattern instance translations when 'mapWorkOrigin = false'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;// performs work origin translation for patterns when mapWorkOrigin = false
function offsetPattern() {
  if (currentSection.isPatterned() &amp;amp;&amp;amp; !mapWorkOrigin) {
    var currentPattern = currentSection.getPatternId();
    var found = false;
    for (var i = 0; i &amp;lt; definedPatterns.length; ++i) {
      if (currentPattern == definedPatterns[i].patternId) {
        newOrigin = Vector.diff(currentSection.workOrigin, definedPatterns[i].baseOrigin);
        // writeln("Base Origin = " + definedPatterns[i].baseOrigin);
        // writeln("New Origin = " + newOrigin);
        setTranslation(newOrigin);
        found = true;
        break;
      }
    }
    if (!found) {
      definedPatterns.push({
        patternId: currentPattern,
        baseOrigin: currentSection.workOrigin
      });
      newOrigin = new Vector(0, 0, 0);
      setTranslation(newOrigin);
    }
  } else {
    newOrigin = new Vector(0, 0, 0);
    setTranslation(newOrigin);
  }
}&lt;/PRE&gt;
&lt;P&gt;and finally, add the call to 'offsetPattern' above the call to get the initial position in 'onSection'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;// adjust origin for patterns
  offsetPattern();

  var initialPosition = getFramePosition(currentSection.getInitialPosition());&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 21:13:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7371356#M18831</guid>
      <dc:creator>bob.schultz</dc:creator>
      <dc:date>2017-09-11T21:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: mapWorkOrigin =false - Pattern issue (HSMWorks)</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7371432#M18832</link>
      <description>&lt;P&gt;Hello Bob,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I very much appreciate the work on this one; this will help out several of our customers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will play will it later this week and post back on this thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 21:50:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7371432#M18832</guid>
      <dc:creator>mwhitten123</dc:creator>
      <dc:date>2017-09-11T21:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: mapWorkOrigin =false - Pattern issue (HSMWorks)</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7427023#M18833</link>
      <description>&lt;P&gt;Hello Bob,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, I got busy/sidetracked and am just now getting to this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I updated a post and have questions. Before I say anything, it may best if I make some simple samples and email them to you. I plan to get this done in the next few days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 02:00:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/7427023#M18833</guid>
      <dc:creator>mwhitten123</dc:creator>
      <dc:date>2017-10-03T02:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: mapWorkOrigin =false - Pattern issue (HSMWorks)</title>
      <link>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/9728121#M18834</link>
      <description>&lt;P&gt;Thanks for the help. Seems to work for my issues trying to use patterns.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 16:57:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/hsm-post-processor-forum/mapworkorigin-false-pattern-issue-hsmworks/m-p/9728121#M18834</guid>
      <dc:creator>CoastalMachine</dc:creator>
      <dc:date>2020-09-03T16:57:46Z</dc:date>
    </item>
  </channel>
</rss>

