Skip to content

Commit

Permalink
Merge pull request #7 from jsconan/release-0.3.0
Browse files Browse the repository at this point in the history
Release 0.3.0
  • Loading branch information
jsconan authored Jan 7, 2022
2 parents f69b6c8 + 2d59799 commit bc6f7ab
Show file tree
Hide file tree
Showing 59 changed files with 1,291 additions and 301 deletions.
17 changes: 17 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# rc-tracks history

## [Version 0.3.0](https://github.com/jsconan/rc-tracks/releases/tag/0.3.0)

Improved design of the race track system for 1/24 to 1/32 scale RC cars.

- The file structure has been updated.
- A new kind of barrier has been added, defining a unibody variant: each track element is built from a single piece instead of 3.
- The render script has been reworked, adding more options
- The track can now have curves that are not directly related to the width lanes
- Add wavy flags in the set of accessories

---

Notes:

- Import from the repository [jsconan/things](https://github.com/jsconan/things)
- Extract of the pull request https://github.com/jsconan/things/pull/46

## [Version 0.2.0](https://github.com/jsconan/rc-tracks/releases/tag/0.2.0)

Improved design of the race track system for 1/24 to 1/32 scale RC cars.
Expand Down
7 changes: 4 additions & 3 deletions rcmodels/tracks/config/config.scad
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @author jsconan
*/

projectVersion = "0.2.0";
projectVersion = "0.3.0";

// We will render the object using the specifications of this mode
renderMode = MODE_PROD;
Expand All @@ -39,8 +39,9 @@ nozzleWidth = 0.4; // The size of the print nozzle
printTolerance = 0.1; // The print tolerance when pieces need to be assembled

// The dimensions and constraints of a track element
trackSectionSize = 100; // The nominal size of a track element: the length for straight element, or the radius for a curved element
trackLaneWidth = 400; // The width of track lane, i.e. the distance between the barriers
trackSectionLength = 100; // The nominal length of a track element: the length for straight element, or the radius for a curved element
trackSectionWidth = 400; // The virtual width of a track lane: this will condition the outer radius for a curved element (i.e. the width used to compute the outer radius)
trackLaneWidth = 600; // The actual width of a track lane: the distance between the barriers (i.e. the width of the physical track lanes)
trackRadius = 200; // The radius of the track inner curve
barrierHeight = 30; // The height of the barrier, including the holders
barrierHolderBase = 2; // The base unit value used to design the barrier holder
Expand Down
5 changes: 3 additions & 2 deletions rcmodels/tracks/config/print.scad
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ include <setup.scad>

// Show the values
printConfig(
length = trackSectionSize,
width = trackLaneWidth,
length = trackSectionLength,
width = trackSectionWidth,
lane = trackLaneWidth,
height = barrierHeight,
radius = trackRadius,
base = barrierHolderBase
Expand Down
6 changes: 4 additions & 2 deletions rcmodels/tracks/config/setup.scad
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ include <../shapes/fragments.scad>
include <../shapes/straight.scad>
include <../shapes/curved.scad>
include <../shapes/uturn.scad>
include <../shapes/special.scad>
include <../shapes/accessories.scad>

// Validate the config against the constraints
validateConfig(
length = trackSectionSize,
width = trackLaneWidth,
length = trackSectionLength,
width = trackSectionWidth,
lane = trackLaneWidth,
height = barrierHeight,
radius = trackRadius,
base = barrierHolderBase
Expand Down
54 changes: 45 additions & 9 deletions rcmodels/tracks/config/values.scad
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,32 @@ function getBarrierHolderTopWidth(base, thickness) = nozzleAligned((getBarrierLi
*/
function getBarrierHolderHeight(base) = getBarrierStripHeight(base) + minThickness + printResolution;

/**
* Computes the height of the link for a barrier holder.
* @param Number base - The base unit value used to design the barrier holder.
* @returns Number
*/
function getBarrierHolderLinkHeight(base) = getBarrierHolderHeight(base) - base;

/**
* Computes the outer width of a unibody barrier.
* @param Number base - The base unit value used to design the barrier holder.
* @returns Number
*/
function getBarrierUnibodyWidth(base) = getBarrierHolderWidth(base) + base;

/**
* Computes the height of the link for a unibody barrier.
* @param Number height - The height of the barrier.
* @param Number base - The base unit value used to design the barrier holder.
* @returns Number
*/
function getBarrierUnibodyLinkHeight(height, base) = height - getBarrierHolderHeight(base) - base;

/**
* Computes the inner height of the barrier body, between the barrier holders.
* @param Number height - The height of the barrier.
* @param Number base - The base unit value used to design the barrier holder.
* @returns Number
*/
function getBarrierBodyInnerHeight(height, base) = height - (getBarrierStripHeight(base) + minThickness) * 2;
Expand Down Expand Up @@ -177,7 +200,7 @@ function getInnerCurveRatio(length, radius) = radius / length;
/**
* Computes the ratio of the outer curve with respect to the track width.
* @param Number length - The nominal size of a track element.
* @param Number width - The width of track lane.
* @param Number width - The width of a track lane.
* @param Number radius - The radius of the track inner curve.
* @returns Number
*/
Expand Down Expand Up @@ -208,12 +231,13 @@ function getMastRadius(width) = circumradius(n = mastFacets, a = width / 2);
/**
* Validates the config values, checking if it match the critical constraints.
* @param Number length - The nominal size of a track element.
* @param Number width - The width of track lane.
* @param Number width - The virtual width of a track lane (i.e. the width used to compute the outer radius).
* @param Number lane - The actual width of a track lane (i.e. the width of the physical track lanes).
* @param Number height - The height of the barrier.
* @param Number radius - The radius of the track inner curve.
* @param Number base - The base unit value used to design the barrier holder.
*/
module validateConfig(length, width, height, radius, base) {
module validateConfig(length, width, lane, height, radius, base) {
assert(
length >= getMinLength(base),
str(
Expand All @@ -234,15 +258,23 @@ module validateConfig(length, width, height, radius, base) {
);
assert(
width >= length,
"The width of the track must be greater or equal than the length of one element!"
"The virtual width of the track must be greater or equal than the length of one element!"
);
assert(
lane >= length && lane >= width,
"The actual width of the track must be greater or equal than the length of one element and than the virtual width as well!"
);
assert(
radius >= length,
"The radius of the track inner curve must be greater or equal than the length of one element!"
);
assert(
width % length == 0,
"The width of the track must be a multiple of the length of one element!"
"The virtual width of the track must be a multiple of the length of one element!"
);
assert(
lane % length == 0,
"The actual width of the track must be a multiple of the length of one element!"
);
assert(
radius % length == 0,
Expand All @@ -253,12 +285,13 @@ module validateConfig(length, width, height, radius, base) {
/**
* Prints the config values.
* @param Number length - The nominal size of a track element.
* @param Number width - The width of track lane.
* @param Number width - The virtual width of a track lane (i.e. the width used to compute the outer radius).
* @param Number lane - The actual width of a track lane (i.e. the width of the physical track lanes).
* @param Number height - The height of the barrier.
* @param Number radius - The radius of the track inner curve.
* @param Number base - The base unit value used to design the barrier holder.
*/
module printConfig(length, width, height, radius, base) {
module printConfig(length, width, lane, height, radius, base) {
innerCurveRatio = getInnerCurveRatio(length, radius);
outerCurveRatio = getOuterCurveRatio(length, width, radius);
echo(join([
Expand All @@ -267,9 +300,10 @@ module printConfig(length, width, height, radius, base) {
str("Version: ", projectVersion),
str("-- Track elements -------------"),
str("Track section length: ", length / 10, "cm"),
str("Track lane width: ", width / 10, "cm"),
str("Track inner radius: ", radius / 10, "cm"),
str("Curve section length: ", getCurveLength(length) / 10, "cm"),
str("Virtual lane width: ", width / 10, "cm"),
str("Actual lane width: ", lane / 10, "cm"),
str("Track inner radius: ", radius / 10, "cm"),
str("Inner curve ratio: ", innerCurveRatio),
str("Inner curve angle: ", getCurveAngle(innerCurveRatio), "°"),
str("Outer curve ratio: ", outerCurveRatio),
Expand All @@ -279,6 +313,8 @@ module printConfig(length, width, height, radius, base) {
str("Barrier base value: ", base, "mm"),
str("Barrier holder width: ", getBarrierHolderWidth(base), "mm"),
str("Barrier holder height: ", getBarrierHolderHeight(base), "mm"),
str("Unibody barrier width: ", getBarrierUnibodyWidth(base), "mm"),
str("Unibody barrier height:", height, "mm"),
str("-- Track samples --------------"),
str("Size of samples: ", sampleSize, "mm"),
str("Base of samples: ", sampleBase, "mm"),
Expand Down
45 changes: 45 additions & 0 deletions rcmodels/tracks/parts/accessories/flag-straight.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* @license
* GPLv3 License
*
* Copyright (c) 2020 Jean-Sebastien CONAN
*
* This file is part of jsconan/things.
*
* jsconan/things is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* jsconan/things is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with jsconan/things. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* A race track system for 1/24 to 1/32 scale RC cars.
*
* A straight flag to clip onto the barrier holders.
*
* @author jsconan
*/

// Import the project's setup.
include <../../config/setup.scad>

// Sets the minimum facet angle and size using the defined render mode.
applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
accessoryFlag(
width = flagWidth,
height = flagHeight,
thickness = flagThickness,
mast = mastWidth,
wave = 0
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* A race track system for 1/24 to 1/32 scale RC cars.
*
* A flag to clip onto the barrier holders.
* A wavy flag to clip onto the barrier holders.
*
* @author jsconan
*/
Expand All @@ -39,7 +39,7 @@ applyMode(mode=renderMode) {
width = flagWidth,
height = flagHeight,
thickness = flagThickness,
ring = mastWidth,
mast = mastWidth
mast = mastWidth,
wave = 2
);
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
curvedBarrierHolder(
length = trackSectionSize,
length = trackSectionLength,
thickness = barrierBodyThickness,
base = barrierHolderBase,
ratio = getInnerCurveRatio(trackSectionSize, trackRadius),
ratio = getInnerCurveRatio(trackSectionLength, trackRadius),
right = rightOriented
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
curvedBarrierHolder(
length = trackSectionSize,
length = trackSectionLength,
thickness = barrierBodyThickness,
base = barrierHolderBase,
ratio = getOuterCurveRatio(trackSectionSize, trackLaneWidth, trackRadius),
ratio = getOuterCurveRatio(trackSectionLength, trackSectionWidth, trackRadius),
right = rightOriented
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
curvedBarrierHolder(
length = trackSectionSize,
length = trackSectionLength,
thickness = barrierBodyThickness,
base = barrierHolderBase,
ratio = .5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
curvedBarrierHolder(
length = trackSectionSize,
length = trackSectionLength,
thickness = barrierBodyThickness,
base = barrierHolderBase,
ratio = 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
uTurnBarrierHolder(
length = trackSectionSize,
length = trackSectionLength,
height = barrierHeight,
thickness = barrierBodyThickness,
base = barrierHolderBase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,17 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
distribute([0, getBarrierHolderWidth(barrierHolderBase) * 2, 0], center=true) {
archTower(
length = trackSectionSize,
archTowerMale(
length = trackSectionLength,
thickness = barrierBodyThickness,
base = barrierHolderBase,
wall = archTowerThickness,
right = false
wall = archTowerThickness
);
archTower(
length = trackSectionSize,
archTowerFemale(
length = trackSectionLength,
thickness = barrierBodyThickness,
base = barrierHolderBase,
wall = archTowerThickness,
right = true
wall = archTowerThickness
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
barrierBody(
length = getCurveRemainingLength(trackSectionSize),
length = getCurveRemainingLength(trackSectionLength),
height = getBarrierBodyHeight(barrierHeight),
thickness = barrierBodyThickness,
base = barrierHolderBase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
barrierBody(
length = trackSectionSize,
length = trackSectionLength,
height = getBarrierBodyHeight(barrierHeight),
thickness = barrierBodyThickness,
base = barrierHolderBase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
uTurnCompensationBarrierBody(
length = trackSectionSize,
length = trackSectionLength,
height = getBarrierBodyHeight(barrierHeight),
thickness = barrierBodyThickness,
base = barrierHolderBase,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
straightBarrierHolder(
length = trackSectionSize,
length = trackSectionLength,
thickness = barrierBodyThickness,
base = barrierHolderBase,
ratio = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
straightBarrierHolder(
length = trackSectionSize,
length = trackSectionLength,
thickness = barrierBodyThickness,
base = barrierHolderBase,
ratio = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ applyMode(mode=renderMode) {
// Uncomment the next line to cut a sample from the object
//sample(size=[DEFAULT_BUILD_PLATE_SIZE, DEFAULT_BUILD_PLATE_SIZE, 5], offset=[0, 0, 0])
curvedBarrierMain(
length = sampleSize * getInnerCurveRatio(trackSectionSize, trackRadius),
length = sampleSize * getInnerCurveRatio(trackSectionLength, trackRadius),
thickness = barrierBodyThickness,
base = sampleBase,
ratio = 1,
Expand Down
Loading

0 comments on commit bc6f7ab

Please sign in to comment.