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
|
|
|
|
|
2022-06-06 13:11:46 +08:00
|
|
|
use <voxel/vx_ascii.scad>
|
|
|
|
use <ptf/ptf_bend.scad>
|
2020-03-27 08:59:51 +08:00
|
|
|
|
|
|
|
t = "dotSCAD";
|
|
|
|
size = [len(t) * 8, 8];
|
|
|
|
radius = 20;
|
|
|
|
angle = 180;
|
|
|
|
|
2022-04-06 17:44:11 +08:00
|
|
|
for(i = [0:len(t) - 1], pt = vx_ascii(t[i], invert = true)) {
|
|
|
|
bended = ptf_bend(size, pt + [i * 8, 0], radius, angle);
|
|
|
|
translate(bended)
|
|
|
|
sphere(0.5, $fn = 24);
|
2020-03-27 08:59:51 +08:00
|
|
|
}
|
|
|
|
|
2021-02-24 21:09:54 +08:00
|
|
|
![ptf_bend](images/lib3x-ptf_bend-1.JPG)
|