OpenJSCAD.org
OpenJSCAD.org copied to clipboard
Enable non-affine transforms of CSGs
IWBN if there were a way to "bend" CSGs or otherwise deform them in non-affine ways. E.g. https://goo.gl/photos/D8WnhPUKAei1ZoNX7 linked from https://plus.google.com/u/0/+KurtMeister/posts/3z3DnHsmgho
AFAICT the closest thing to this would CSG.toPolygons(), transform vertices, and feed back to CSG.fromPolygons(), but that's limited to transformations that maintain each polygon's convexity and the coplanarity of its vertices.
@fischman As always, your issues are the most interesting.
I know that there's a question where... Sorry.
I don't know of an "easy" way to "bend" a CSG. There are probably lots of issues involved, such as maintaining shapes, structure, etc. However, it's possible, I think.
@fischman This might not solve this specific issue immediately, but I played around with an implicit function (well, actually signed distance field) based modeler based on http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm, and the non-affine transforms are fantastic: displacement, bend , twist (and do not have the same degenerate polygon issues as we have) !
FYI, V2 geometries are still polygon based data structures. The V2 API and internals will be more friendly to different implementations, including transforms. But there’s really no solid plans for an alternative representation of,geometries at this time.