This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fn = 90; | |
control_points = [[0, 0], [10, 0], [20, 20], [30, 00], [40, 0]]; | |
function line(end_points, t) = end_points[0]+t*(end_points[1]-end_points[0]); | |
function bezier(control_points, t) = len(control_points) == 2 ? | |
line(control_points, t) : | |
bezier([ | |
for (i = [0: len(control_points)-2]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.10 | |
from argparse import ArgumentParser, Action, FileType, ArgumentError, ArgumentTypeError, Namespace | |
from logging import debug, info, warning, error, exception | |
from logging import DEBUG, INFO, WARNING, ERROR | |
from coloredlogs import install as color_log | |
def parse_arguments(): | |
parser = ArgumentParser( | |
description="", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
nixpkgs_rev = "51063ed4f2343a59fdeebb279bb81d87d453942b"; # nixos-23-11 on 2024-03-13 | |
fenix_rev = "df74cae97f59a868ad355af6a703e7845d0ae648"; # main on 2024-03-13 | |
in | |
{ pkgs ? import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/${nixpkgs_rev}.tar.gz") { } | |
, fenix ? import (builtins.fetchTarball "https://github.com/nix-community/fenix/archive/${fenix_rev}.tar.gz") { } | |
}: | |
with pkgs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download the [CD image archive](https://archive.org/details/LegoLoco). | |
```shell | |
# Turn into iso | |
bchunk Lego\ Loco.bin Lego\ Loco.cue Lego_Loco | |
# Turn iso into loop device and mount | |
udisksctl loop-setup -r -f Lego_Loco.iso01.iso | |
udisksctl mount -b /dev/loop0 | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fn = 90; | |
function base_face (D_maj, H) = [for(angle = [0: 360/$fn: 360-360/$fn]) [ | |
cos(angle)*(D_maj/2 + H/8 - abs((angle-180)/180* H)), | |
sin(angle)*(D_maj/2 + H/8 - abs((angle-180)/180* H)) | |
]]; | |
module rod(D_maj = 8, P = 1.25, h = 20) { | |
H = P * sin(60); | |
/* linear extude thread */ |
OlderNewer