JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. platypii
    3. Best
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 17
    • Best 6
    • Controversial 0
    • Groups 0

    Best posts made by platypii

    • JSCAD geometry engine project

      Hey everyone. I was just added as a maintainer of JSCAD 👋

      I've recently been getting a bunch of commits in (with the help of @z3dev, @hrgdavor, and others) trying to make the geometry internals of JSCAD both rock solid, and super fast.

      Some recent improvements:

      • 100x speedup of toOutlines for large polys
      • 150x speedup of hullPath2 for large polys
      • 2.6x speedup of expandShell for 3D expansions. Also produces cleaner output geometry.
      • 300x speedup of offsetFromPoints for 2D expansions. Also cleaner output geometry.

      Some bigger projects I'm working on:

      • Earcut triangulation. Currently extrusions use toPolygons to turn non-convex geometries into convex polygons. But there are known bugs (#907). I believe this can be done faster, and produce air-tight geometry!
      • Fixes to offsetFromPoints. A user reported a bug in our offset code (#1017). Polygon offsetting is a hard problem in computational geometry. I think we can fix the user bug, but getting a fully general solution may not be easy.
      • Eliminate non-manifold geometry from the output of BSP trees. Still early in experiments, but I think it's possible to efficiently produce manifold geometry. This would be more robust to floating point errors (quantization would not break edges). And allow non-linear transforms (for example, bending an object #598).

      I really like the JSCAD API. V2 was a beautiful upgrade. I want to make the engine implementing that API as fast and accurate as humanly possible.

      posted in Development Discussions
      platypii
      platypii
    • RE: Embedding a design in a website

      @z3dev said:

      Also, please take a look at the minimal viewer, which is really compact.
      https://github.com/jscad/OpenJSCAD.org/blob/master/packages/utils/regl-renderer/demo.html

      This is exactly what I was looking for! Talk about an under-hyped feature 🙂

      I'm now able to render my design in the browser, live, in less than 300kb total, using the regl-renderer! Even less bytes when gzipped.

      And what's cool is these are my actual CAD files used in production, rendered in the browser super efficiently.

      THANK YOU!

      posted in General Discussions
      platypii
      platypii
    • RE: V2 JSCAD RELEASED!!!

      HAPPY ANNIVERSARY TO JSCAD V2!

      As someone who was a user of V1, then migrated to V2, and now a maintainer of the project, I have to say that JSCAD has grown an incredible amount in the last year!

      There is certainly still room for improvements. But JSCAD has tackled a very ambitious goal: bring constructive solid geometry to the web. There's really nothing similar out there. And according to Atwood's Law:

      Any application that can be written in JavaScript, will eventually be written in JavaScript

      So thanks @z3dev and everyone else who has contributed! Really excited to see where this project will go.

      posted in Announcements
      platypii
      platypii
    • RE: How do you single step your code?

      Actually, you can just put a debugger statement in your design, chrome will pause at it, and then you can step through it. Neat.

      posted in Development Discussions
      platypii
      platypii
    • RE: Embedding a design in a website

      @hrgdavor all my code will be open source. Technically it already is, but I haven't completed PRs yet. [1] [2]

      Really I just took the regl-renderer demo.html that @z3dev linked to and used it for my models. The only things I changed:

      • Include from unpkg.com
      • Remove the axes and grid
      • Added auto-rotate code so that it would spin
      • Some code style cleanup, mostly object value shorthand {camera, controls}
      • Fought with CommonJS vs ES6 module differences.

      The CommonJS vs ES6 module issue is preventing me from using the exact same jscad code for development and rendering. Right now I'm converting jscad CommonJS into ES6 for use in the browser. I might need to use babel or requirejs or something.

      This is how I'm looking to show off the designs in my site:
      Screenshot at 2021-10-10 11-08-15.png

      posted in General Discussions
      platypii
      platypii
    • RE: [Christmas Update!]New application of JSCAD: Fully 3D-printed music box

      Wow very cool! Hard to imagine how that would even be possible with traditional CAD software 🙂

      posted in General Discussions
      platypii
      platypii