mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-07 15:26:39 +02:00
change thickness to outer_thickness and inner_thickness
This commit is contained in:
@@ -2,7 +2,7 @@ use <convex_offset.scad>;
|
|||||||
use <__comm__/_vertex_normals.scad>;
|
use <__comm__/_vertex_normals.scad>;
|
||||||
use <util/reverse.scad>;
|
use <util/reverse.scad>;
|
||||||
|
|
||||||
module polyhedron_frame(points, faces, deep, thickness) {
|
module polyhedron_frame(points, faces, deep, outer_thickness, inner_thickness = 0) {
|
||||||
function hollow_face(pts, inner_pts) =
|
function hollow_face(pts, inner_pts) =
|
||||||
let(
|
let(
|
||||||
leng = len(pts),
|
leng = len(pts),
|
||||||
@@ -99,7 +99,7 @@ module polyhedron_frame(points, faces, deep, thickness) {
|
|||||||
];
|
];
|
||||||
offset_face_pts = [
|
offset_face_pts = [
|
||||||
for(face = faces)
|
for(face = faces)
|
||||||
convex_offset([for(i = face) points[i]], -thickness)
|
convex_offset([for(i = face) points[i]], -outer_thickness)
|
||||||
];
|
];
|
||||||
|
|
||||||
face_inner_pts = [
|
face_inner_pts = [
|
||||||
@@ -108,7 +108,8 @@ module polyhedron_frame(points, faces, deep, thickness) {
|
|||||||
];
|
];
|
||||||
offset_face_inner_pts = [
|
offset_face_inner_pts = [
|
||||||
for(face = faces)
|
for(face = faces)
|
||||||
reverse(convex_offset([for(i = face) inner_pts[i]], -thickness))
|
inner_thickness == 0 ? reverse([for(i = face) inner_pts[i]]) :
|
||||||
|
reverse(convex_offset([for(i = face) inner_pts[i]], -inner_thickness))
|
||||||
];
|
];
|
||||||
|
|
||||||
outer = hollow_faces(face_pts, offset_face_pts);
|
outer = hollow_faces(face_pts, offset_face_pts);
|
||||||
|
Reference in New Issue
Block a user