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.
Hello, it can be done like that, put a "#" after openJSCAD.org then the url of your script.
Hello, I made a little script to help people customize a faceted statue by changing its colors. It works fine, using the "color" parameter, but I don't know how to do to put it online.
it's very simple, require the .obj, then change colors using parameters.
I tried to import it to jscad in order to save it as .jscad as it was possible with V1, but this option is no more available.
@z3dev There's one thing that still makes me use obj from my obj2jscad.js. It is that the deserialized obj loses the polygon vertices list and it needs to be rebuild from the geometries, unless I didn'k look at the right place. But as 99 % of the time the user won't use those data, I understand that the deserializer don't keep track of them.
@z3dev 'class' element for sure is interesting as it will ease styling. About 'id', yes it must be used carefully to ensure that each object has its unique id, generally I use names forged from data (line between triangle 23 and 111 has id 'L_23_111', etc.). 'name' is deprecated so it's maybe wise to avoid it, on very old js code I remember i used 'tag', as svg doesn't use it, as svg can use custom attributes, it can be anything. And it would be really great to have exported svg from jscad with such fine details, because it will allow rework those outputs with great ease. I tried to use localStorage from a jscad script and it doesn't work, so my only other possibility would be to output to console.
@z3dev "id" or "name" would be enough. Here for the numbers, I use lots of times the sames polygons, and on an old v1 version where I created the svg on a string, instead of duplicating those polygons, i used 1 "def" for each of them then "use", I'm not sure it it is possible here.
With jscad it takes less than 2 sec. to unflatten the demo volume I'm using, a hand made of 282 triangles. My process is simple. I build a net from the 3d model data, then I choose a first triangle to unfold and unfold its neighbors and so on while there's nothing left to do. I tried to do the same with OpenSCAD and surprisingly I was not able to code it as it cannot do conditional actions depending on feedback from a boolean operation (I need to check if a new face can be unfold without overlapping with already unfold ones, and it takes CSG intersection. With Cascade Studio, the intersection works, but it gets out of memory before the end, and anyway for the moment there's is still no 2d output.
Hello, recently I tried lots of code cad tools, and even if some of them (Cascade Studio and Cad Query) are impressive, jscad is still the most advanced one. I'm hoping to make a automatic version that directly outputs to svg and I'm wondering if there's any possibility to have my output with groups or ids that I can control, so that I can easily style them as I need with code or a svg editor.
Here is my current output....