Skip to content

Commit

Permalink
Merge pull request #124 from jsconan/release-1.10.1
Browse files Browse the repository at this point in the history
Release 1.10.1
  • Loading branch information
jsconan authored Jul 13, 2022
2 parents 42856b7 + 237c521 commit 15a17c6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# camelSCAD history

## [Version 1.10.1](https://github.com/jsconan/camelSCAD/releases/tag/v1.10.1)

Fixes in scripts:

- `scadrenderallrecurse`: render the child files from the root folder when recursing
- `slic3rsliceallrecurse`: slice the child files from the root folder when recursing

## [Version 1.10.0](https://github.com/jsconan/camelSCAD/releases/tag/v1.10.0)

Features:
Expand Down
2 changes: 1 addition & 1 deletion core/version.scad
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* The version of the library.
* @type Vector
*/
CAMEL_SCAD_VERSION = [1, 10, 0];
CAMEL_SCAD_VERSION = [1, 10, 1];

/**
* The minimal version of OpenSCAD required by the library.
Expand Down
9 changes: 7 additions & 2 deletions scripts/utils/scad.sh
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,15 @@ scadrenderall() {
scadrenderallrecurse() {
local src=$1; shift
local dst=$1; shift
local folders=($(recursepath "${src}" "*.${scadext}"))
if [ "${folders}" == "" ]; then
local mask="*.${scadext}"
local files=($(find "${src}" -maxdepth 1 -name "${mask}"))
local folders=($(recursepath "${src}" "${mask}"))
if [ ${#files[@]} -eq 0 ] && [ ${#folders[@]} -eq 0 ]; then
printerror "There is nothing to render at ${src}!" ${E_EMPTY}
fi
if [ ${#files[@]} -gt 0 ]; then
scadrenderall "${src}" "${dst}" "$@"
fi
for folder in "${folders[@]}"; do
scadrenderall "${src}${folder}" "${dst}${folder}" "$@"
done
Expand Down
9 changes: 7 additions & 2 deletions scripts/utils/slic3r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,15 @@ slic3rsliceall() {
slic3rsliceallrecurse() {
local src=$1; shift
local dst=$1; shift
local folders=($(recursepath "${src}" "*.${slic3rext}"))
if [ "${folders}" == "" ]; then
local mask="*.${slic3rext}"
local files=($(find "${src}" -maxdepth 1 -name "${mask}"))
local folders=($(recursepath "${src}" "${mask}"))
if [ ${#files[@]} -eq 0 ] && [ ${#folders[@]} -eq 0 ]; then
printerror "There is nothing to slice at ${src}!" ${E_EMPTY}
fi
if [ ${#files[@]} -gt 0 ]; then
slic3rsliceall "${src}" "${dst}" "$@"
fi
for folder in "${folders[@]}"; do
slic3rsliceall "${src}${folder}" "${dst}${folder}" "$@"
done
Expand Down
4 changes: 2 additions & 2 deletions test/core/version.scad
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ module testCoreVersion() {
// test camelSCAD()
testModule("camelSCAD()", 2) {
testUnit("as vector", 1) {
assertEqual(camelSCAD(), [1, 10, 0], "The current version of the library is 1.10.0");
assertEqual(camelSCAD(), [1, 10, 1], "The current version of the library is 1.10.1");
}
testUnit("as string", 1) {
assertEqual(camelSCAD(true), "1.10.0", "The current version of the library is 1.10.0");
assertEqual(camelSCAD(true), "1.10.1", "The current version of the library is 1.10.1");
}
}
}
Expand Down

0 comments on commit 15a17c6

Please sign in to comment.