'SceneKit – Extrude profile along Circle
I'am struggling to find any information about bending or extruding along path some bezier profile.
Let's say I have some path:
UIBezierPath *path = [UIBezierPath bezierPath];
[path moveToPoint:CGPointZero];
[path addLineToPoint:CGPointMake(5, 0)];
[path addLineToPoint:CGPointMake(5, 0.1)];
[path addLineToPoint:CGPointMake(0, 0.1)];
[path closePath];
(for simplicity its a box, but that profile can be something more complicated, like 3 rounded corners and some curve)
and I can extrude it to 3d object with SCNShape, like this:
SCNShape *ringShape = [SCNShape shapeWithPath: path extrusionDepth: 1];
ringShape.firstMaterial.doubleSided = YES;
SCNNode *node = [SCNNode nodeWithGeometry: pieShape];
but now I would love to bend this "box" shape to 360 degrees to form a ring shape. Is this even possible without loading external geometry?
Maybe there are some other option to make that geometry programmatically, maybe some SCNTube and then chamfer its edges with path profile ? Or some shader ?
For visual helper, this is what I mean, profile ~ 360 extrude = ring
Any pointers would be lovely, as I can't find much information about SceneKit.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

