JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Generating project thumbnails

    General Discussions
    3
    9
    826
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BarbourSmith
      BarbourSmith last edited by BarbourSmith

      Does anyone have any recommendations for the easiest way to generate a thumbnail of a project?

      I've looked at the SVG serializer which works great but only for 2D shapes. Is there a way to flatten my 3D shapes to be 2D? It's just a unique thumbnail so it doesn't really need to look any particular way πŸ˜€

      z3dev 1 Reply Last reply Reply Quote 0
      • gilboonet
        gilboonet @gilboonet last edited by

        @gilboonet It works. I needed to specify ... while pushing content into the return variable. I still need to stop the animation so my video capture will perfectly loop. And there's something that I didn't manage to do, it's creating a new project, for the moment I'm changing demo-web.js, otherwise there is an error (cannot find myAnim.js when I try to run npΓΉ run myAnim.js)
        text alternatif

        1 Reply Last reply Reply Quote 0
        • gilboonet
          gilboonet @gilboonet last edited by

          @gilboonet Finally, I was able to display the .obj with distincts groups as I needed, but I struggled to have the numbers, there's no error but they are not rendered, even if when I tested I managed to display one very big vectorChar. I will try again ASAP. It's a promising feature.

          gilboonet 1 Reply Last reply Reply Quote 0
          • gilboonet
            gilboonet @gilboonet last edited by

            @z3dev The demo works fine (I tested web version), but apparently it cannot use .obj file as require. Is there a way to import such file, maybe using obj deserializer ? I will try to use my obj2jscad.js converter as workaround.

            gilboonet 1 Reply Last reply Reply Quote 0
            • gilboonet
              gilboonet last edited by

              Hello, I'm making some animations to help assembly of my unfold patterns. For the moment I'm recording them by hand, but it would be great to be able to record by program, as it only consist on rendering a rotating view. So I'm going to try this demo.
              Example of what I want to make:

              gilboonet 1 Reply Last reply Reply Quote 0
              • BarbourSmith
                BarbourSmith @z3dev last edited by

                @z3dev

                Thank you! That is exactly what I was looking for.

                I didn't look in there because I am working in the browser so I didn't check the CLI example 😳

                1 Reply Last reply Reply Quote 0
                • z3dev
                  z3dev @BarbourSmith last edited by

                  @BarbourSmith see the README. there are steps on how to setup and run the demo.

                  BarbourSmith 1 Reply Last reply Reply Quote 1
                  • BarbourSmith
                    BarbourSmith last edited by

                    Well that's fantastic! πŸ˜€ πŸ˜€ πŸ˜€ πŸ˜€

                    I looked through https://github.com/jscad/OpenJSCAD.org/tree/V2/packages/utils/regl-renderer , but I think I am missing where the entry point for png generation. Got any pointers on where I should begin?

                    z3dev 1 Reply Last reply Reply Quote 0
                    • z3dev
                      z3dev @BarbourSmith last edited by

                      @BarbourSmith You keep asking the best questions. πŸ™‚

                      Actually, the new rendering engine for V2 JSCAD can render any design directly to a image (PNG) file. You will have to setup some scripts to automate the process.

                      https://github.com/jscad/OpenJSCAD.org/tree/V2/packages/utils/regl-renderer

                      1 Reply Last reply Reply Quote 1
                      • First post
                        Last post
                      Powered by NodeBB | Contributors