First of all, thank you for taking the time to put this forum up.
Here's what I use JSCAD for,
Coder since 1978, cardboard crafter since 2007, digital cardboard crafter and JSCAD user since 2014.
@jamesnewton Indeed it is not that critical, it won't be bad to have already answered questions on the previous forum asked again here, so up to date answers could be provided. By the way those who have jscad knowledge/experience to share can make a post to show what they do, put some code.
Hello, I'm deploying crafting resources on design section of my github account, and to do so I share several furniture designs, I have about 10 now, but I have lots more to add. For each of them I share the 3d model and links to open jscad scripts with them. I currently have almost the same using v1 and I wrote an html/js page to create jscad code with the good script and the good 3d model. I don't know how to do that with v2, so I'm trying something else.
( can be seen here : https://github.com/gilboonet/designs/blob/master/MEUBLES/readme.md )
For each design there's :
I would like to replace the link to online 3d viewer by a link to a jscad script where it would be possible to rescale it, and show its dimensions, but the only solution that I have in mind is to write a script for that, and duplicate it for each 3d model. It's already what I am doing for the skeleton script.
Do you think that for such case, I mean choose a model then a script to apply on it, there could be a mechanism. Locally I already use dynamic require from a text parameter and it works well, but on remote script I didn't manage to make it work. Maybe is there a way to run a script from a remote folder ? or a way to require an url ?
Hello, I'm using JSCAD for years now to help me build cardboard objects, statues and furniture. I decided at the beginning of this year to build a website offering users to do the same. My crafts need essentially 2d patterns to cut, fold and glue. I used last V1 version that I embedded in my website, and replace viewer-minimal.html with some custom html allowing the user to first choose a 3d model (from a .jscad script, a .stl file, or a .obj file), then one of my crafting scripts that runs on the chosen 3d model. User configures the craft as needed, then run its 2d mode that renders 2d data. Last, user click on "Créer PDF" (create PDF) that uses the 2d data and make a .PDF file. It works fine and not only on pc (I use Ubuntu/Firefox) but also on tablet (Android).
You can use it here : https://gilboonet.github.io/OpenJSCAD.org/packages/web/scripts.html
There are some example models on "(Charger volume)".
"Depliage" script takes lot of time to render and it can take advantage of colored zones (materials) from a .obj file.
code is here (but beware I'm not an IT pro) https://github.com/gilboonet/gilboonet.github.io/tree/master/OpenJSCAD.org/packages/web see scripts.html and dist/scripts.js )
Hello, I cannot help with react as I don't use it. Did you take a look at viewer-minimal.html (https://github.com/jscad/OpenJSCAD.org/blob/master/packages/web/viewer-minimal.html) ? It was my starting point to integrate jscad into web pages.
yesterday I needed to modify my 2 axis slicer script for it to be compatible with latest v2 version. The error shown into web console was about subtract, so I first thought there was a problem with CSG subtract and discarded the code using it, but indeed it was vec3.subtract that I'm using as a replacement of now deprecated minus(). I replaced it with
//d = vec3.subtract(b, b); d = [b-b, b-b, b-b];
but isn't there anymore a way to use vector operations like subtract() because it helps keeping the code easy to read.
Here is the basic design where it would be useful to use a projection function. In order to make simple scroll saw pattern, I was asked to make a generic script that users could easily change. For the moment it's using my function vol2surf that "works" as a projection even if it far from that.
I saw that a projection function is now available (projectionOfPoint), how can I use it to replace mine ?
the project is here, it's in a .zip because it uses an external 3d model
@hrgdavor yes, the method I used was what was available but any other could replace it. The purpose is to get data from the embedded jscad script and create a pdf file from it that can then be downloaded or directly viewed into the browser.
@hrgdavor Yes, it can be found here :
To work the .jscad needs to push data into an array (see creePDF to see possibles types of data) that is then put into a localStorage parameter. The script that's into the textarea with id="zc_tranches02" contains the script for the V1 2 axis slicer and it pushes data that way. But, as I didn't manage to have localStorage work with V2, I don't know if it is possible.
@hrgdavor You did really nice improvements. On the V2 version I don't export to PDF, but only to a big SVG. On the V1 version that exports to PDF, my scripts create a file with data on what needs to be rendered (triangle, text, line, next page, etc) and the PDF button fires a node js script that read that file and create a pdf from it, as I didn't find a way to fire that button with V2 I didn't add it.