Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions howto/MakeCodeParametric.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<link href="../assets/fonts/open-sans/all.css" rel="stylesheet">

<script src="../assets/js/d3.js"></script>
<script src="../assets/js/d3.layout.cloud.js"></script>
<script src="../assets/js/d3/d3.js"></script>
<script src="../assets/js/d3/d3.layout.cloud.js"></script>
</head>

<body>
Expand Down Expand Up @@ -76,10 +76,10 @@ <h1><span class="green">Open</span><span class="yellow">SCAD</span> - HowTo</h1>
<p>Let's setup some reusable functions. First, sum a vector (or a subset of a vector).</p>

<pre>
function vecsum(v,until= -1) = [
function vecsum(v,until= -1) = [
for (
a=0, b= v[0];
a < (until > 0 ? until : len(v));
a=0, b= v[0];
a < (until > 0 ? until : len(v));
a= a+1, b= b + (v[a] == undef ? 0 : v[a])
) b
];
Expand Down Expand Up @@ -142,8 +142,8 @@ <h1><span class="green">Open</span><span class="yellow">SCAD</span> - HowTo</h1>
<pre>
heights = [ thin_h, wide_h, thin_h ];

module translate_z(v, i)
translate([0, 0, z_offset_from_vec(v, i)])
module translate_z(v, i)
translate([0, 0, z_offset_from_vec(v, i)])
children();

translate_z(heights, 0) thin_cube();
Expand Down Expand Up @@ -270,4 +270,4 @@ <h1><span class="green">Open</span><span class="yellow">SCAD</span> - HowTo</h1>
</script>
</body>

</html>
</html>
Loading