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

47 lines
1.3 KiB
Markdown
Raw Normal View History

2020-04-02 18:15:05 +08:00
# sf_solidify
2021-06-30 08:33:44 +08:00
It solidifies two square surfaces, described by a m * n list of `[x, y, z]`s.
2020-04-02 18:15:05 +08:00
**Since:** 2.3
## Parameters
2021-06-22 18:02:33 +08:00
- `surface1` : A m * n list of `[x, y, z]`s.
- `surface2` : A m * n list of `[x, y, z]`s.
2020-04-02 18:15:05 +08:00
- `slicing` : Given a rectangle, we have two ways to slice it into two triangles. Using this parameter to determine the way you want. It accepts `"SLASH"` (default) and `"BACK_SLASH"`.
2022-08-27 15:33:30 +08:00
- `convexity` : Integer. This parameter is needed only for correct display of the object in OpenCSG preview mode. It has no effect on the polyhedron rendering. For display problems, setting it to 10 should work fine for most cases. **Since:** 3.3
2020-04-02 18:15:05 +08:00
## Examples
2022-06-06 13:11:46 +08:00
use <surface/sf_solidify.scad>
2020-04-02 18:15:05 +08:00
function f(x, y) =
30 * (
cos(sqrt(pow(x, 2) + pow(y, 2))) +
cos(3 * sqrt(pow(x, 2) + pow(y, 2)))
);
thickness = 2;
min_value = -200;
max_value = 200;
resolution = 10;
surface1 = [
for(y = [min_value:resolution:max_value])
2022-04-06 17:44:11 +08:00
[
for(x = [min_value:resolution:max_value])
[x, y, f(x, y) + 100]
]
2020-04-02 18:15:05 +08:00
];
surface2 = [
for(y = [min_value:resolution:max_value])
2022-04-06 17:44:11 +08:00
[
for(x = [min_value:resolution:max_value])
[x, y, -f(x, y) - 100]
]
2020-04-02 18:15:05 +08:00
];
sf_solidify(surface1, surface2);
2021-02-24 21:09:54 +08:00
![sf_solidify](images/lib3x-sf_solidify-1.JPG)