mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-23 07:13:51 -05:00
rounded_retangle() centre now defaults to false.
This commit is contained in:
parent
491d85156c
commit
d75aff2ccd
@ -116,10 +116,10 @@ module MT3608_carrier_stl() { //! Generate the STL for an MT3608 carrier, two re
|
||||
difference() {
|
||||
hull() {
|
||||
translate([offset, 0, height - eps / 2])
|
||||
rounded_rectangle([width, pcb_width - 2, eps], 1);
|
||||
rounded_rectangle([width, pcb_width - 2, eps], 1, true);
|
||||
|
||||
translate_z(eps / 2)
|
||||
rounded_rectangle([width, pcb_width - 2, eps], 1);
|
||||
rounded_rectangle([width, pcb_width - 2, eps], 1, true);
|
||||
}
|
||||
for(side = [-1, 1])
|
||||
hull() {
|
||||
|
@ -6239,7 +6239,7 @@ Rectangle with rounded corners.
|
||||
| `rounded_cube_xy(size, r = 0, xy_center = false, z_center = false)` | Like `cube()` but corners rounded in XY plane and separate centre options for xy and z. |
|
||||
| `rounded_cube_xz(size, r = 0, xy_center = false, z_center = false)` | Like `cube()` but corners rounded in XZ plane and separate centre options for xy and z. |
|
||||
| `rounded_cube_yz(size, r = 0, xy_center = false, z_center = false)` | Like `cube()` but corners rounded in YX plane and separate centre options for xy and z. |
|
||||
| `rounded_rectangle(size, r, center = true, xy_center = true)` | Like `cube()` but corners rounded in XY plane and separate centre options for xy and z. |
|
||||
| `rounded_rectangle(size, r, center = false, xy_center = true)` | Like `cube()` but corners rounded in XY plane and separate centre options for xy and z. |
|
||||
| `rounded_square(size, r, center = true)` | Like `square()` but with with rounded corners |
|
||||
|
||||
![rounded_rectangle](tests/png/rounded_rectangle.png)
|
||||
|
@ -46,7 +46,7 @@ module widget(thickness) {
|
||||
module widget_stl() {
|
||||
stl("widget")
|
||||
union() {
|
||||
rounded_rectangle([30, 30, 3], 2);
|
||||
rounded_rectangle([30, 30, 3], 2, true);
|
||||
|
||||
render() insert_boss(insert, height, 2.2);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ module horiholes_stl(t = thickness) {
|
||||
}
|
||||
if(t == thickness)
|
||||
translate([length / 2, 0])
|
||||
rounded_rectangle([length + 2 * overlap_x, thickness + 2 * overlap_y, 2], 5);
|
||||
rounded_rectangle([length + 2 * overlap_x, thickness + 2 * overlap_y, 2], 5, true);
|
||||
}
|
||||
|
||||
module horiholes() {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 40 KiB |
@ -27,7 +27,7 @@ module rounded_square(size, r, center = true) //! Like `square()` but with with
|
||||
offset(r) offset(-r) square(size, center = center);
|
||||
}
|
||||
|
||||
module rounded_rectangle(size, r, center = true, xy_center = true) //! Like `cube()` but corners rounded in XY plane and separate centre options for xy and z.
|
||||
module rounded_rectangle(size, r, center = false, xy_center = true) //! Like `cube()` but corners rounded in XY plane and separate centre options for xy and z.
|
||||
{
|
||||
extrude_if(size.z, center = center)
|
||||
rounded_square([size.x, size.y], r, xy_center);
|
||||
|
@ -62,7 +62,7 @@ module sk_bracket(type) { //! SK shaft support bracket
|
||||
}
|
||||
for(x = [W / 2 - 2 * fillet, -W / 2 + 2 * fillet])
|
||||
translate([x, G / 2, 0])
|
||||
rounded_rectangle([4 * fillet, G, L], fillet);
|
||||
rounded_rectangle([4 * fillet, G, L], fillet, true);
|
||||
}
|
||||
|
||||
translate([0, -h, -L /2])
|
||||
|
@ -56,10 +56,10 @@ module transformer(type) { //! Draw specified transformer
|
||||
|
||||
}
|
||||
|
||||
color("white") {
|
||||
color("white")
|
||||
translate_z(tx_lamination_height(type) / 2 + tx_bobbin_offset(type) / 2)
|
||||
rounded_rectangle([tx_bobbin_width(type), tx_depth(type), tx_bobbin_height(type)], r = tx_bobbin_radius(type));
|
||||
}
|
||||
rounded_rectangle([tx_bobbin_width(type), tx_depth(type), tx_bobbin_height(type)], tx_bobbin_radius(type), true);
|
||||
|
||||
terminal_height = tx_height(type) - tx_lamination_height(type);
|
||||
|
||||
if(terminal_height)
|
||||
|
Loading…
Reference in New Issue
Block a user