A little web app using OpenJsCad



  • Hi guys,

    I would like to create a react web app when user can generate STL files (and maybe preview it) with a few fields used as parameters.

    What is the best solution to do that ?

    I thought about something like that :

    • The user select the part he wants to create
    • The user enter his parameters (if available for the selected part)
    • The user click on the button and view/generate the selected part with the parameters

    Something like that : https://joostn.github.io/OpenJsCad/ but with my own parts.

    I've installed the OpenJsCad yarn package in my project and tried to do something, but i'm inexperienced with the library and don't know which functions to call.

    Thanks for your help,

    benkei



  • @William-Adams that is very nice indeed !
    Jscad is just a shorter name and less of a mouthful, either is fine 🙂

    @benkei it does indeed work like that, the parameter definitions are parsed by the internals of jscad to be displayed in the UI



  • @kaosat-dev I'm gonna receive a .jscad file with fixed parameters, I need to allow the users to modify this parameters via the interface.

    The open-source project I use (dan marshall's one) seems to automatically add the parameters to the interface if they are present in the design code.

    I assume if I import my .jscad file and then modify the module code to add the needed parameters it will work like I want it to.

    Can somebody confirm me this?

    Thanks 🙂



  • I thought:

    https://gen.haxit.org/organizer/

    which was done using

    https://github.com/bit101/quicksettings

    was very impressive --- so much so that I'm looking at switching a project to OpenJSCAD (jsCAD? Was it renamed?)



  • Hi @benkei ! Glad you got some things working !
    What part about parameters do you need help with ? , we can help 🙂



  • Quick update :

    I dropped the idea of developing a brand new web app from zero, I think I don't have the knowledge and the time to do that.

    Dan Marshall's project is very interesting and is close to responding to all of my needs.

    I need to modify some of my .jscad files (there is errors in them apparently) but I managed to add new designs to this jscad-gallery.

    Now, i would like to add a more complex design with some parameters that the user can modify like for the others base design (ex: gear), anyone else who could have done that and help me?

    Thanks for your help guys, and if I can contribute to any of your projects as a thank you let me know!



  • @gilboonet Thanks for the answer, I will look into it !



  • You can maybe find some help here :
    https://github.com/danmarshall/jscad-gallery
    it's a project that creates a gallery from .jscad designs



  • Is it possible for someone to help me ?

    I would like to learn how to preview a .jscad file with your library and then the user could generate a .stl file if he wants it.

    Looks like I can use the @jscad/stl-serializer to do that but i don't know how to generate the csg object from my .jscad file

    Thanks



  • @johnwebbcole has a project which does something simular. hopefully, he will be able to add a few pointers.

    https://gitlab.com/johnwebbcole/vesa-shelf


Log in to reply