<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://macros.gibbscam.com/index.php?action=history&amp;feed=atom&amp;title=Intermediate_Tooling%3AIT_Fixture_Callbacks</id>
	<title>Intermediate Tooling:IT Fixture Callbacks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://macros.gibbscam.com/index.php?action=history&amp;feed=atom&amp;title=Intermediate_Tooling%3AIT_Fixture_Callbacks"/>
	<link rel="alternate" type="text/html" href="https://macros.gibbscam.com/index.php?title=Intermediate_Tooling:IT_Fixture_Callbacks&amp;action=history"/>
	<updated>2026-12-05T11:01:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://macros.gibbscam.com/index.php?title=Intermediate_Tooling:IT_Fixture_Callbacks&amp;diff=7598&amp;oldid=prev</id>
		<title>JeremyStewart: /* Inputs (set by the engine, read by the macro) */</title>
		<link rel="alternate" type="text/html" href="https://macros.gibbscam.com/index.php?title=Intermediate_Tooling:IT_Fixture_Callbacks&amp;diff=7598&amp;oldid=prev"/>
		<updated>2026-04-16T19:10:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Inputs (set by the engine, read by the macro)&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:10, 16 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;These variables are the interface between GibbsCAM and a fixture macro. The macro must reside in the same folder as the fixture and have the same  name except with the .MAC extension. The macro is called once &amp;#039;&amp;#039;&amp;#039;per solid&amp;#039;&amp;#039;&amp;#039; in the fixture. GibbsCAM sets inputs before the macro runs; the macro writes outputs before it exits.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;These variables are the interface between GibbsCAM and a fixture macro. The macro must reside in the same folder as the fixture and have the same  name except with the .MAC extension. The macro is called once &amp;#039;&amp;#039;&amp;#039;per solid&amp;#039;&amp;#039;&amp;#039; in the fixture. GibbsCAM sets inputs before the macro runs; the macro writes outputs before it exits.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Inputs (set by &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the engine&lt;/del&gt;, read by the macro) ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Inputs (set by &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;GibbsCAM&lt;/ins&gt;, read by the macro) ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| class=&amp;quot;wikitable&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JeremyStewart</name></author>
	</entry>
	<entry>
		<id>https://macros.gibbscam.com/index.php?title=Intermediate_Tooling:IT_Fixture_Callbacks&amp;diff=7597&amp;oldid=prev</id>
		<title>JeremyStewart: Created page with &quot;== INT_TOOL Variables — Intermediate Tooling Fixture Callback ==  These variables are the interface between GibbsCAM and a fixture macro. The macro must reside in the same folder as the fixture and have the same  name except with the .MAC extension. The macro is called once &#039;&#039;&#039;per solid&#039;&#039;&#039; in the fixture. GibbsCAM sets inputs before the macro runs; the macro writes outputs before it exits.  === Inputs (set by the engine, read by the macro) ===  {| class=&quot;wikitable&quot; ! V...&quot;</title>
		<link rel="alternate" type="text/html" href="https://macros.gibbscam.com/index.php?title=Intermediate_Tooling:IT_Fixture_Callbacks&amp;diff=7597&amp;oldid=prev"/>
		<updated>2026-04-16T17:44:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== INT_TOOL Variables — Intermediate Tooling Fixture Callback ==  These variables are the interface between GibbsCAM and a fixture macro. The macro must reside in the same folder as the fixture and have the same  name except with the .MAC extension. The macro is called once &amp;#039;&amp;#039;&amp;#039;per solid&amp;#039;&amp;#039;&amp;#039; in the fixture. GibbsCAM sets inputs before the macro runs; the macro writes outputs before it exits.  === Inputs (set by the engine, read by the macro) ===  {| class=&amp;quot;wikitable&amp;quot; ! V...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== INT_TOOL Variables — Intermediate Tooling Fixture Callback ==&lt;br /&gt;
&lt;br /&gt;
These variables are the interface between GibbsCAM and a fixture macro. The macro must reside in the same folder as the fixture and have the same  name except with the .MAC extension. The macro is called once &amp;#039;&amp;#039;&amp;#039;per solid&amp;#039;&amp;#039;&amp;#039; in the fixture. GibbsCAM sets inputs before the macro runs; the macro writes outputs before it exits.&lt;br /&gt;
&lt;br /&gt;
=== Inputs (set by the engine, read by the macro) ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;INT_TOOL_NODE_NAME$&amp;lt;/code&amp;gt; || string || The name of the node (component/assembly node) this fixture belongs to&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;INT_TOOL_FIXTURE_NAME$&amp;lt;/code&amp;gt; || string || The name of the fixture item&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;INT_TOOL_FIXTURE_TYPE$&amp;lt;/code&amp;gt; || string || The type/category string of the fixture&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;INT_TOOL_SOLID_NUM&amp;lt;/code&amp;gt; || int || Which solid is currently being processed (1-based). The macro is invoked once per solid; use this to distinguish the first solid from subsequent ones&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;INT_TOOL_RETURNCODE&amp;lt;/code&amp;gt; || int || Pre-initialized to &amp;lt;code&amp;gt;999&amp;lt;/code&amp;gt; by the system before the macro runs (acts as a sentinel — if the macro does not set it, the system knows something went wrong)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Outputs (set by the macro, read back by GibbsCAM) ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Variable !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;INT_TOOL_NUM_COPIES&amp;lt;/code&amp;gt; || int || How many copies/instances of this solid to place. Set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; to skip the solid, &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; to explicitly exclude it, max &amp;lt;code&amp;gt;99&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;INT_TOOL_MATRIX&amp;lt;/code&amp;gt; || double array || Packed array of 4×3 transformation matrices (12 doubles each). Must be sized &amp;lt;code&amp;gt;INT_TOOL_NUM_COPIES * 12&amp;lt;/code&amp;gt;. Each block of 12 doubles is the transform for one copy. Can be declared &amp;lt;code&amp;gt;local&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;global&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;INT_TOOL_RETURNCODE&amp;lt;/code&amp;gt; || int || Set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; on success. Any non-zero value signals an error back to the engine&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== How the macro is structured ===&lt;br /&gt;
&lt;br /&gt;
The typical example is:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
degrees&lt;br /&gt;
&lt;br /&gt;
NodeName$    = INT_TOOL_NODE_NAME$       &amp;#039; read inputs&lt;br /&gt;
FixtureName$ = INT_TOOL_FIXTURE_NAME$&lt;br /&gt;
FixtureType$ = INT_TOOL_FIXTURE_TYPE$&lt;br /&gt;
iSolidNum    = INT_TOOL_SOLID_NUM&lt;br /&gt;
&lt;br /&gt;
&amp;#039; Handle solid #1 specially — it is typically the &amp;quot;base&amp;quot; solid&lt;br /&gt;
&amp;#039; placed at the identity (no transform)&lt;br /&gt;
if iSolidNum = 1 then global INT_TOOL_MATRIX(12)&lt;br /&gt;
if iSolidNum = 1 then get_identity_matrix INT_TOOL_MATRIX&lt;br /&gt;
if iSolidNum = 1 then goto done&lt;br /&gt;
&lt;br /&gt;
&amp;#039; For subsequent solids, compute N copies and fill the matrix array&lt;br /&gt;
global INT_TOOL_MATRIX(36)               &amp;#039; 3 copies × 12 = 36&lt;br /&gt;
...build mat1, mat2, mat3...&lt;br /&gt;
INT_TOOL_MATRIX(i)    = mat1(i)&lt;br /&gt;
INT_TOOL_MATRIX(i+12) = mat2(i)&lt;br /&gt;
INT_TOOL_MATRIX(i+24) = mat3(i)&lt;br /&gt;
iNumCopies = 3&lt;br /&gt;
&lt;br /&gt;
:done&lt;br /&gt;
INT_TOOL_NUM_COPIES = iNumCopies         &amp;#039; write outputs&lt;br /&gt;
INT_TOOL_RETURNCODE = 0&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Key rules ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;INT_TOOL_MATRIX&amp;lt;/code&amp;gt; must be declared (&amp;lt;code&amp;gt;local&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;global&amp;lt;/code&amp;gt;) before the engine reads it back — undeclared or wrong-sized arrays produce error codes &amp;lt;code&amp;gt;-31&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;-32&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;-33&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The array size must be &amp;#039;&amp;#039;&amp;#039;exactly&amp;#039;&amp;#039;&amp;#039; &amp;lt;code&amp;gt;INT_TOOL_NUM_COPIES * 12&amp;lt;/code&amp;gt; or larger.&lt;br /&gt;
* &amp;lt;code&amp;gt;INT_TOOL_RETURNCODE&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; be set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for the system to accept the outputs. Leaving it at its initial value of &amp;lt;code&amp;gt;999&amp;lt;/code&amp;gt; (or any non-zero value) signals failure.&lt;/div&gt;</summary>
		<author><name>JeremyStewart</name></author>
	</entry>
</feed>