JSCAD User Group
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Generating project thumbnails

    Scheduled Pinned Locked Moved General Discussions
    9 Posts 3 Posters 2.1k Views 2 Watching
    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.
    • BarbourSmithB Offline
      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 πŸ˜€

      z3devZ 1 Reply Last reply Reply Quote 0
      • z3devZ Offline
        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
        • BarbourSmithB Offline
          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?

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

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

            BarbourSmithB 1 Reply Last reply Reply Quote 1
            • BarbourSmithB Offline
              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
              • gilboonetG Offline
                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:

                gilboonetG 1 Reply Last reply Reply Quote 0
                • gilboonetG Offline
                  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.

                  gilboonetG 1 Reply Last reply Reply Quote 0
                  • gilboonetG Offline
                    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.

                    gilboonetG 1 Reply Last reply Reply Quote 0
                    • gilboonetG Offline
                      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

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better πŸ’—

                      Register Login
                      • First post
                        Last post
                      Powered by NodeBB | Contributors