<?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[V2 status and testing environments]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">being offline from jscad for a while, I want to explore V2 now, because you added 3D hull lately.<br />
I am slowly exploring V2 possibilities, sorry for any superfluous questions that result from that.</p>
<p dir="auto">Some time ago (about a year?) I used a V1 environment for my work flow.</p>
<p dir="auto">The environment used</p>
<ul>
<li>python design code that creates jscad files with scad like syntax</li>
<li>jscad viewer, to display colored and transparent objects while designing</li>
<li>cli to compile jscad into stl files to be used for 3D printing</li>
</ul>
<p dir="auto">The viewer could be started as</p>
<ul>
<li>desktop app</li>
<li>web browser with a static viewer html file</li>
<li>web server + web browser</li>
<li>stl output and stl viewer</li>
</ul>
<p dir="auto">The web server variant is kind of difficult to use in a scripted environment and stl doesn't provide colors and transparency, so I usually used the other two.</p>
<p dir="auto">I have some questions about the status of V2:</p>
<ul>
<li>which viewer interfaces are supposed to work?</li>
<li>which do you use yourself for testing new code?</li>
<li>the current viewer only works folder based? [EDIT: a single file works via drag and drop]</li>
</ul>
<p dir="auto">I already tried those and only got the web server to work, which doesn't fit well to my work flow (stateless). I guess it should still be possible to create a static viewer.html file (created on the fly by my scripts from a template) that can load and display a design. Any hint would be appreciated.</p>
<p dir="auto">My V1 viewer template was like this:</p>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;!--

== OpenJSCAD.org, Copyright (c) 2016-2017, Licensed under MIT License ==
   in conjunction with other libraries by various authors (see the individual files)

Purpose:
  This application provides an example of how to set Viewer options for BIG JSCAD designs
--&gt;
&lt;head&gt;
  &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"/&gt;
  &lt;title&gt;%FILE% - jscad v1 viewer&lt;/title&gt;
  &lt;link rel="stylesheet" href="%STYLE%" type="text/css"&gt;
&lt;/head&gt;

&lt;body&gt;
  &lt;script src="%FRAMEWORK%"&gt;&lt;/script&gt;
&lt;!-- setup display of the errors as required by OpenJSCAD.js --&gt;
  &lt;div class="jscad-container" style="width:100%;height:100%;border:none;padding:0;margin:0;" &gt;
    &lt;div id="header"&gt;
      &lt;div id="errordiv"&gt;ERROR: design could not be created or compiled&lt;/div&gt;&lt;pre&gt;%FILE%&lt;/pre&gt;
    &lt;/div&gt;

&lt;!-- setup display of the viewer, i.e. canvas --&gt;
    &lt;div oncontextmenu="return false;" id="viewerContext" design-url="%FILE%"&gt;&lt;/div&gt;

&lt;!-- setup display of the status, as required by OpenJSCAD.js --&gt;
&lt;!-- set display: block to display this --&gt;
    &lt;div id="tail" style="display: none;"&gt;
      &lt;div id="statusdiv"&gt;STATUS&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;

&lt;/html&gt;
</code></pre>
<p dir="auto">It was derived from the files used in the web server.<br />
What would be an equivalent for V2?</p>
<p dir="auto">I already tried viewer-minimal.html, viewer-options.html, which didn't show my jscad file (the included example doesn't show up neither),<br />
I also tried to adapt demo.html, but there is no obvious way to specify a file.</p>
<p dir="auto">note, I hadn't time to dive into source code, yet.</p>
]]></description><link>https://openjscad.nodebb.com/topic/133/v2-status-and-testing-environments</link><generator>RSS for Node</generator><lastBuildDate>Sun, 18 Oct 2026 00:09:53 GMT</lastBuildDate><atom:link href="https://openjscad.nodebb.com/topic/133.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 26 May 2020 12:56:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to V2 status and testing environments on Mon, 08 Jun 2020 02:11:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hg42" aria-label="Profile: hg42">@<bdi>hg42</bdi></a> you might be able to use the regl-renderer module directly. there's a couple of demo applications, which could be tweeked to reload a design.</p>
]]></description><link>https://openjscad.nodebb.com/post/246</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/246</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Mon, 08 Jun 2020 02:11:28 GMT</pubDate></item><item><title><![CDATA[Reply to V2 status and testing environments on Wed, 03 Jun 2020 02:01:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hg42" aria-label="Profile: hg42">@<bdi>hg42</bdi></a> your 'stateless' pipeline seems feasible using the desktop app, however that has not been ported over to V2 yet.</p>
<p dir="auto">and as you already understand, the current V2 demo.html is specialized for running as a single page application, with lots of special functionality. this is probably not going to work well in the pipeline, even after massive hacks.</p>
<p dir="auto">the core of V2 is pretty solid now, so i'm working on some of the remaining items in the <a href="https://github.com/jscad/OpenJSCAD.org/issues/419" rel="nofollow ugc">V2 check list</a>.</p>
<p dir="auto">one of those is a 'minimum' viewer for V2. if anyone has some ideas or requirements for this then now is the time for some feedback.</p>
]]></description><link>https://openjscad.nodebb.com/post/245</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/245</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Wed, 03 Jun 2020 02:01:47 GMT</pubDate></item><item><title><![CDATA[Reply to V2 status and testing environments on Wed, 03 Jun 2020 01:44:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hg42" aria-label="Profile: hg42">@<bdi>hg42</bdi></a> the bug fix for to/fromCompactBinary has been applied to the V2 branch, so this issue should be fixed now.</p>
]]></description><link>https://openjscad.nodebb.com/post/244</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/244</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Wed, 03 Jun 2020 01:44:23 GMT</pubDate></item><item><title><![CDATA[Reply to V2 status and testing environments on Thu, 28 May 2020 01:18:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hg42" aria-label="Profile: hg42">@<bdi>hg42</bdi></a> it's a bug in the to/fromCompactBinary functions. you already found the fix, which should be merged soon.</p>
]]></description><link>https://openjscad.nodebb.com/post/243</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/243</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Thu, 28 May 2020 01:18:29 GMT</pubDate></item><item><title><![CDATA[Reply to V2 status and testing environments on Wed, 27 May 2020 19:24:43 GMT]]></title><description><![CDATA[<p dir="auto">I switched between branches by checking it out and running<br />
<code>npm run clean ; npm install ; npm run bootstrap ; npm test</code><br />
and<br />
<code>npm run web</code></p>
<p dir="auto">Switching back to "V2" results in this (seems to be the same geometry, but less white faces):<br />
[EDIT: below is a sphere of radius 1, the white version was radius 5 and looks identical]</p>
<p dir="auto"><img src="/assets/uploads/files/1590606943703-670e34df-e620-4ae7-bc10-d604a0072c95-image.png" alt="0_1590606942959_670e34df-e620-4ae7-bc10-d604a0072c95-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">four stripes seem to be ok:<br />
<img src="/assets/uploads/files/1590607039382-0052637f-deee-4871-b58b-2acae2988ae4-image.png" alt="0_1590607038613_0052637f-deee-4871-b58b-2acae2988ae4-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://openjscad.nodebb.com/post/241</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/241</guid><dc:creator><![CDATA[hg42]]></dc:creator><pubDate>Wed, 27 May 2020 19:24:43 GMT</pubDate></item><item><title><![CDATA[Reply to V2 status and testing environments on Wed, 27 May 2020 18:07:21 GMT]]></title><description><![CDATA[<p dir="auto">well...another test on branch V2-fix-compact-binaries (at 0821a594) works...</p>
]]></description><link>https://openjscad.nodebb.com/post/240</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/240</guid><dc:creator><![CDATA[hg42]]></dc:creator><pubDate>Wed, 27 May 2020 18:07:21 GMT</pubDate></item><item><title><![CDATA[Reply to V2 status and testing environments on Wed, 27 May 2020 17:51:44 GMT]]></title><description><![CDATA[<p dir="auto">I am not sure if my environment is correct or if I am doing something weird.<br />
So I ask here first, I guess it's some work in progress.</p>
<p dir="auto">I started by following this guide:<br />
<a href="https://openjscad.org/dokuwiki/doku.php?id=early_v2" rel="nofollow ugc">https://openjscad.org/dokuwiki/doku.php?id=early_v2</a></p>
<p dir="auto">branch V2 is at 828394dd</p>
<p dir="auto"><code>npm test</code> results in <code>lerna success</code> for all modules (and I only see "test passed" and "known failures").</p>
<p dir="auto">I used <code>npm run web</code> as viewer (with drag and drop).</p>
<p dir="auto">However, my simple test file that worked at some time recently doesn't work now.</p>
<p dir="auto">Then I switched to branch "V2-enhance-webrequire" (at 32e74b5f) as it seems to have some fixes...just for a test...<br />
I now used<br />
packages/examples/testV2.js<br />
(hope that's an official file).</p>
<p dir="auto">The result is this:<br />
<img src="/assets/uploads/files/1590599371878-4c811884-0ce9-415a-a36c-9149fe885dbd-image-resized.png" alt="0_1590599369615_4c811884-0ce9-415a-a36c-9149fe885dbd-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">using this simple file (following the example in the "V2 Hull" post):</p>
<pre><code>const {primitives} = require('@jscad/modeling')

const main = () =&gt; {

  return [
    primitives.ellipsoid({radius: [5,5,5]})
  ]
}

module.exports = {main}
</code></pre>
<p dir="auto">I  got this:<br />
<img src="/assets/uploads/files/1590600047518-d8ad710a-0379-47b3-b734-20a01e24874d-image.png" alt="0_1590600045968_d8ad710a-0379-47b3-b734-20a01e24874d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">This branch has identical result to "V2".<br />
Also, both tests are identical in Firefox 76.0.1 or Chromium 80.0.3987.163 or Chrome 83.0.4103.61.</p>
<p dir="auto">I guess you don't have such results, so what could have gone wrong? any idea?</p>
]]></description><link>https://openjscad.nodebb.com/post/239</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/239</guid><dc:creator><![CDATA[hg42]]></dc:creator><pubDate>Wed, 27 May 2020 17:51:44 GMT</pubDate></item></channel></rss>