Slicing again... simplifying code
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.
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!