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

    Display Code

    Scheduled Pinned Locked Moved Development Discussions
    6 Posts 3 Posters 1.5k 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

      Can anyone point me to the part of the code which is doing the conversion from CSG geometry to threejs geometry for display? I'd like to mess around with it, but I'm a little unsure where to look. Thanks!

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

        @BarbourSmith 🙂

        I'm assuming that you are interested in the V2 version. Here's a short summary.

        The 'packages' directory contains the source code for each of the packages.

        • cli contains the command line application
        • core contains various things for converting, handling events, etc. (used by all apps)
        • desktop contains the standalone application (still not V2)
        • examples
        • io contains the import/export of external formats
        • modeling contains the CSG engine, etc.
        • ui (un-used now)
        • utils contains small components. one is the regl-renderer which does the 3D rendering
        • vtree contains the experimental caching
        • web contains the HTML based application
        BarbourSmithB 1 Reply Last reply Reply Quote 0
        • BarbourSmithB Offline
          BarbourSmith
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • BarbourSmithB Offline
            BarbourSmith @z3dev
            last edited by

            @z3dev Thank you!

            I think I didn't really understand enough to ask the right question. Thanks for getting me closer. I think what I meant to ask is, "Is there an existing way to display threejs geometry in three.js?"

            I looked in utils, this jscad github issue seems like the closet thing I could find.

            Am I barking up the wrong tree? If I want to display jscad geometry in a browser is three.js the wrong approach?

            gilboonetG z3devZ 2 Replies Last reply Reply Quote 0
            • gilboonetG Offline
              gilboonet @BarbourSmith
              last edited by

              @BarbourSmith If your jscad geometry is a polyhedron, you can use : https://threejs.org/docs/#api/en/geometries/PolyhedronGeometry

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

                @BarbourSmith is there some reason to use three.js? the primary focus of three.js is quite differnet from JSCAD.

                It should be pretty trivial to convert between three.js data structures and JSCAD data structures. But don't expect either project to supply the conversions.

                Maybe somone has a set of functions already, or you'll have to write some simple conversion functions.

                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