Odd behavior of embedded script that works fine when standalone

  • Hello, I have a script that works fine standalone (right of the snapshot), but when I embed it on a html5 app, it is buggy. I tried to run it using viewer-minimal and it is buggy just the same.
    The standalone script is here : https://openjscad.org/#https://gilboonet.github.io/scripts/test_tr2.jscad (must rotate X to 90). The script makes cross sections from a volume, here the bug is that the top of the orange slices is missing. With other 3d models other parts are missing. I will try to investigate this but I'm not sure it is something I'm able to debug.

    0_1580852755484_Capture d’écran de 2020-02-04 22-34-52.png

  • I didn't find exactly what is different between the two environments (normal jscad and min), could be getBounds() into min.js. But I fixed it using hard coded values, and it's ok. The aim of my app is to allow average user to select a 3d file then a script that will run on the model from this file and at the end create a pdf file with the cuts and folds needed to build the model. On my site I also put links to the jscad script I use to people can learn from them, but sadly if the first script was easy, it quicky gets difficult for beginners. The scripts app is here : https://gilboonet.github.io/OpenJSCAD.org/packages/web/scripts.html0_1580896827254_Capture d’écran de 2020-02-05 10-47-15.png

Log in to reply