From ac2f95deb2132a6dc2e544fd7ca79880eacf3fbb Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sat, 13 Feb 2021 18:15:32 +0800 Subject: [PATCH] default to 1 --- docs/lib3x-function_grapher.md | 2 +- src/function_grapher.scad | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/lib3x-function_grapher.md b/docs/lib3x-function_grapher.md index ef55dc88..7fb597cc 100644 --- a/docs/lib3x-function_grapher.md +++ b/docs/lib3x-function_grapher.md @@ -5,7 +5,7 @@ Given a list of points `[x, y, f(x, y)]` where `f(x, y)` is a mathematics functi ## Parameters - `points` : A list of points `[x, y, f(x, y)]`. See examples below. -- `thickness` : The face or line thickness. +- `thickness` : The face or line thickness. Default to 1. - `style` : The style of the graph. It accepts `"FACES"`, `"LINES"`, `"HULL_FACES"` and `"HULL_LINES"`. The default value is `"FACES"` which simply takes `f(x, y) - thickness` for each point to build a bottom. It may cause thickness problems when slopes is high. The `"HULL_FACES"` value can solve the problem but is slow. When assigning `"LINES"`, it uses lines to connect points. The `"HULL_LINES"` is very very slow; however, the model might look smoother if you have a small `$fn`. - `$fa`, `$fs`, `$fn` : Used by the `circle` or `sphere` module internally. It affects the speed of rending. For example, a large `$fn` may be very slow when rending. Check [the circle module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#circle) or [the sphere module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#sphere) for more details. diff --git a/src/function_grapher.scad b/src/function_grapher.scad index 7a82b2bd..f0b4cd8d 100644 --- a/src/function_grapher.scad +++ b/src/function_grapher.scad @@ -13,7 +13,7 @@ use ; use ; use ; -module function_grapher(points, thickness, style = "FACES") { +module function_grapher(points, thickness = 1, style = "FACES") { rows = len(points); columns = len(points[0]);