Crates.io | gcad_proc_macros |
lib.rs | gcad_proc_macros |
version | 0.3.0 |
source | src |
created_at | 2022-09-10 02:57:38.25992 |
updated_at | 2023-04-23 19:04:26.165865 |
description | A simple CAD/CAM scripting language |
homepage | |
repository | https://github.com/fpgaminer/gcad |
max_upload_size | |
id | 662213 |
size | 5,277 |
WARNING: WIP
A scripting language inspired by OpenSCAD for making quick and dirty CNC programs. Want to make a quick set of counterbored holes? Here's an example:
board_thickness = 12.2mm;
board_height = 812.5mm - 6.35mm/2;
board_width = 5in;
cutter_diameter(6.35mm);
material('BALTIC_BIRCH_PLYWOOD');
comment('Holes for threaded inserts for ceiling brackets');
for y in linspace(1.5in, board_height - 1.5in, 2) {
for x in linspace(3/4in, 3.25in, 2) {
comment('Counterbore');
circle_pocket(x, y, radius=6.35mm, depth=3mm);
comment('Threaded insert hole');
circle_pocket(x, y, radius=4.75mm, depth=board_thickness);
}
}
// Hole which the LED strip wires pass through
material('ALUMINUM');
comment('LED strip wire hole');
drill(groove_x + groove_width / 2, board_height - 1mm, board_thickness);
Then: gcad -o output.nc input.gcad
Done!