forked from fluxio/node-cgal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from fritzm/fritzm/cleanup
Miscellaneous cleanups
- Loading branch information
Showing
25 changed files
with
469 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,305 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"true" | ||
] | ||
}, | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"CGAL = require('.')\n", | ||
"true" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"Polygon2 {}" | ||
] | ||
}, | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"poly = new CGAL.Polygon2([\n", | ||
" [0, 0.3],\n", | ||
" [1, 0.6],\n", | ||
" [2, 0.9]\n", | ||
"])" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"2.7755575615628914e-17\n", | ||
"false\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"console.log(poly.area())\n", | ||
"console.log(CGAL.collinear.apply(null, poly.coords()))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"[\n", | ||
" [ '0', '5404319552844595/18014398509481984' ],\n", | ||
" [ '1', '5404319552844595/9007199254740992' ],\n", | ||
" [ '2', '8106479329266893/9007199254740992' ]\n", | ||
"]\n", | ||
"[ [ 0, 0.3 ], [ 1, 0.6 ], [ 2, 0.9 ] ]\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"console.log(poly.toPOD())\n", | ||
"console.log(poly.toPOD(false))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"false\n", | ||
"false\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"console.log(CGAL.collinear.apply(null, poly.toPOD()))\n", | ||
"console.log(CGAL.collinear.apply(null, poly.toPOD(false)))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"Polygon2 {}" | ||
] | ||
}, | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"poly = new CGAL.Polygon2([\n", | ||
" ['0', '0.3'],\n", | ||
" ['1', '0.6'],\n", | ||
" ['2', '0.9']\n", | ||
"])" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 7, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"0\n", | ||
"true\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"console.log(poly.area())\n", | ||
"console.log(CGAL.collinear.apply(null, poly.coords()))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 8, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"[ [ '0', '3/10' ], [ '1', '3/5' ], [ '2', '9/10' ] ]\n", | ||
"[\n", | ||
" [ 0, 0.30000000000000004 ],\n", | ||
" [ 1, 0.6000000000000001 ],\n", | ||
" [ 2, 0.8999999999999999 ]\n", | ||
"]\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"console.log(poly.toPOD())\n", | ||
"console.log(poly.toPOD(false))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 9, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"true\n", | ||
"false\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"console.log(CGAL.collinear.apply(null, poly.toPOD()))\n", | ||
"console.log(CGAL.collinear.apply(null, poly.toPOD(false)))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 9, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"Polygon2 {}" | ||
] | ||
}, | ||
"execution_count": 9, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"p = new CGAL.Polygon2([[0,0],[1,0],[0,1]])" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 17, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"PolygonSet2 {}" | ||
] | ||
}, | ||
"execution_count": 17, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"ps = new CGAL.PolygonSet2([[0,0],[1,0],[0,1]])" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 18, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"Arrangement2 {}" | ||
] | ||
}, | ||
"execution_count": 18, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"a = ps.arrangement()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 19, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"{\n", | ||
" numFaces: 2,\n", | ||
" numUnboundedFaces: 1,\n", | ||
" numBoundedFaces: 1,\n", | ||
" numVertices: 3,\n", | ||
" boundedFaces: [ [ [Array], [Array], [Array] ] ]\n", | ||
"}" | ||
] | ||
}, | ||
"execution_count": 19, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"a.toPOD()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"a." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Javascript (Node.js)", | ||
"language": "javascript", | ||
"name": "javascript" | ||
}, | ||
"language_info": { | ||
"file_extension": ".js", | ||
"mimetype": "application/javascript", | ||
"name": "javascript", | ||
"version": "12.8.1" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
node-gyp clean | ||
rm -rf build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
jasmine-node --verbose --captureExceptions $JASMINE_NODE_OPTS test | ||
jasmine --reporter=jasmine-console-reporter |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.