JSCAD User Group

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

    Slicing again... simplifying code

    Comments & Feedback
    2
    2
    1345
    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.
    • gilboonet
      gilboonet last edited by gilboonet

      Hello, I'm still working on slicing scripts, and as functions like projection and lieFlat won't be part of v2, I decided to write a simplier one. My idea was to get a 2d slice of a 3d volume by intersecting it with a volume having a flat top, then only keep the resulting polygons having all vertices with Z corresponding to the flat top Z coordinate. It seems to work fine. My aim is to teach basics of OpenJSCAD to non programmers crafters, so I'm looking for easy code.

      The following snapshot shows a tiny jscad allowing to retrieve a cylindrical slice from a volume.

      I'm using development web console to have output, that would be great to be able to have output parameters for that, but I understand that is not something critical, it can be handled using the console output.

      0_1565687919687_Capture d’écran de 2019-08-13 11-09-07.png

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

        The simple solutions are always the best. Taking a super thin slice is a great idea, and maybe even the best.

        The core library will be for core functions, as we expect others (like you) to contribute some really nice high level functionality, such as slicing. If we get the core library rock solid then anything is possible.

        Projections on to arbitrary planes is on the wish list, but not there yet.

        Thanks for the awesome posts!

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