From 513243ccdb5ceff5e471bae812e4a45876d1c9c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Sun, 25 Feb 2024 16:27:34 +0100 Subject: [PATCH] feat: more stuff --- README.md | 30 ++++++++++++++++++++++++++++-- track.scad | 28 ++++++++++++++++------------ 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index dde8915..48356ce 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ but these are the original tracks you can replicate | Straight Quarter | ✓ | | | | Straight 4-studs | ✓ | ~10ct | 15m | | Curve Long | ✓ | | | -| Curve Short Left | ❌ | | | -| Curve Short Right | ❌ | | | +| Curve Short Left | ⚠️ | | | +| Curve Short Right | ⚠️ | | | | Ramp Upper Part | ❌ | | | | Ramp Lower Part | ❌ | | | | Monoswitch | ❌ | | | @@ -32,8 +32,34 @@ a 1x2 plate, which you can fit there for the same effect. The monorail tracks are also solid now, which is not something you can do in injection molding but leaves a really nice surface finish at the bottom of the rail for us. +For now, I also use non-baseplate aligned joints for curves. While this means you can't just snap the rails +on a baseplate, it enables you to use straight rails at non-90 degree angles which I think is an absolute +win over the original design since the 45 degree curves are useless outside of joining them with switches. + _These are 3d printing optimized, compatible rails, not replicas. Replicas print horribly due to support._ +### Optional Differences + +#### Operating on r25 instead of r28 + +What difference do these three studs make? +With this radius we can take advantage of the pythagorean triples `3/4/5` and `7/24/25` to stay on the stud +grid with turntables. + +- Curve C15 +- Curve C7 +- Straight S21 +- Straight S7 +- Straight S6 + +Two C15 and one C7 make exactly a 90 degree turn, where every part stays on the stud grid. + +An s-curve with C7 moves two studs, and can be extended by 1 stud +with S7 or 3 studs with S21. + +An s-curve with C15 moves over 20 studs, and can be extended by 8 studs +with S6 or 28 studs with S21 straights. + ## Printing To be compatible with standard bricks, the following print settings are strongly advised diff --git a/track.scad b/track.scad index d7db113..ca90706 100644 --- a/track.scad +++ b/track.scad @@ -1,19 +1,23 @@ include ; include ; +/* [Print Settings] */ +// Some feature are generated with respect to the layer height +LayerHeight = 0.2; // [0.1,0.13,0.2] // Enable built-in support for 3d printing -Support=true; -// Supports are generated with respect to the layer height -LayerHeight=0.2; // [0.05,0.1,0.2] - +Support = true; +/* [Model Settings] */ // Only applies to straight tracks -Length=8; // [4:1:56] +Length = 8; // [4:1:56] // Only applies to curves -Radius=28; // [4:1:36] -// The angle at the y- axis -StartAngle=45; // [0:15:90] -// The angle at the y+ axis -EndAngle=0; // [0:15:90] +Radius = 28; // [4:1:36] +// TODO: Incline of the track +Incline = 0; // [-10:1:10] +AlignInclineToBaseplate = true; +// The angle the track takes +Angle = 0.0; +// Useful when working with Pythagorean Triples +UseLengthForCurveAngle = true; module __CustomizerLimit__() {} @@ -167,10 +171,10 @@ module monorailStraight(l) { } } -if (EndAngle == 0 && StartAngle == 0) +if (Angle == 0) monorailStraight(l=Length); else - monorailCurve(Radius, sa=StartAngle, ea=EndAngle); + monorailCurve(Radius, sa=0, ea=UseLengthForCurveAngle ? asin(Length / Radius) : Angle); // endCapStraight(); // translate([28.75, -232, -5.75]) rotate([0, 0, 90]) import("straight.stl");