JSCAD — JavaScript CAD in your browser
 
Notifications
Clear all

JSCAD — JavaScript CAD in your browser  

  RSS
HermannSW
(@hermannsw)
Estimable Member
JSCAD — JavaScript CAD in your browser

For constructing designs I used freecad first, later mostly OpenSCAD.

Recently I created JSCAD files from PARI/GP to provide interactive 3D output for PARI/GP.

Today I saw something interesting, simplified and moved logic completely into JSCAD main(). 
JSCAD is normally used to export for 3D printing, so my usecases are not mainstream:
https://forums.raspberrypi.com/viewtopic.php?t=365584

You can play with this simple logic inside JSCAD in your browser, screenshot at bottom:
https://stamm-wilbrandt.de/tqf_3D.4.gp.html

This animation shows nicely the cool features added parameters allow for, just in any browser:
(there is no "plane" primitive in JSCAD, the transparent plane is very thin cuboid as workaround) 

 

Posted : 13/02/2024 3:53 pm
HermannSW
(@hermannsw)
Estimable Member
Topic starter answered:
RE: JSCAD — JavaScript CAD in your browser

This is first time I exported a model from JSCAD (I selected as STL) to 3Dprint.
PrusaSclicer said it was 1.25×1.25×1.25 centimeters only, so I scaled by 400% in all dimensions.
Sliced with 4 vertical shell perimeters, no brim and 5% infill.
It took 2h to print on my Prusa MINI+, nice.
I recorded 2h nozzle camera video and uploaded sped up 60× to youtube, together with question here:
https://forum.prusa3d.com/forum/english-forum-general-discussion-announcements-and-releases/is-vertical-nozzle-movement-result-of-initial-bed-leveling-measurement/

Posted : 13/02/2024 8:29 pm
HermannSW
(@hermannsw)
Estimable Member
Topic starter answered:
RE: JSCAD — JavaScript CAD in your browser

I tried the 1292 bytes length URL directly with forum software link, but preview did not work.
For testing I clicked on "Add Reply" and got error message that this forum does not like that link.
So an URL shortener is needed if you want to share link like I did in initial posting:
https://stamm-wilbrandt.de/tqf_3D.4.gp.html

So how can you generated a JSCAD share link that you will have to shorten then?
You can use this tool:
https://github.com/Hermann-SW/GP3D/blob/main/tools/view_gzb64

I created above link for the part I 3Dprinted with these commands:

pi@raspberrypi5:~/GP3D $ gp -q < tqf_3D.4.gp 
pi@raspberrypi5:~/GP3D $ tools/view_gzb64 gp.jscad
Opening in existing browser session.
pi@raspberrypi5:~/GP3D $ 

Then I copied the link from opened browser address bar into both … loctions of this redirect HTML page, which I host on my personal website:

<html xmlns="http://www.w3.org/1999/xhtml"> 
 <head>      
   <title>redirect diophantine_26 GraphvizFiddle Share link</title>      
   <meta http-equiv="refresh" content="0;URL=
…
" />    
  </head>    
  <body> 
    <p>This page is shortcut for <a href="
…
">tqf_3D.4.gp JSCAD model</a>.
  </body>  
</html> 

 

Btw, I 3Dprinted the part again, with same 4 vertical shell perimeter, but this time with 0% infill.
Surprisingly the top 90° overhang was no problem, perhaps because length over air was less than 1cm.
Last 1:55min of 3Dprint at original speed:

 

Last I did print same model in vase mode, had not printed in that mode (with permimeter forced to 1) before.
At bottom everything is fine, but you can clearly see that the 4 top rectangles do not look nice.
With thicker borders their slope is no problem to 3Dprint (all up to 70° slope overhang just works).
 

Posted : 16/02/2024 9:20 pm
Share: