Skip to content

Commit

Permalink
Merge pull request #9 from jsconan/release-0.4.0
Browse files Browse the repository at this point in the history
Release 0.4.0
  • Loading branch information
jsconan authored Jan 7, 2022
2 parents bc6f7ab + 17159bd commit effef40
Show file tree
Hide file tree
Showing 91 changed files with 5,053 additions and 584 deletions.
19 changes: 19 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# rc-tracks history

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

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

- Encapsulate the shapes into final modules
- Add sizing functions
- Add more printer constraints (size of the printer's plate)
- Add print plates for sets of elements
- The file structure has been updated.
- Add a special barrier connector to link barrier holders to unibody barriers (straight version only)
- The render script has been reworked, adding more options

---

Notes:

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

## [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.
Expand Down
8 changes: 6 additions & 2 deletions rcmodels/tracks/config/config.scad
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@
* @author jsconan
*/

projectVersion = "0.3.0";
projectVersion = "0.4.0";

// We will render the object using the specifications of this mode
renderMode = MODE_PROD;

// Defines the constraints of the printer.
printResolution = 0.2; // The target layer height
nozzleWidth = 0.4; // The size of the print nozzle
nozzleWidth = 0.4; // The size of the printer's nozzle
printTolerance = 0.1; // The print tolerance when pieces need to be assembled
printerLength = 250; // The length of the printer's build plate
printerWidth = 210; // The width of the printer's build plate

// The dimensions and constraints of a track element
trackSectionLength = 100; // The nominal length of a track element: the length for straight element, or the radius for a curved element
Expand All @@ -53,7 +55,9 @@ accessoryClipThickness = 0.8; // The thickness of the cable clip
cableClipWidth = 2; // The width of the cable clip
mastWidth = 3; // The width of the accessory mast
mastHeight = 70; // The length of the accessory mast
mastFacets = 8; // The number of facets the accessory mast have
flagWidth = 40; // The width of the accessory flag
flagHeight = 20; // The height of the accessory flag
flagThickness = 0.8; // The thickness of the accessory flag
rightOriented = false; // The orientation of the curved elements
printInterval = 5; // Interval between 2 pieces when presented together
39 changes: 33 additions & 6 deletions rcmodels/tracks/config/values.scad
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ function getBarrierNotchDistance(base, distance = 0) = (getBarrierLinkWidth(base
/**
* Computes the outer width of a barrier holder.
* @param Number base - The base unit value used to design the barrier holder.
* @param Number [distance] - An additional distance added to the outline of the barrier holder.
* @returns Number
*/
function getBarrierHolderWidth(base) = getBarrierLinkWidth(base, printTolerance) + minWidth * 4;
function getBarrierHolderWidth(base, distance = 0) = getBarrierLinkWidth(base, printTolerance) + minWidth * 4 + distance * 2;

/**
* Computes the top width of a barrier holder.
Expand All @@ -120,9 +121,10 @@ function getBarrierHolderTopWidth(base, thickness) = nozzleAligned((getBarrierLi
/**
* Computes the outer height of a barrier holder.
* @param Number base - The base unit value used to design the barrier holder.
* @param Number [distance] - An additional distance added to the outline of the barrier holder.
* @returns Number
*/
function getBarrierHolderHeight(base) = getBarrierStripHeight(base) + minThickness + printResolution;
function getBarrierHolderHeight(base, distance = 0) = getBarrierStripHeight(base) + minThickness + printResolution + distance * 2;

/**
* Computes the height of the link for a barrier holder.
Expand All @@ -134,9 +136,10 @@ 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.
* @param Number [distance] - An additional distance added to the outline of the barrier.
* @returns Number
*/
function getBarrierUnibodyWidth(base) = getBarrierHolderWidth(base) + base;
function getBarrierUnibodyWidth(base, distance = 0) = getBarrierHolderWidth(base) + base + distance * 2;

/**
* Computes the height of the link for a unibody barrier.
Expand Down Expand Up @@ -221,13 +224,37 @@ function getCurveRadius(length, ratio) = length * ratio;
*/
function getCurveAngle(ratio) = curveAngle / ratio;

/**
* Computes the rotation angle used to place a curve.
* @param Number angle - The angle of the curve.
* @returns Number
*/
function getCurveRotationAngle(angle) = 45 + (curveAngle - angle) / 2;

/**
* Computes the radius of the accessory mast.
* @param Number width - The width of the mast.
* @returns Number
*/
function getMastRadius(width) = circumradius(n = mastFacets, a = width / 2);

/**
* Computes the print interval between the centers of 2 objects.
* @param Number size - The size of the shape.
* @returns Number
*/
function getPrintInterval(size) = size + printInterval;

/**
* Centers the children elements to te printer's build plate.
*/
module centerBuildPlate(moveOrigin = false) {
buildPlate([printerLength, printerWidth], center=!moveOrigin);
translate(moveOrigin ? [printerLength, printerWidth, 0] / 2 : [0, 0, 0]) {
children();
}
};

/**
* Validates the config values, checking if it match the critical constraints.
* @param Number length - The nominal size of a track element.
Expand Down Expand Up @@ -329,6 +356,9 @@ module printConfig(length, width, lane, height, radius, base) {
str("Nozzle diameter: ", nozzleWidth, "mm"),
str("Print layer: ", printResolution, "mm"),
str("Print tolerance: ", printTolerance, "mm"),
str("Printer's length: ", printerLength / 10, "cm"),
str("Printer's width: ", printerWidth / 10, "cm"),
str("Print interval: ", printInterval, "mm"),
""
], str(chr(13), chr(10))));
}
Expand All @@ -345,6 +375,3 @@ stripIndentRatio = 0.5;

// The angle of a typical curve
curveAngle = 90;

// The number of facets the accessory mast have
mastFacets = 6;
98 changes: 98 additions & 0 deletions rcmodels/tracks/parts/accessories/bent-mast.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
/**
* @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 bent mast to clip accessories onto the barrier holders.
*
* @author jsconan
*/

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

/**
* Gets the length of the final shape for a bent mast.
* @returns Number
*/
function finalBentMastLength() =
getAccessoryBentMastLength(
width = mastWidth,
height = [mastWidth, mastHeight],
wall = accessoryClipThickness,
base = barrierHolderBase
)
;

/**
* Gets the width of the final shape for a bent mast.
* @returns Number
*/
function finalBentMastWidth() =
getAccessoryBentMastWidth(
width = mastWidth,
height = [mastWidth, mastHeight],
wall = accessoryClipThickness,
base = barrierHolderBase
)
;

/**
* Gets the horizontal interval of the final shape for a bent mast.
* @returns Number
*/
function finalBentMastIntervalX() =
getPrintInterval(
finalBentMastLength()
)
;

/**
* Gets the vertical interval of the final shape for a bent mast.
* @returns Number
*/
function finalBentMastIntervalY() =
getPrintInterval(
finalBentMastWidth()
)
;

/**
* Defines the final shape for a bent mast.
*/
module finalBentMast() {
accessoryBentMast(
width = mastWidth,
height = [mastWidth, mastHeight],
wall = accessoryClipThickness,
base = barrierHolderBase,
thickness = barrierBodyThickness
);
}

// 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])
finalBentMast();
}
57 changes: 53 additions & 4 deletions rcmodels/tracks/parts/accessories/cable-clip.scad
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,63 @@
// 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])
/**
* Gets the length of the final shape for a cable clip.
* @returns Number
*/
function finalCableClipLength() =
getCableClipLength(
wall = accessoryClipThickness,
base = barrierHolderBase
)
;

/**
* Gets the width of the final shape for a cable clip.
* @returns Number
*/
function finalCableClipWidth() =
getCableClipWidth(
wall = accessoryClipThickness,
base = barrierHolderBase
)
;

/**
* Gets the horizontal interval of the final shape for a cable clip.
* @returns Number
*/
function finalCableClipIntervalX() =
getPrintInterval(
finalCableClipLength()
)
;

/**
* Gets the vertical interval of the final shape for a cable clip.
* @returns Number
*/
function finalCableClipIntervalY() =
getPrintInterval(
finalCableClipWidth()
)
;

/**
* Defines the final shape for a cable clip.
*/
module finalCableClip() {
cableClip(
height = cableClipWidth,
wall = accessoryClipThickness,
base = barrierHolderBase,
thickness = barrierBodyThickness
);
}

// 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])
finalCableClip();
}
Loading

0 comments on commit effef40

Please sign in to comment.