mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-13 18:24:28 +02:00
add doc
This commit is contained in:
BIN
docs/images/lib2-px_line-1.JPG
Normal file
BIN
docs/images/lib2-px_line-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
docs/images/lib2-px_line-2.JPG
Normal file
BIN
docs/images/lib2-px_line-2.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
33
docs/lib2-px_line.md
Normal file
33
docs/lib2-px_line.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# px_line
|
||||
|
||||
Given two points. `px_line` returns points that can be used to draw a pixel-style line.
|
||||
|
||||
**Since:** 2.0
|
||||
|
||||
## Parameters
|
||||
|
||||
The dir changed since 2.0.
|
||||
|
||||
- `p1` : The start point `[x, y]` or `[x, y, z]`.
|
||||
- `p2` : The end point `[x, y]` or `[x, y, z]`.
|
||||
|
||||
## Examples
|
||||
|
||||
include <pixel/px_line.scad>;
|
||||
|
||||
for(pt = px_line([-10, 0], [20, 50])) {
|
||||
translate(pt)
|
||||
square(1, center = true);
|
||||
}
|
||||
|
||||

|
||||
|
||||
include <pixel/px_line.scad>;
|
||||
|
||||
for(pt = px_line([-10, 0, -10], [20, 50, 10])) {
|
||||
translate(pt)
|
||||
cube(1, center = true);
|
||||
}
|
||||
|
||||

|
||||
|
Reference in New Issue
Block a user