JSCAD — JavaScript CAD in your browser
 
Avisos
Vaciar todo

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) 

 

Respondido : 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/

Respondido : 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).
 

Respondido : 16/02/2024 9:20 pm
HermannSW
(@hermannsw)
Estimable Member
Topic starter answered:
RE: JSCAD — JavaScript CAD in your browser

Recently I used NopSCADlib with OpenSCAD because it provides so many predefined parts:
https://github.com/nophead/NopSCADlib

I created model of a simple pan-tilt camera I once created with 4 drops of superglue ...

… using NopSCADlib, which is now part of the repo gallery:
https://github.com/nophead/NopSCADlib/tree/master/gallery#pt_camera

I wanted to transpile that NopSCADlib 54 line code (including animation) …
https://github.com/nophead/NopSCADlib/blob/master/examples/PT_camera/PT_camera.scad

… to JSCAD. The coverters from OpenSCAD to JSCAD I found all had problems and I created issues.
Yesterday I found a solution, use NopSCADlib environment on https://scriptcad.com and export stuff as JSON.
The details can be found in this posting:
https://forums.raspberrypi.com/viewtopic.php?p=2236259#p2236259

You can directly pan+tilt the model in your browser, and that fast:
https://hermann-sw.github.io/lattice_sphere_cmp/pt.html

Or just see below animation.
The pan-tilt camera is not good for 3D-printing because it needs much support.
But there are plenty of other uses of NopSCADlib/OpenSCAD and https://jscad.app to export parts for 3Dprinting.

Respondido : 12/07/2024 2:26 pm
HermannSW
(@hermannsw)
Estimable Member
Topic starter answered:
RE:

Most times I use JSCAD for mathematical modelling.

But recently I created simple models for 3Dprinting as well.
Here is a model published with JSCAD app link:
https://www.printables.com/model/949334-parametrized-jscadapp-balcony-door-handle

Today I used JSCAD for mathematical modelling again.
I am really impressed how easy it was to draw edges between vertices on a torus.
The complete bipartite graph K_{3,3} cannot be embedded into the plane without edge crossing.
But it can be embedded without edge crossing onto torus.
Here is JSCAD app link for the model (which is warning free on jslint.com):
https://jscad.app/#https://gist.githubusercontent.com/Hermann-SW/c47291d47c1c5d14933707fa83da46fb/raw/utility.jscad

Respondido : 29/01/2025 3:02 pm
HermannSW
(@hermannsw)
Estimable Member
Topic starter answered:
RE:

I used JSCAD again to 3Dprint something useful.

There are three Vega20 type AMD Radeon GPUs, the Radeon vii, Radeon pro vii and Instinct MI50.
They come with 3/1/0 fans. The Instinct MI50 is a workstation GPU and assumes cooling by server.

The MI50 has 6.705 TFLOPs FP64 and while I have the other two models, I do own 3 MI50s.
For using MI50 I first used a 180° U-turn shroud (for BBQ blower fan) I got when buying a Tesla K20.
But the U-turn makes it not that effective. So I created this only 10° slope model:
https://www.printables.com/model/1229329-shroud-for-amd-instinct-mi50-workstation-gpu-and-b

You can open the only 102 lines JSCAD model in your browser with this JSCAD share link.
The model mostly is a set of coordinates in 3D and some "hull()" functions on them to build the model. 

 

I removed the outside of a used MI50 I bought to check whether dust was inside.
This view shows the shroud screwed into the MI50:

Respondido : 10/04/2025 2:01 pm
HermannSW
(@hermannsw)
Estimable Member
Topic starter answered:
RE:

Lampshade was broken, so I printed new one.
Of course my favorite object, truncated icosahedron (football fullerene C60).

Top missing hexagon (for heat) was too small to get my hand inside.
So lamp bulb was inserted with kitchen gripper left from top, and then turned with fingers to fixate.
JSCAD share link

Esta publicación ha sido modificada el hace 3 months por HermannSW
Respondido : 05/06/2025 10:24 pm
Compartir: