mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-31 10:11:53 +02:00
add doc
This commit is contained in:
BIN
docs/images/lib2x-ptf_bend-1.JPG
Normal file
BIN
docs/images/lib2x-ptf_bend-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
32
docs/lib2x-ptf_bend.md
Normal file
32
docs/lib2x-ptf_bend.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# ptf_bend
|
||||
|
||||
Transforms a point inside a rectangle to a point of an arc.
|
||||
|
||||
**Since:** 2.3.
|
||||
|
||||
## 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
|
||||
|
||||
use <pixel/px_ascii.scad>;
|
||||
use <ptf/ptf_bend.scad>;
|
||||
|
||||
t = "dotSCAD";
|
||||
size = [len(t) * 8, 8];
|
||||
radius = 20;
|
||||
angle = 180;
|
||||
|
||||
for(i = [0:len(t) - 1]) {
|
||||
for(pt = px_ascii(t[i], invert = true)) {
|
||||
bended = ptf_bend(size, pt + [i * 8, 0], radius, angle);
|
||||
translate(bended)
|
||||
sphere(0.5, $fn = 24);
|
||||
}
|
||||
}
|
||||
|
||||

|
Reference in New Issue
Block a user