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

32 lines
616 B
Markdown
Raw Normal View History

2020-05-20 17:11:06 +08:00
# vx_line
Given two points. `vx_line` returns points that can be used to draw a voxel-style line.
**Since:** 2.4
## Parameters
- `p1` : The start point `[x, y]` or `[x, y, z]`. x, y, z must be integer.
- `p2` : The end point `[x, y]` or `[x, y, z]`. x, y, z must be integer.
## Examples
2022-06-06 13:11:46 +08:00
use <voxel/vx_line.scad>
2020-05-20 17:11:06 +08:00
for(pt = vx_line([-10, 0], [20, 50])) {
translate(pt)
square(1, center = true);
}
2021-02-24 21:09:54 +08:00
![vx_line](images/lib3x-vx_line-1.JPG)
2020-05-20 17:11:06 +08:00
2022-06-06 13:11:46 +08:00
use <voxel/vx_line.scad>
2020-05-20 17:11:06 +08:00
for(pt = vx_line([-10, 0, -10], [20, 50, 10])) {
translate(pt)
cube(1, center = true);
}
2021-02-24 21:09:54 +08:00
![vx_line](images/lib3x-vx_line-2.JPG)
2020-05-20 17:11:06 +08:00