Changeset View
Changeset View
Standalone View
Standalone View
autotests/html/highlight.scad.html
- This file was added.
1 | <!DOCTYPE html> | ||||
---|---|---|---|---|---|
2 | <html><head> | ||||
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||||
4 | <title>highlight.scad</title> | ||||
5 | <meta name="generator" content="KF5::SyntaxHighlighting (OpenSCAD)"/> | ||||
6 | </head><body style="color:#1f1c1b"><pre> | ||||
7 | <span style="color:#898887;">/*Basic test file</span> | ||||
8 | <span style="color:#898887;">Written by Julian Stirling, 2018</span> | ||||
9 | <span style="color:#898887;">License: MIT*/</span> | ||||
10 | | ||||
11 | | ||||
12 | <span style="color:#898887;">// This is a comment</span> | ||||
13 | x=5; | ||||
14 | y=6; | ||||
15 | z=5; | ||||
16 | r=2; | ||||
17 | <span style="color:#644a9b;">for</span> (n = [-1.5:1:1.5]){ | ||||
18 | <span style="color:#644a9b;">translate</span>([n*x,0,0]){cubehole([x,y,z],r);} | ||||
19 | } | ||||
20 | | ||||
21 | <span style="color:#644a9b;">module</span> cubehole(size,holerad) | ||||
22 | { | ||||
23 | <span style="color:#0057ae;">$fn</span>=28; | ||||
24 | <span style="color:#644a9b;">difference</span>() | ||||
25 | { | ||||
26 | <span style="font-weight:bold;">cube</span>(size,center=true); | ||||
27 | <span style="font-weight:bold;">cylinder</span>(size[2]+1,r=holerad,center=true); | ||||
28 | } | ||||
29 | } | ||||
30 | </pre></body></html> |