1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/docs/lib2x-ptf_bend.md

33 lines
730 B
Markdown
Raw Normal View History

2020-03-27 08:59:51 +08:00
# ptf_bend
Transforms a point inside a rectangle to a point of an arc.
2020-03-27 20:06:19 +08:00
**Since:** 2.3
2020-03-27 08:59:51 +08:00
## Parameters
- `size` : 2 value array `[x, y]`, rectangle with dimensions `x` and `y`.
- `point` : The point to be transformed.
- `radius` : The radius of the arc.
- `angle` : The central angle of the arc.
## Examples
2021-02-07 17:25:45 +08:00
use <voxel/vx_ascii.scad>;
2020-03-27 08:59:51 +08:00
use <ptf/ptf_bend.scad>;
t = "dotSCAD";
size = [len(t) * 8, 8];
radius = 20;
angle = 180;
for(i = [0:len(t) - 1]) {
2021-02-07 17:25:45 +08:00
for(pt = vx_ascii(t[i], invert = true)) {
2020-03-27 08:59:51 +08:00
bended = ptf_bend(size, pt + [i * 8, 0], radius, angle);
translate(bended)
sphere(0.5, $fn = 24);
}
}
![ptf_bend](images/lib2x-ptf_bend-1.JPG)