diff --git a/readme.md b/readme.md index 01dd621..93891e3 100644 --- a/readme.md +++ b/readme.md @@ -24,28 +24,28 @@ A list of changes classified as breaking, additions or fixes is maintained in [C 7_segments IECs Radials Box Annotation BOM Antennas Inserts Rails Butt_box Bezier Clip Axials Jack Ring_terminals Cable_clip Catenary Global - BLDC_motors LDRs Rockers Cable_grommets Core_xy Polyholes - Ball_bearings LED_meters Rod Camera_housing Dimension Rounded_rectangle - Batteries LEDs Rod_ends Carriers Dogbones Sphere - Bearing_blocks Leadnuts SBR_rails Corner_block Fillet Teardrops - Belts Light_strips SK_brackets Door_hinge Gears - Blowers Linear_bearings SMDs Door_latch Hanging_hole - Box_sections Magnets SSRs Drag_chain Horiholes - Bulldogs Mains_sockets Screws Fan_guard Layout - Buttons Microswitches Sealing_strip Fixing_block Maths - Cable_strips Microview Servo_motors Flat_hinge Offset - Cameras Modules Shaft_couplings Foot PCB_utils - Circlips Nuts Sheets Handle Quadrant - Components O_ring Spades Knob Round - DIP Opengrab Spools LED_bezel Rounded_cylinder - D_connectors PCB Springs PCB_mount Rounded_polygon - Displays PCBs Stepper_motors PSU_shroud Rounded_triangle - Extrusion_brackets PSUs Swiss_clips Pocket_handle Sector - Extrusions Panel_meters Terminals Press_fit Splines - Fans Photo_interrupters Toggles Printed_box Sweep - Fastons Pillars Transformers Printed_pulleys Thread - Fuseholder Pillow_blocks Ttracks Ribbon_clamp Tube - Gear_motors Pin_headers Tubings SSR_shroud + BLDC_motors LDRs Rockers Cable_grommets Chamfer Polyholes + Ball_bearings LED_meters Rod Camera_housing Core_xy Rounded_rectangle + Batteries LEDs Rod_ends Carriers Dimension Sphere + Bearing_blocks Leadnuts SBR_rails Corner_block Dogbones Teardrops + Belts Light_strips SK_brackets Door_hinge Fillet + Blowers Linear_bearings SMDs Door_latch Gears + Box_sections Magnets SSRs Drag_chain Hanging_hole + Bulldogs Mains_sockets Screws Fan_guard Horiholes + Buttons Microswitches Sealing_strip Fixing_block Layout + Cable_strips Microview Servo_motors Flat_hinge Maths + Cameras Modules Shaft_couplings Foot Offset + Circlips Nuts Sheets Handle PCB_utils + Components O_ring Spades Knob Quadrant + DIP Opengrab Spools LED_bezel Round + D_connectors PCB Springs PCB_mount Rounded_cylinder + Displays PCBs Stepper_motors PSU_shroud Rounded_polygon + Extrusion_brackets PSUs Swiss_clips Pocket_handle Rounded_triangle + Extrusions Panel_meters Terminals Press_fit Sector + Fans Photo_interrupters Toggles Printed_box Splines + Fastons Pillars Transformers Printed_pulleys Sweep + Fuseholder Pillow_blocks Ttracks Ribbon_clamp Thread + Gear_motors Pin_headers Tubings SSR_shroud Tube Geared_steppers Potentiometers Variacs Screw_knob Green_terminals Pulleys Veroboard Socket_box HT_pipes Washers Strap_handle @@ -7182,6 +7182,27 @@ The coordinates of the lowest point on the curve can be retrieved by calling `ca ![catenary](tests/png/catenary.png) +Top + +--- + +## Chamfer +45 degree chamfer the entrance to holes. + +If the hole shape is concave then it must be described as a list of 2D convex children. + +[utils/chamfer.scad](utils/chamfer.scad) Implementation. + +[tests/chamfer.scad](tests/chamfer.scad) Code for this example. + +### Modules +| Module | Description | +|:--- |:--- | +| `chamfer_hole(depth = 1)` | Chamfer a hole given a 2D outline as a child | + +![chamfer](tests/png/chamfer.png) + + Top --- diff --git a/tests/png/chamfer.png b/tests/png/chamfer.png new file mode 100644 index 0000000..5b538be Binary files /dev/null and b/tests/png/chamfer.png differ diff --git a/utils/chamfer.scad b/utils/chamfer.scad new file mode 100644 index 0000000..b0262cf --- /dev/null +++ b/utils/chamfer.scad @@ -0,0 +1,38 @@ +// +// NopSCADlib Copyright Chris Palmer 2024 +// nop.head@gmail.com +// hydraraptor.blogspot.com +// +// This file is part of NopSCADlib. +// +// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the +// GNU General Public License as published by the Free Software Foundation, either version 3 of +// the License, or (at your option) any later version. +// +// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along with NopSCADlib. +// If not, see . +// + +// +//! 45 degree chamfer the entrance to holes. +//! +//! If the hole shape is concave then it must be described as a list of 2D convex children. +// +include + +module chamfer_hole(depth = 1) { //! Chamfer a hole given a 2D outline as a child + for(i = [0 : $children - 1]) + hull() { + linear_extrude(eps) + offset(depth) + children(i); + + translate_z(-depth) + linear_extrude(eps) + children(i); + } +}