OpenJSCAD.org icon indicating copy to clipboard operation
OpenJSCAD.org copied to clipboard

Enable non-affine transforms of CSGs

Open fischman opened this issue 8 years ago • 3 comments

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 avatar Nov 28 '16 00:11 fischman

@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.

z3dev avatar Nov 28 '16 11:11 z3dev

@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) !

kaosat-dev avatar Jun 04 '17 12:06 kaosat-dev

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.

z3dev avatar Feb 23 '20 11:02 z3dev