diff --git a/README.md b/README.md index 3435b86a..4f72293c 100644 --- a/README.md +++ b/README.md @@ -228,7 +228,7 @@ See [examples](examples). - [voxel/vx_gray](https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_gray.html) - [voxel/vx_union](https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_union.html) - [voxel/vx_intersection](https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_intersection.html) -- voxel/vx_difference +- [voxel/vx_difference](https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_difference.html) ---- diff --git a/docs/images/lib2x-vx_difference-1.JPG b/docs/images/lib2x-vx_difference-1.JPG new file mode 100644 index 00000000..e7a59424 Binary files /dev/null and b/docs/images/lib2x-vx_difference-1.JPG differ diff --git a/docs/lib2x-vx_difference.md b/docs/lib2x-vx_difference.md new file mode 100644 index 00000000..d458873f --- /dev/null +++ b/docs/lib2x-vx_difference.md @@ -0,0 +1,28 @@ +# vx_difference + +It' slow, in case you want to create a difference of two lists of points directly. + +**Since:** 2.4 + +## Parameters + +- `points1` : A list of points. +- `points2` : A list of points. + +## Examples + + use ; + use ; + use ; + + voxels = vx_difference( + vx_cylinder(6, 3, filled = true), + vx_sphere(3, filled = true) + ); + + for(pt = voxels) { + translate(pt) + cube(1, center = true); + } + +![vx_difference](images/lib2x-vx_difference-1.JPG) diff --git a/docs/lib2x-vx_intersection.md b/docs/lib2x-vx_intersection.md index fce6d296..1bd4ae1b 100644 --- a/docs/lib2x-vx_intersection.md +++ b/docs/lib2x-vx_intersection.md @@ -1,6 +1,6 @@ # vx_intersection -Creates an intersection of two lists of points. +It' slow, in case you want to create an intersection of two lists of points directly. **Since:** 2.4 diff --git a/docs/lib2x-vx_union.md b/docs/lib2x-vx_union.md index b68a7acc..7ea09f68 100644 --- a/docs/lib2x-vx_union.md +++ b/docs/lib2x-vx_union.md @@ -1,6 +1,6 @@ # vx_union -Creates a union of two lists of points. +It' slow, in case you want to create a union of two lists of points directly. **Since:** 2.4 diff --git a/src/voxel/vx_difference.scad b/src/voxel/vx_difference.scad index c2535e8f..8cac16a3 100644 --- a/src/voxel/vx_difference.scad +++ b/src/voxel/vx_difference.scad @@ -1,3 +1,13 @@ +/** +* vx_difference.scad +* +* @copyright Justin Lin, 2020 +* @license https://opensource.org/licenses/lgpl-3.0.html +* +* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_difference.html +* +**/ + use <../util/sort.scad>; use <../util/has.scad>;