1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-23 23:03:23 +02:00

only replace when fc != "F"

This commit is contained in:
Justin Lin
2020-04-13 08:53:57 +08:00
parent 2f796164e3
commit 29bfd2cc87

View File

@@ -4,7 +4,7 @@ use <turtle/turtle2d.scad>;
function lsystem2(rule, n, angle, leng = 1, heading = 0, start = [0, 0], forward_chars = "F") =
let(
derived = derive(rule, n),
codes = _join([
codes = forward_chars == "F" ? derived : _join([
for(c = derived)
let(idx = search(c, forward_chars))
idx == [] ? c : "F"