1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-16 21:58:26 +01:00
dotSCAD/docs/lib3x-shear.md

53 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

2019-05-02 09:13:23 +08:00
# shear
Shear all child elements along the X-axis, Y-axis, or Z-axis in 3D.
2019-05-02 10:44:19 +08:00
**Since:** 1.1
2019-05-02 09:13:23 +08:00
## Parameters
- `sx` : An array `[SHy, SHz]`. The new coordinates of child elements are `(x + SHy * y + SHz * z, y, z)`.
- `sy` : An array `[SHx, SHz]`. The new coordinates of child elements are `(x, y + SHx * x + SHz * z, z)`.
- `sz` : An array `[SHx, SHy]`. The new coordinates of child elements are `(x, y, z + SHx * x + SHy * y)`.
## Examples
2022-06-06 13:11:46 +08:00
use <shear.scad>
2019-05-02 09:13:23 +08:00
color("red") {
shear(sx = [1, 0])
cube(1);
translate([2, 0, 0]) shear(sx = [0, 1])
cube(1);
translate([4, 0, 0]) shear(sx = [1, 1])
cube(1);
}
translate([0, -3, 0]) color("green") {
shear(sy = [1, 0])
cube(1);
translate([2, 0, 0]) shear(sy = [0, 1])
cube(1);
translate([4, 0, 0]) shear(sy = [1, 1])
cube(1);
}
translate([0, -5, 0]) color("blue") {
shear(sz = [1, 0])
cube(1);
translate([2, 0, 0]) shear(sz = [0, 1])
cube(1);
translate([4, 0, 0]) shear(sz = [1, 1])
cube(1);
}
2021-02-21 22:47:09 +08:00
![shear](images/lib3x-shear-1.JPG)
2019-05-02 09:13:23 +08:00