diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index c4c12276..ff9e76f7 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1545,6 +1545,12 @@ OpenEdge ABL: - .p - .cls +OpenSCAD: + type: programming + lexer: Text only + extensions: + - .scad + Org: type: prose lexer: Text only diff --git a/lib/linguist/samples.json b/lib/linguist/samples.json index 0fc82b97..9588d42a 100644 --- a/lib/linguist/samples.json +++ b/lib/linguist/samples.json @@ -418,6 +418,9 @@ ".cls", ".p" ], + "OpenSCAD": [ + ".scad" + ], "Org": [ ".org" ], @@ -820,8 +823,8 @@ "exception.zep.php" ] }, - "tokens_total": 650866, - "languages_total": 887, + "tokens_total": 650933, + "languages_total": 889, "tokens": { "ABAP": { "*/**": 1, @@ -50482,6 +50485,28 @@ "CHR": 2, "lcPostBase64Data.": 1 }, + "OpenSCAD": { + "fn": 1, + ";": 6, + "difference": 1, + "(": 11, + ")": 11, + "{": 2, + "union": 1, + "translate": 4, + "[": 5, + "]": 5, + "cube": 1, + "center": 3, + "true": 3, + "cylinder": 2, + "h": 2, + "r1": 1, + "r2": 1, + "sphere": 2, + "r": 3, + "}": 2 + }, "Org": { "#": 13, "+": 13, @@ -71973,6 +71998,7 @@ "Opa": 28, "OpenCL": 144, "OpenEdge ABL": 762, + "OpenSCAD": 67, "Org": 358, "Ox": 1006, "Oxygene": 157, @@ -72178,6 +72204,7 @@ "Opa": 2, "OpenCL": 2, "OpenEdge ABL": 5, + "OpenSCAD": 2, "Org": 1, "Ox": 3, "Oxygene": 1, @@ -72262,5 +72289,5 @@ "fish": 3, "wisp": 1 }, - "md5": "b0c3e81b634238f9c3aa99820624e389" + "md5": "3b349c5b6b0d9369054035bf0a734463" } \ No newline at end of file diff --git a/samples/OpenSCAD/not_simple.scad b/samples/OpenSCAD/not_simple.scad new file mode 100644 index 00000000..dd4d1301 --- /dev/null +++ b/samples/OpenSCAD/not_simple.scad @@ -0,0 +1,13 @@ +// A more complicated 3D shape in OpenSCAD +$fn=32; + +difference() { + // main shape + union() { + translate( [ 0, 0, 2 ] ) cube( [ 15, 15, 4 ], center=true ); + translate( [ 0, 0, 13 ] ) cylinder( h=25, r1=5, r2=3, center=true ); + translate( [ 0, 0, 28 ] ) sphere( r=6 ); + } + // hole through center + translate( [ 0, 0, 17 ] ) cylinder( h=35, r=2, center=true ); +} diff --git a/samples/OpenSCAD/simple.scad b/samples/OpenSCAD/simple.scad new file mode 100644 index 00000000..b3e4da5d --- /dev/null +++ b/samples/OpenSCAD/simple.scad @@ -0,0 +1,3 @@ +// Simple sphere in OpenSCAD + +sphere( r=10 );