<?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[How to generate JSCAD model in browser JS and display like demo.html?]]></title><description><![CDATA[<p dir="auto">Creating JSCAD model with functionality inside works pretty well with NodeJS:<br />
<a href="https://forums.raspberrypi.com/viewtopic.php?p=2030878#p2030878" rel="nofollow ugc">https://forums.raspberrypi.com/viewtopic.php?p=2030878#p2030878</a></p>
<p dir="auto"><a href="https://www.openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD.C60_vtype_b.js" rel="nofollow ugc">https://www.openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD.C60_vtype_b.js</a><br />
<img src="https://camo.nodebb.org/47c26db1884338b367d0d0f85f71c2aacfd94045?url=https%3A%2F%2Fforums.raspberrypi.com%2Fdownload%2Ffile.php%3Fid%3D56224" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">I can create planar embedding into plane in browser JS and display using SVG:<br />
<a href="https://hermann-sw.github.io/planar_graph_playground/" rel="nofollow ugc">https://hermann-sw.github.io/planar_graph_playground/</a></p>
<p dir="auto">Now I want to create new JSCAD model in browser JS and then display it as with "demo.html" in local webserver or  openjscad.xyz.<br />
Is that possible?<br />
If so, where can I find doc or an example?</p>
]]></description><link>https://openjscad.nodebb.com/topic/380/how-to-generate-jscad-model-in-browser-js-and-display-like-demo-html</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 20:36:40 GMT</lastBuildDate><atom:link href="https://openjscad.nodebb.com/topic/380.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Aug 2022 23:42:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to generate JSCAD model in browser JS and display like demo.html? on Wed, 24 Aug 2022 19:29:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hrgdavor" aria-label="Profile: hrgdavor">@<bdi>hrgdavor</bdi></a> I tried that with openjscad.xyz and it did not work. But it does work with locally hosted demo.html !<br />
Thanks, until now I had browser console open right, editor in middle and only half of 3D view left. After drag and drop, I can close the editor and see new graphs whenever I run node.tetra.js to produce a different x.jscad. So much easier to work now ...</p>
]]></description><link>https://openjscad.nodebb.com/post/1259</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1259</guid><dc:creator><![CDATA[Hermann-SW]]></dc:creator><pubDate>Wed, 24 Aug 2022 19:29:37 GMT</pubDate></item><item><title><![CDATA[Reply to How to generate JSCAD model in browser JS and display like demo.html? on Wed, 24 Aug 2022 20:04:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hrgdavor" aria-label="Profile: hrgdavor">@<bdi>hrgdavor</bdi></a> I follow up on graph algorithm work I stopped 28 years ago:<br />
<a href="https://stamm-wilbrandt.de/en/TR/IAI-TR-93-10.ps.pdf" rel="nofollow ugc">https://stamm-wilbrandt.de/en/TR/IAI-TR-93-10.ps.pdf</a><br />
I built undirected graph library as basis already, it will grow over time. Currently output formats of the tools are SVG, PostScript, and OpenSCAD and JSCAD for sphere embeddings:<br />
<a href="https://github.com/Hermann-SW/planar_graph_playground" rel="nofollow ugc">https://github.com/Hermann-SW/planar_graph_playground</a></p>
<p dir="auto">All planar graphs can be 4-colored (face as well as vertex, faces/vertices sharing an edge have to get different colors), there is a linear time algorithm for 5coloring, and I have built an even simpler 6coloring algorithm:   <a href="https://github.com/Hermann-SW/planar_graph_playground/blob/main/undirected_graph.js#L311-L332" rel="nofollow ugc">https://github.com/Hermann-SW/planar_graph_playground/blob/main/undirected_graph.js#L311-L332</a><br />
Yesterday I made 6coloring work for JSCAD sphere embedding, 6coloring for embedding into the plane worked long ago:<br />
<a href="https://forums.raspberrypi.com/viewtopic.php?p=2032214#p2032214" rel="nofollow ugc">https://forums.raspberrypi.com/viewtopic.php?p=2032214#p2032214</a><br />
6coloring algorithm did use 5 colors only for sphere spherical face coloring (of C60 fullerene) left:<br />
<a href="https://www.youtube.com/watch?v=Zl-KumZDBbQ" rel="nofollow ugc">https://www.youtube.com/watch?v=Zl-KumZDBbQ</a><br />
<img src="https://camo.nodebb.org/0eb617bd0fa51afcad64b2bd8081979b134ec27b?url=https%3A%2F%2Fstamm-wilbrandt.de%2Fen%2Fforum%2F6coloring.spherical_plane.png" alt="https://stamm-wilbrandt.de/en/forum/6coloring.spherical_plane.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://openjscad.nodebb.com/post/1258</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1258</guid><dc:creator><![CDATA[Hermann-SW]]></dc:creator><pubDate>Wed, 24 Aug 2022 20:04:24 GMT</pubDate></item><item><title><![CDATA[Reply to How to generate JSCAD model in browser JS and display like demo.html? on Wed, 24 Aug 2022 09:26:07 GMT]]></title><description><![CDATA[<p dir="auto">Also if you have commandline that produces a jscad script to be executed, you can use jscad to view it without placing it online</p>
<p dir="auto">if you have a commandline like: <code>command_produce_sth_for_jscad.sh &gt; test.js</code></p>
<p dir="auto">then you open <a href="https://openjscad.xyz/" rel="nofollow ugc">https://openjscad.xyz/</a> and turn on <code>Auto reload</code> and drag and drop the <code>test.js</code></p>
<p dir="auto">each time you want to update the output you can run <code> command_produce_sth_for_jscad.sh &gt; test.js</code><br />
and jscad will notice changed file and reload it.</p>
]]></description><link>https://openjscad.nodebb.com/post/1257</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1257</guid><dc:creator><![CDATA[hrgdavor]]></dc:creator><pubDate>Wed, 24 Aug 2022 09:26:07 GMT</pubDate></item><item><title><![CDATA[Reply to How to generate JSCAD model in browser JS and display like demo.html? on Wed, 24 Aug 2022 09:08:48 GMT]]></title><description><![CDATA[<p dir="auto">That looks cool. What is the the use case for those planar graphs ?</p>
]]></description><link>https://openjscad.nodebb.com/post/1256</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1256</guid><dc:creator><![CDATA[hrgdavor]]></dc:creator><pubDate>Wed, 24 Aug 2022 09:08:48 GMT</pubDate></item><item><title><![CDATA[Reply to How to generate JSCAD model in browser JS and display like demo.html? on Mon, 22 Aug 2022 13:56:13 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the pointers, I will look into. Yesterday I found a solution myself, I just had incorrect mindset. Details of the (surprisingly small) diff needed in this posting:<br />
<a href="https://forums.raspberrypi.com/viewtopic.php?p=2031648#p2031648" rel="nofollow ugc">https://forums.raspberrypi.com/viewtopic.php?p=2031648#p2031648</a></p>
<p dir="auto">This is new mode JSCAD_ running graph algorithms, system of linear equations solver and "main()" for viewing in browser:<br />
<a href="https://openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD_.1.js" rel="nofollow ugc">https://openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD_.1.js</a></p>
<p dir="auto">Should show like this browser with Auto-zoom enabled:<br />
<img src="https://camo.nodebb.org/4bf6c6be3c9524a7a366edb9dc75606b558dd20a?url=https%3A%2F%2Fforums.raspberrypi.com%2Fdownload%2Ffile.php%3Fid%3D56287" alt="https://forums.raspberrypi.com/download/file.php?id=56287" class=" img-fluid img-markdown" /></p>
<p dir="auto">JSCAD_ takes longer than JSCAD mode, because running graph algorithms ...<br />
Also JSCAD_ output is 36KB, JSCAD only 19KB.</p>
]]></description><link>https://openjscad.nodebb.com/post/1252</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1252</guid><dc:creator><![CDATA[Hermann-SW]]></dc:creator><pubDate>Mon, 22 Aug 2022 13:56:13 GMT</pubDate></item><item><title><![CDATA[Reply to How to generate JSCAD model in browser JS and display like demo.html? on Sun, 21 Aug 2022 03:17:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hermann-sw" aria-label="Profile: Hermann-SW">@<bdi>Hermann-SW</bdi></a> There several examples of websites mentioned in this user group, so you might want to contact those authors.</p>
<p dir="auto">It seems that you already stumbled across the simple demo as part of regl-renderer. You could build upon that, or adopt one the frameworks, such as React.</p>
<p dir="auto">You can find <a href="https://openjscad.xyz/dokuwiki/doku.php?id=en:user_guide_help" rel="nofollow ugc">some links on the User Guide</a>. I'm trying to keep this up to date.</p>
]]></description><link>https://openjscad.nodebb.com/post/1251</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/1251</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Sun, 21 Aug 2022 03:17:19 GMT</pubDate></item></channel></rss>