Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Mergining libtrianlges #13

Merged
merged 5 commits into from

2 participants

@traverseda

Someone messaged my awhile ago asking to have my libtriangles relicensed under the lgpl, so they could include it in MCAD. That never happened, so here's my pull request. Let me know if I need to do anything else to the file, like explicitly mention the author or license in the file.

I also included a folder called "examples". inside is "example.libtriangles.scad". If you don't want the folder, I can move it into the main folder.

@elmom
Owner
@traverseda

Alright, fixed. It currently defaults to nothing, but that's emulating how the built in constants like cube() work.

@elmom
Owner

About the test_ file, I meant no file level geometry, testing code should be inside (several) "module test_*(...){...}"

Otherwise it seems good

@traverseda traverseda Removed test_libtriangles. I was under the mistaken impression is pro…
…vided a set of examples, so you could see at a glance the result of the code. This doesn't really need a test function.
0356f2f
@traverseda

Not much point to the test file then, in this instance. It was always more of a examples thing. I simply removed it. It wasn't necessary anyway, just something so you could see at a glance the different library options and what they did.

@elmom elmom merged commit 6079e6d into elmom:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 15, 2013
  1. @traverseda
  2. @traverseda
Commits on Feb 16, 2013
  1. @traverseda
  2. @traverseda

    Added licensing stuff.

    traverseda authored
  3. @traverseda

    Removed test_libtriangles. I was under the mistaken impression is pro…

    traverseda authored
    …vided a set of examples, so you could see at a glance the result of the code. This doesn't really need a test function.
This page is out of date. Refresh to see the latest.
Showing with 60 additions and 0 deletions.
  1. +60 −0 libtriangles.scad
View
60 libtriangles.scad
@@ -0,0 +1,60 @@
+//Copyright (C) 2013 Alex Davies
+//License: LGPL 2.1 or later
+//todo, make library work with negative lengths by adding triangles to the inside of every surface. basicaly copy and paste the current triangles set and reverse the first and last digit of every triangle. In 4 character traingles switcht the middle ones around as well. Not sure if that' actually useful though.
+
+module rightpyramid(rightpyramidx, rightpyramidy, rightpyramidz) {
+ polyhedron ( points = [[0,0,0],
+ [rightpyramidx, 0, 0],
+ [0, rightpyramidy, 0],
+ [rightpyramidx, rightpyramidy, 0],
+ [rightpyramidx/2, rightpyramidy, rightpyramidz]],
+
+ triangles = [[0,1,2],[2,1,3],[4,1,0],[3,1,4],[2,3,4],[0,2,4]]);
+
+}
+
+module cornerpyramid(cornerpyramidx, cornerpyramidy, cornerpyramidz) {
+ polyhedron ( points = [[0,0,0],
+ [cornerpyramidx, 0, 0],
+ [0, cornerpyramidy, 0],
+ [cornerpyramidx, cornerpyramidy, 0],
+ [0, cornerpyramidy, cornerpyramidz]],
+
+ triangles = [[0,1,2],[2,1,3],[4,1,0],[3,1,4],[2,3,4],[0,2,4]]);
+
+}
+
+module eqlpyramid(eqlpyramidx, eqlpyramidy, eqlpyramidz) {
+ polyhedron ( points = [[0,0,0],
+ [eqlpyramidx, 0, 0],
+ [0, eqlpyramidy, 0],
+ [eqlpyramidx, eqlpyramidy, 0],
+ [eqlpyramidx/2, eqlpyramidy/2, eqlpyramidz]],
+
+ triangles = [[0,1,2],[2,1,3],[4,1,0],[3,1,4],[2,3,4],[0,2,4]]);
+
+}
+
+
+module rightprism(rightprismx,rightprismy,rightprismz){
+ polyhedron ( points = [[0,0,0],
+ [rightprismx,0,0],
+ [rightprismx,rightprismy,0],
+ [0,rightprismy,0],
+ [0,rightprismy,rightprismz],
+ [0,0,rightprismz]],
+ triangles = [[0,1,2,3],[5,1,0],[5,4,2,1],[4,3,2],[0,3,4,5]]);
+}
+
+
+
+module eqlprism(rightprismx,rightprismy,rightprismz){
+ polyhedron ( points = [[0,0,0],
+ [rightprismx,0,0],
+ [rightprismx,rightprismy,0],
+ [0,rightprismy,0],
+ [rightprismx/2,rightprismy,rightprismz],
+ [rightprismx/2,0,rightprismz]],
+ triangles = [[0,1,2,3],[5,1,0],[5,4,2,1],[4,3,2],[0,3,4,5]]);
+}
+
Something went wrong with that request. Please try again.