gcad_proc_macros

Crates.iogcad_proc_macros
lib.rsgcad_proc_macros
version0.3.0
sourcesrc
created_at2022-09-10 02:57:38.25992
updated_at2023-04-23 19:04:26.165865
descriptionA simple CAD/CAM scripting language
homepage
repositoryhttps://github.com/fpgaminer/gcad
max_upload_size
id662213
size5,277
(fpgaminer)

documentation

https://docs.rs/gcad

README

GCad

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!

Commit count: 26

cargo fmt