mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-23 07:13:51 -05:00
Removed redundant rounded_rectangle center = false.
This commit is contained in:
parent
d75aff2ccd
commit
f573a91a09
@ -227,7 +227,7 @@ module box_bezel(type, bottom) { //! Generates top and bottom bezel STLs
|
||||
translate_z(-box_profile_overlap(type)) difference() {
|
||||
tw = w + 2 * outset;
|
||||
td = d + 2 * outset;
|
||||
rounded_rectangle([tw, td, feet ? foot_height : height], box_corner_rad(type), false);
|
||||
rounded_rectangle([tw, td, feet ? foot_height : height], box_corner_rad(type));
|
||||
//
|
||||
// Remove edges between the feet
|
||||
//
|
||||
@ -264,7 +264,7 @@ module box_bezel(type, bottom) { //! Generates top and bottom bezel STLs
|
||||
// recess for top / bottom panel
|
||||
//
|
||||
translate_z(cgap)
|
||||
rounded_rectangle([w + bezel_clearance, d + bezel_clearance, height], inner_r + bezel_clearance / 2, false);
|
||||
rounded_rectangle([w + bezel_clearance, d + bezel_clearance, height], inner_r + bezel_clearance / 2);
|
||||
//
|
||||
// leave plastic over the corner profiles
|
||||
//
|
||||
|
@ -44,7 +44,7 @@ module door_latch_stl() { //! Generates the STL for the printed part
|
||||
difference() {
|
||||
union() {
|
||||
hull() {
|
||||
rounded_rectangle([length, width, thickness - tan(30) * (width - ridge) / 2], rad, center = false);
|
||||
rounded_rectangle([length, width, thickness - tan(30) * (width - ridge) / 2], rad);
|
||||
|
||||
translate_z(thickness / 2)
|
||||
cube([length, ridge, thickness], center = true);
|
||||
|
@ -182,7 +182,7 @@ module pbox(type) { //! Generate the STL for the main case
|
||||
if(ledge_h)
|
||||
translate_z(top_thickness + height - ledge_h)
|
||||
difference() {
|
||||
rounded_rectangle([pbox_width(type) + 2 * outset, pbox_depth(type) + 2 * outset, ledge_h], 1, center = false);
|
||||
rounded_rectangle([pbox_width(type) + 2 * outset, pbox_depth(type) + 2 * outset, ledge_h], 1);
|
||||
|
||||
hull() {
|
||||
linear_extrude(ledge_h + eps)
|
||||
|
@ -110,7 +110,7 @@ module psu_shroud(type, cable_d, name, cables = 1) { //! Generate the STL file f
|
||||
stl(str("psu_shroud_", name)) {
|
||||
// base and sides
|
||||
translate([centre_x, -centre_y]) {
|
||||
rounded_rectangle([depth - eps, width - eps, top], rad, center = false);
|
||||
rounded_rectangle([depth - eps, width - eps, top], rad);
|
||||
|
||||
linear_extrude(height)
|
||||
difference() {
|
||||
|
@ -71,7 +71,7 @@ module ssr_shroud(type, cable_d, name) { //! Generate the STL file for a spec
|
||||
stl(str("ssr_shroud_", name)) {
|
||||
// base and sides
|
||||
translate([center_x, 0]) {
|
||||
rounded_rectangle([depth - eps, width - eps, top], rad, center = false);
|
||||
rounded_rectangle([depth - eps, width - eps, top], rad);
|
||||
|
||||
linear_extrude(height) difference() {
|
||||
round(or = wall / 2 - eps, ir = 0) difference() {
|
||||
|
@ -31,15 +31,15 @@ module rounded_right_triangle(x, y, z, fillet, center = true, offset = false) {
|
||||
hull() {
|
||||
translate([0, fillet, size.z / 2])
|
||||
rotate([90, 90, 0])
|
||||
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, center = false, xy_center = false);
|
||||
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, xy_center = false);
|
||||
translate([0, size.y, size.z / 2])
|
||||
rotate([90, 90, 0])
|
||||
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, center = false, xy_center = false);
|
||||
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, xy_center = false);
|
||||
translate([fillet, 0, size.z / 2])
|
||||
rotate([0, 90, 0])
|
||||
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, center = false, xy_center = false);
|
||||
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, xy_center = false);
|
||||
translate([size.x, 0, size.z / 2])
|
||||
rotate([0, 90, 0])
|
||||
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, center = false, xy_center = false);
|
||||
rounded_rectangle([size.z, 2 * fillet, eps], fillet - eps, xy_center = false);
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ module battery_contact(type, pos = true) { //! Draw a positive or negative batte
|
||||
t = contact_thickness(type);
|
||||
|
||||
color("silver") {
|
||||
rounded_rectangle([contact_width(type), h, t], r = 1, center = false);
|
||||
rounded_rectangle([contact_width(type), h, t], r = 1);
|
||||
|
||||
translate([0, -h / 2, t])
|
||||
rotate([90, 0, 0])
|
||||
|
@ -47,7 +47,7 @@ module square_button(type, colour = "yellow") { //! Draw square button with spec
|
||||
stem = square_button_cap_stem(type);
|
||||
|
||||
color(grey(20)) {
|
||||
rounded_rectangle([w, w, h - 0.5], r = wall, center = false);
|
||||
rounded_rectangle([w, w, h - 0.5], r = wall);
|
||||
|
||||
for(x = [-1, 1], y = [-1, 1])
|
||||
translate([x * pitch, y * pitch])
|
||||
|
@ -37,7 +37,7 @@ module camera_lens(type, offset = 0, show_lens = true) //! Draw the lens stack,
|
||||
r = p[1] + offset;
|
||||
app = p[2];
|
||||
if(size.x)
|
||||
rounded_rectangle(size + [2 * offset, 2 * offset, round_to_layer(offset)], r, center = false);
|
||||
rounded_rectangle(size + [2 * offset, 2 * offset, round_to_layer(offset)], r);
|
||||
else
|
||||
if (show_lens)
|
||||
translate_z(size.y)
|
||||
@ -72,7 +72,7 @@ module camera(type, show_lens = true) { //! Draw specified PCB camera
|
||||
pos = camera_connector_pos(type);
|
||||
color(grey(20))
|
||||
translate(pos)
|
||||
rounded_rectangle(conn, 0.5, center = false);
|
||||
rounded_rectangle(conn, 0.5);
|
||||
|
||||
flex = [5, 0.1];
|
||||
color("orange")
|
||||
|
@ -326,7 +326,7 @@ module panel_USBA() { //! Draw a panel mount USBA connector
|
||||
dx = (length2 / 2 - r2);
|
||||
dy = (width / 2 - r1);
|
||||
translate_z(l)
|
||||
rounded_rectangle([length2, width, 1], r = r1, center = false);
|
||||
rounded_rectangle([length2, width, 1], r = r1);
|
||||
|
||||
translate([-dx, -dy, height2 - r2])
|
||||
rotate([90, 0, 0])
|
||||
|
@ -80,7 +80,7 @@ module display(type) { //! Draw specified display
|
||||
translate_z(display_ts_thickness(type)) {
|
||||
difference() {
|
||||
color("silver")
|
||||
rounded_rectangle([w, h, t], 0.5, center = false);
|
||||
rounded_rectangle([w, h, t], 0.5);
|
||||
|
||||
color("black")
|
||||
translate([aperture[0].x, aperture[0].y, - eps])
|
||||
|
@ -59,7 +59,7 @@ module panel_meter_button(type) { //! Draw panel meter button
|
||||
color(pmeter_button_colour(type))
|
||||
translate(pmeter_button_pos(type))
|
||||
if(size.x)
|
||||
rounded_rectangle(pmeter_button_size(type), r, center = false);
|
||||
rounded_rectangle(pmeter_button_size(type), r);
|
||||
else
|
||||
cylinder(r = r, h = size.z);
|
||||
}
|
||||
@ -93,8 +93,8 @@ module panel_meter(type) { //! Draw panel mounted LCD meter module
|
||||
difference() {
|
||||
if(is_list(bevel))
|
||||
hull() {
|
||||
rounded_rectangle([bezel.x - 2 * bevel.x, bezel.y - 2 * bevel.x, bezel.z], r - bevel.x, center = false);
|
||||
rounded_rectangle([bezel.x, bezel.y, bevel[1]], r, center = false);
|
||||
rounded_rectangle([bezel.x - 2 * bevel.x, bezel.y - 2 * bevel.x, bezel.z], r - bevel.x);
|
||||
rounded_rectangle([bezel.x, bezel.y, bevel[1]], r);
|
||||
}
|
||||
else
|
||||
hull() {
|
||||
@ -111,7 +111,7 @@ module panel_meter(type) { //! Draw panel mounted LCD meter module
|
||||
cube([ap.x + ap.z, ap.y + ap.z, eps], center = true);
|
||||
|
||||
translate_z(bezel.z + eps)
|
||||
rounded_rectangle([ap.x, ap.y, bezel.z * 2], r, center = true);
|
||||
rounded_rectangle([ap.x, ap.y, bezel.z * 2], r, true);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@ -126,7 +126,7 @@ module usb_A(h, v_flange_l, bar, cutout) {
|
||||
if(cutout)
|
||||
rotate([90, 0, 90])
|
||||
rounded_rectangle([w + 2 * v_flange_h + 2 * panel_clearance,
|
||||
h + 2 * h_flange_h + 2 * panel_clearance, 100], r = cnc_bit_r, center = false);
|
||||
h + 2 * h_flange_h + 2 * panel_clearance, 100], r = cnc_bit_r);
|
||||
else {
|
||||
color("silver") rotate([0, 90, 0]) {
|
||||
linear_extrude(l, center = true)
|
||||
|
@ -62,7 +62,7 @@ module ziptie(type, r, t = 0) //! Draw specified ziptie wrapped around radius `r
|
||||
translate([lx, -r])
|
||||
rotate([90, 0, 0])
|
||||
union() {
|
||||
rounded_rectangle(latch, 0.5, center = false);
|
||||
rounded_rectangle(latch, 0.5);
|
||||
|
||||
translate_z((latch.z + 1) / 2)
|
||||
cube([ziptie_thickness(type), ziptie_width(type), latch.z + 1], center = true);
|
||||
|
Loading…
Reference in New Issue
Block a user