1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 22:28:16 +01:00
dotSCAD/docs/lib3x-vx_contour.md

36 lines
715 B
Markdown
Raw Normal View History

2020-12-18 10:00:51 +08:00
# vx_contour
Given a list of points that form a closed area, `vx_contour` returns the contour which encircles the area.
2020-12-20 10:25:48 +08:00
**Since:** 2.5
2020-12-18 10:00:51 +08:00
## Parameters
- `points` : A list of `[x, y]` points.
## Examples
2022-06-06 13:11:46 +08:00
use <voxel/vx_ascii.scad>
use <voxel/vx_contour.scad>
2020-12-18 10:00:51 +08:00
t = "dotSCAD";
color("white")
linear_extrude(2)
for(i = [0:len(t) - 1]) {
translate([i * 8, 0])
2022-03-30 09:39:11 +08:00
for(pt = vx_ascii(t[i])) {
translate(pt)
square(1, center = true);
}
2020-12-18 10:00:51 +08:00
}
color("black")
linear_extrude(1)
for(i = [0:len(t) - 1]) {
translate([i * 8, 0])
2020-12-18 10:43:38 +08:00
polygon(vx_contour(vx_ascii(t[i])));
2020-12-18 10:00:51 +08:00
}
2021-02-24 21:09:54 +08:00
![vx_contour](images/lib3x-vx_contour-1.JPG)