<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Empty object]]></title><description><![CDATA[<p dir="auto">What is the canonical way to create an empty OpenJSCAD object?<br />
I have some code where I need to union() several objects, but each of them is optional.<br />
I would like to write something like:</p>
<pre><code>o = empty_object()
if (cond1) {
  o = union(o, ...)
}
if (cond2) {
  o = union(o, ...)
}
if (cond3) {
  o = union(o, ...)
}
</code></pre>
<p dir="auto">I can probably do something like:</p>
<pre><code>o = intersect(cube(), translate([0, 0, 100], cube()))
</code></pre>
<p dir="auto">But I would rather have something more descriptive.</p>
]]></description><link>https://openjscad.nodebb.com/topic/347/empty-object</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 21:11:38 GMT</lastBuildDate><atom:link href="https://openjscad.nodebb.com/topic/347.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Mar 2022 05:45:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Empty object on Mon, 07 Mar 2022 12:57:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/udif" aria-label="Profile: udif">@<bdi>udif</bdi></a> great question!</p>
<p dir="auto">There are three main objects; geom3, geom2, and path2. You can create empty versions of these…</p>
<pre><code>const a = geom3.create()
const b = geom2.create()
const c = path2.create()
</code></pre>
]]></description><link>https://openjscad.nodebb.com/post/1134</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1134</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Mon, 07 Mar 2022 12:57:59 GMT</pubDate></item></channel></rss>