Skip to content

Commit

Permalink
Added convexity parameter to clip().
Browse files Browse the repository at this point in the history
  • Loading branch information
nophead committed Jun 14, 2022
1 parent eda88cc commit 18f3d43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6883,7 +6883,7 @@ Original version by Doug Moen on the OpenSCAD forum
| Module | Description |
|:--- |:--- |
| `box(xmin, ymin, zmin, xmax, ymax, zmax)` | Construct a box given its bounds |
| `clip(xmin = -inf, ymin = -inf, zmin = -inf, xmax = inf, ymax = inf, zmax = inf)` | Clip child to specified boundaries |
| `clip(xmin = -inf, ymin = -inf, zmin = -inf, xmax = inf, ymax = inf, zmax = inf, convexity = 1)` | Clip child to specified boundaries |

![clip](tests/png/clip.png)

Expand Down
4 changes: 2 additions & 2 deletions utils/core/clip.scad
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ module box(xmin, ymin, zmin, xmax, ymax, zmax) //! Construct a box given its bou
[0,2,3,1]] // left
);

module clip(xmin = -inf, ymin = -inf, zmin = -inf, xmax = inf, ymax = inf, zmax = inf) //! Clip child to specified boundaries
render() intersection() {
module clip(xmin = -inf, ymin = -inf, zmin = -inf, xmax = inf, ymax = inf, zmax = inf, convexity = 1) //! Clip child to specified boundaries
render(convexity = convexity) intersection() {
children();

box(xmin, ymin, zmin, xmax, ymax, zmax);
Expand Down

0 comments on commit 18f3d43

Please sign in to comment.