feat(cad): add the 3dfiles package and the original drive shaft mount
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
use flake ..#cad
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# pyright: reportUnusedCallResult=false, reportWildcardImportFromLibrary=false
|
||||||
|
from build123d import *
|
||||||
|
|
||||||
|
hole_offset = 20
|
||||||
|
hole_diameter = 22
|
||||||
|
|
||||||
|
width = 40
|
||||||
|
thickness = 20
|
||||||
|
|
||||||
|
assert (hole_offset - hole_diameter / 2) > 0
|
||||||
|
assert (width - hole_diameter) > 0
|
||||||
|
|
||||||
|
|
||||||
|
with BuildPart() as builder:
|
||||||
|
with BuildSketch() as sketch:
|
||||||
|
with BuildLine() as profile:
|
||||||
|
l1 = Polyline(
|
||||||
|
(0,0),
|
||||||
|
(width / 2, 0),
|
||||||
|
(width / 2, hole_offset)
|
||||||
|
)
|
||||||
|
l2 = CenterArc((0, hole_offset), width / 2, 90, -90)
|
||||||
|
mirror(profile.line, Plane.YZ)
|
||||||
|
make_face()
|
||||||
|
|
||||||
|
with Locations((0, hole_offset)):
|
||||||
|
Circle(hole_diameter / 2, mode=Mode.SUBTRACT)
|
||||||
|
|
||||||
|
extrude(amount=thickness / 2)
|
||||||
|
mirror(about=Plane.XY)
|
||||||
|
|
||||||
|
assert builder.part is not None
|
||||||
|
export_step(builder.part, "drive shaft mount.step")
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||||
imports = [
|
imports = [
|
||||||
project-templates.flakeModules.rust-esp32-c6
|
project-templates.flakeModules.rust-esp32-c6
|
||||||
|
project-templates.flakeModules.cad
|
||||||
];
|
];
|
||||||
|
|
||||||
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin"];
|
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin"];
|
||||||
@@ -37,6 +38,14 @@
|
|||||||
# runtimeDeps = with pkgs; [];
|
# runtimeDeps = with pkgs; [];
|
||||||
# buildDeps = with pkgs; [];
|
# buildDeps = with pkgs; [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
krantz.cad = {
|
||||||
|
enable = true;
|
||||||
|
builder = ./cad/build.py;
|
||||||
|
|
||||||
|
devShell.name = "cad";
|
||||||
|
package.name = "3dfiles";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user