<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nick-black.com/dankwiki/index.php?action=history&amp;feed=atom&amp;title=OpenSCAD</id>
	<title>OpenSCAD - revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nick-black.com/dankwiki/index.php?action=history&amp;feed=atom&amp;title=OpenSCAD"/>
	<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;action=history"/>
	<updated>2026-07-11T13:13:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11071&amp;oldid=prev</id>
		<title>Dank at 08:29, 2 October 2024</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11071&amp;oldid=prev"/>
		<updated>2024-10-02T08:29:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 08:29, 2 October 2024&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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&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;OpenSCAD is a declarative 3d modeling program. Objects are defined in terms of basic 2D and 3D shapes, and a set of operators is provided to manipulate these objects. It can generate STL files from the command line.&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;OpenSCAD is a declarative 3d modeling program. Objects are defined in terms of basic 2D and 3D shapes, and a set of operators is provided to manipulate these objects. It can generate STL files from the command line&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. Note that OpenSCAD approximates arcs with polygons, and emits meshes; it cannot emit e.g. true circles. As a result, there might be fewer G2/G3 arcs in the sliced gcode&lt;/ins&gt;.&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;==Basic shapes==&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;==Basic shapes==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:1.41:old-11070:rev-11071:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11070&amp;oldid=prev</id>
		<title>Dank at 08:22, 2 October 2024</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11070&amp;oldid=prev"/>
		<updated>2024-10-02T08:22:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 08:22, 2 October 2024&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-l15&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&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;Generally, in each project I&amp;#039;ll have a common file in which my base objects (and their geometry) are declared. Then I build up structures from these objects, relating them using the declared geometries. Be sure to declare the geometries of these structures as their own variables (composed from substructure properties). Then, for each print job, I have a file which &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;s this common file, and calls those &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt;s to be printed. There shouldn&amp;#039;t be any composition in these files, just any &amp;lt;tt&amp;gt;translate&amp;lt;/tt&amp;gt;s, &amp;lt;tt&amp;gt;rotate&amp;lt;/tt&amp;gt;s, and &amp;lt;tt&amp;gt;mirror&amp;lt;/tt&amp;gt;s necessary to distribute the objects optimally on a print tray. Ensure they&amp;#039;re distinct, so that slicing software can treat them as different objects (necessary for e.g. multimaterial printing). Finally, I have a file which assembles all the pieces together as they&amp;#039;re expected to be assembled, serving as a check on the objects; neither this file nor the common file are exported to STL.&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;Generally, in each project I&amp;#039;ll have a common file in which my base objects (and their geometry) are declared. Then I build up structures from these objects, relating them using the declared geometries. Be sure to declare the geometries of these structures as their own variables (composed from substructure properties). Then, for each print job, I have a file which &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;s this common file, and calls those &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt;s to be printed. There shouldn&amp;#039;t be any composition in these files, just any &amp;lt;tt&amp;gt;translate&amp;lt;/tt&amp;gt;s, &amp;lt;tt&amp;gt;rotate&amp;lt;/tt&amp;gt;s, and &amp;lt;tt&amp;gt;mirror&amp;lt;/tt&amp;gt;s necessary to distribute the objects optimally on a print tray. Ensure they&amp;#039;re distinct, so that slicing software can treat them as different objects (necessary for e.g. multimaterial printing). Finally, I have a file which assembles all the pieces together as they&amp;#039;re expected to be assembled, serving as a check on the objects; neither this file nor the common file are exported to STL.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[CATEGORY: 3D Printing]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11069&amp;oldid=prev</id>
		<title>Dank: /* use vs include */</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11069&amp;oldid=prev"/>
		<updated>2024-10-02T08:12:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;use vs include&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 08:12, 2 October 2024&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-l10&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&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;==&amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; vs &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;==&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;==&amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; vs &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;==&lt;/div&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;A SCAD file can include other SCAD files with either the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; keywords. &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; statements are replaced with the body of the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;d file (any &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;s or &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s within the file are expanded). &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; only lifts &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt;s and &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt;s, and only affects the current file (i.e. recursive &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s do not escape beyond the file that &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s them).&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;A SCAD file can include other SCAD files with either the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; keywords. &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; statements are replaced with the body of the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;d file (any &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;s or &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s within the file are expanded). &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; only lifts &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt;s and &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt;s, and only affects the current file (i.e. recursive &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s do not escape beyond the file that &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s them)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. These cannot be used within a &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt;&lt;/ins&gt;.&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;It&amp;#039;s useful to have a file draw its various modules, so that running it at the top level generates examples etc. Such a file can be imported with &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;, and these examples won&amp;#039;t be drawn. The downside is that any variables declared in a &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;d file are unavailable, so you might want to wrap them in &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; accessors.&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;It&amp;#039;s useful to have a file draw its various modules, so that running it at the top level generates examples etc. Such a file can be imported with &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;, and these examples won&amp;#039;t be drawn. The downside is that any variables declared in a &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;d file are unavailable, so you might want to wrap them in &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; accessors.&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;These cannot be used within &lt;/del&gt;a &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;or &lt;/del&gt;&amp;lt;tt&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;function&lt;/del&gt;&amp;lt;/tt&amp;gt;.&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Generally, in each project I&#039;ll have a common file in which my base objects (and their geometry) are declared. Then I build up structures from these objects, relating them using the declared geometries. Be sure to declare the geometries of these structures as their own variables (composed from substructure properties). Then, for each print job, I have &lt;/ins&gt;a &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;file which &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;s this common file, and calls those &lt;/ins&gt;&amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;s to be printed. There shouldn&#039;t be any composition in these files, just any &lt;/ins&gt;&amp;lt;tt&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;translate&lt;/ins&gt;&amp;lt;/tt&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;s, &amp;lt;tt&amp;gt;rotate&amp;lt;/tt&amp;gt;s, and &amp;lt;tt&amp;gt;mirror&amp;lt;/tt&amp;gt;s necessary to distribute the objects optimally on a print tray. Ensure they&#039;re distinct, so that slicing software can treat them as different objects (necessary for e.g. multimaterial printing). Finally, I have a file which assembles all the pieces together as they&#039;re expected to be assembled, serving as a check on the objects; neither this file nor the common file are exported to STL&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11068&amp;oldid=prev</id>
		<title>Dank: /* use vs include */</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11068&amp;oldid=prev"/>
		<updated>2024-10-02T08:02:43Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;use vs include&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 08:02, 2 October 2024&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-l12&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&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;A SCAD file can include other SCAD files with either the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; keywords. &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; statements are replaced with the body of the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;d file (any &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;s or &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s within the file are expanded). &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; only lifts &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt;s and &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt;s, and only affects the current file (i.e. recursive &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s do not escape beyond the file that &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s them).&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;A SCAD file can include other SCAD files with either the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; keywords. &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; statements are replaced with the body of the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;d file (any &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;s or &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s within the file are expanded). &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; only lifts &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt;s and &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt;s, and only affects the current file (i.e. recursive &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s do not escape beyond the file that &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s them).&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;It&#039;s useful to have a file draw its various modules, so that running it at the top level generates examples etc. Such a file can be imported with &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;, and these examples won&#039;t be drawn.&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;It&#039;s useful to have a file draw its various modules, so that running it at the top level generates examples etc. Such a file can be imported with &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;, and these examples won&#039;t be drawn&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. The downside is that any variables declared in a &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;d file are unavailable, so you might want to wrap them in &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt; accessors&lt;/ins&gt;.&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;These cannot be used within a &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt;.&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 cannot be used within a &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11067&amp;oldid=prev</id>
		<title>Dank: /* Basic shapes */</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11067&amp;oldid=prev"/>
		<updated>2024-10-02T07:39:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Basic shapes&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 07:39, 2 October 2024&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-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&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;==Basic shapes==&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;==Basic shapes==&lt;/div&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;* &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Square &lt;/del&gt;(rectangle), circle, polygon&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;* &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;tt&amp;gt;square&amp;lt;/tt&amp;gt; &lt;/ins&gt;(rectangle), &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;circle&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;polygon&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;&lt;/div&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;* &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Cube &lt;/del&gt;(rectangular prism), sphere, cylinder, polyhedron&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;* &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;tt&amp;gt;cube&amp;lt;/tt&amp;gt; &lt;/ins&gt;(rectangular prism), &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;sphere&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;cylinder&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;polyhedron&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;&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;&amp;lt;tt&amp;gt;circle&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;cylinder&amp;lt;/tt&amp;gt; are approximated using the &amp;lt;tt&amp;gt;fn&amp;lt;/tt&amp;gt; system variable. Low values of &amp;lt;tt&amp;gt;fn&amp;lt;/tt&amp;gt; can be used to generate regular polygons. A cylinder can have different radii at its top and bottom. A right pentagonal frustrum, for instance, can be generated with &amp;lt;tt&amp;gt;cylinder&amp;lt;/tt&amp;gt; using &amp;lt;tt&amp;gt;fn=5&amp;lt;/tt&amp;gt;.&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;&amp;lt;tt&amp;gt;circle&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;cylinder&amp;lt;/tt&amp;gt; are approximated using the &amp;lt;tt&amp;gt;fn&amp;lt;/tt&amp;gt; system variable. Low values of &amp;lt;tt&amp;gt;fn&amp;lt;/tt&amp;gt; can be used to generate regular polygons. A cylinder can have different radii at its top and bottom. A right pentagonal frustrum, for instance, can be generated with &amp;lt;tt&amp;gt;cylinder&amp;lt;/tt&amp;gt; using &amp;lt;tt&amp;gt;fn=5&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11066&amp;oldid=prev</id>
		<title>Dank at 07:39, 2 October 2024</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=11066&amp;oldid=prev"/>
		<updated>2024-10-02T07:39:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 07:39, 2 October 2024&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-l8&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&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;A 2D shape can be converted into a 3D one using &amp;lt;tt&amp;gt;linear_extrude&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;rotate_extrude()&amp;lt;/tt&amp;gt;.&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;A 2D shape can be converted into a 3D one using &amp;lt;tt&amp;gt;linear_extrude&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;rotate_extrude()&amp;lt;/tt&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==&amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; vs &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A SCAD file can include other SCAD files with either the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; keywords. &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; statements are replaced with the body of the &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;d file (any &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt;s or &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s within the file are expanded). &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt; only lifts &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt;s and &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt;s, and only affects the current file (i.e. recursive &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s do not escape beyond the file that &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;s them).&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;It&#039;s useful to have a file draw its various modules, so that running it at the top level generates examples etc. Such a file can be imported with &amp;lt;tt&amp;gt;use&amp;lt;/tt&amp;gt;, and these examples won&#039;t be drawn.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;These cannot be used within a &amp;lt;tt&amp;gt;module&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;function&amp;lt;/tt&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=10944&amp;oldid=prev</id>
		<title>Dank: Created page with &quot;OpenSCAD is a declarative 3d modeling program. Objects are defined in terms of basic 2D and 3D shapes, and a set of operators is provided to manipulate these objects. It can generate STL files from the command line.  ==Basic shapes== * Square (rectangle), circle, polygon * Cube (rectangular prism), sphere, cylinder, polyhedron  &lt;tt&gt;circle&lt;/tt&gt; and &lt;tt&gt;cylinder&lt;/tt&gt; are approximated using the &lt;tt&gt;fn&lt;/tt&gt; system variable. Low values of &lt;tt&gt;fn&lt;/tt&gt; can be used to generate r...&quot;</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=OpenSCAD&amp;diff=10944&amp;oldid=prev"/>
		<updated>2024-09-29T05:25:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;OpenSCAD is a declarative 3d modeling program. Objects are defined in terms of basic 2D and 3D shapes, and a set of operators is provided to manipulate these objects. It can generate STL files from the command line.  ==Basic shapes== * Square (rectangle), circle, polygon * Cube (rectangular prism), sphere, cylinder, polyhedron  &amp;lt;tt&amp;gt;circle&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;cylinder&amp;lt;/tt&amp;gt; are approximated using the &amp;lt;tt&amp;gt;fn&amp;lt;/tt&amp;gt; system variable. Low values of &amp;lt;tt&amp;gt;fn&amp;lt;/tt&amp;gt; can be used to generate r...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;OpenSCAD is a declarative 3d modeling program. Objects are defined in terms of basic 2D and 3D shapes, and a set of operators is provided to manipulate these objects. It can generate STL files from the command line.&lt;br /&gt;
&lt;br /&gt;
==Basic shapes==&lt;br /&gt;
* Square (rectangle), circle, polygon&lt;br /&gt;
* Cube (rectangular prism), sphere, cylinder, polyhedron&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;circle&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;cylinder&amp;lt;/tt&amp;gt; are approximated using the &amp;lt;tt&amp;gt;fn&amp;lt;/tt&amp;gt; system variable. Low values of &amp;lt;tt&amp;gt;fn&amp;lt;/tt&amp;gt; can be used to generate regular polygons. A cylinder can have different radii at its top and bottom. A right pentagonal frustrum, for instance, can be generated with &amp;lt;tt&amp;gt;cylinder&amp;lt;/tt&amp;gt; using &amp;lt;tt&amp;gt;fn=5&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A 2D shape can be converted into a 3D one using &amp;lt;tt&amp;gt;linear_extrude&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;rotate_extrude()&amp;lt;/tt&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
</feed>