mirror of
https://github.com/XAMPPRocky/tokei
synced 2024-09-28 20:13:35 +00:00
parent
9d156e1f77
commit
40bd58b692
|
@ -464,6 +464,7 @@ ObjectiveC
|
|||
ObjectiveCpp
|
||||
OCaml
|
||||
Odin
|
||||
OpenSCAD
|
||||
OpenQASM
|
||||
Org
|
||||
Oz
|
||||
|
|
|
@ -1045,6 +1045,13 @@
|
|||
"multi_line_comments": [["/*", "*/"]],
|
||||
"quotes": [["\\\"", "\\\""], ["'", "'"]]
|
||||
},
|
||||
"OpenScad": {
|
||||
"name": "OpenSCAD",
|
||||
"extensions": ["scad"],
|
||||
"line_comment": ["//"],
|
||||
"multi_line_comments": [["/*", "*/"]],
|
||||
"quotes": [["\\\"", "\\\""], ["'", "'"]]
|
||||
},
|
||||
"OpenPolicyAgent": {
|
||||
"name": "Open Policy Agent",
|
||||
"line_comment": ["#"],
|
||||
|
|
34
tests/data/openscad.scad
Normal file
34
tests/data/openscad.scad
Normal file
|
@ -0,0 +1,34 @@
|
|||
//! 34 lines 15 code 16 comments 3 blanks
|
||||
// https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Commented_Example_Projects
|
||||
// The idea is to twist a translated circle:
|
||||
// -
|
||||
/*
|
||||
linear_extrude(height = 10, twist = 360, scale = 0)
|
||||
translate([1,0])
|
||||
circle(r = 1);
|
||||
*/
|
||||
|
||||
module horn(height = 10, radius = 6,
|
||||
twist = 720, $fn = 50)
|
||||
{
|
||||
// A centered circle translated by 1xR and
|
||||
// twisted by 360° degrees, covers a 2x(2xR) space.
|
||||
// -
|
||||
radius = radius/4;
|
||||
// De-translate.
|
||||
// -
|
||||
translate([-radius,0])
|
||||
// The actual code.
|
||||
// -
|
||||
linear_extrude(height = height, twist = twist,
|
||||
scale=0, $fn = $fn)
|
||||
translate([radius,0])
|
||||
circle(r=radius);
|
||||
}
|
||||
|
||||
translate([3,0])
|
||||
mirror()
|
||||
horn();
|
||||
|
||||
translate([-3,0])
|
||||
horn();
|
Loading…
Reference in a new issue