1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-02 03:02:34 +02:00

integer to string

This commit is contained in:
Justin Lin
2017-03-19 08:09:07 +08:00
parent 6320d439ca
commit 75e5050b75
10 changed files with 43 additions and 57 deletions

View File

@@ -6,7 +6,7 @@ Create an arc. You can pass a 2 element vector to define the central angle. It p
- `radius` : The radius of the circle.
- `angles` : A 2 element vector which defines the central angle. The first element of the vector is the beginning angle in degrees, and the second element is the ending angle.
- `width_mode` : The default value is `LINE_CROSS`. The arc line will move outward by `width /2` and inward by `width / 2`. If it's `LINE_OUTWARD`, the arc line moves outward by `width`. The `LINE_INWARD` moves the arc line inward by `width`.
- `width_mode` : The default value is `"LINE_CROSS"`. The arc line will move outward by `width /2` and inward by `width / 2`. If it's `"LINE_OUTWARD"`, the arc line moves outward by `width`. The `"LINE_INWARD"` moves the arc line inward by `width`.
- `fn` : The `$fn` value used by the `circle` module internally. The default value is 24.
## Examples
@@ -16,12 +16,12 @@ Create an arc. You can pass a 2 element vector to define the central angle. It p
![arc](images/lib-arc-1.JPG)
arc(radius = 20, angles = [45, 290], width = 2);
arc(radius = 20, angles = [45, 290], width = 2, width_mode = "LINE_INWARD");
%circle(r = 20, $fn = 24);
![arc](images/lib-arc-2.JPG)
arc(radius = 20, angles = [45, 290], width = 2, width_mode = LINE_OUTWARD);
arc(radius = 20, angles = [45, 290], width = 2, width_mode = "LINE_OUTWARD");
%circle(r = 20, $fn = 24);
![arc](images/lib-arc-3.JPG)

View File

@@ -7,9 +7,9 @@ Creates a line from two points.
- `p1` : 2 element vector `[x, y]`.
- `p2` : 2 element vector `[x, y]`.
- `width` : The line width.
- `p1Style` : The end-cap style of the point `p1`. The value must be `CAP_BUTT`, `CAP_SQUARE` or `CAP_ROUND`. The default value is `CAP_SQUARE`.
- `p2Style` : The end-cap style of the point `p2`. The value must be `CAP_BUTT`, `CAP_SQUARE` or `CAP_ROUND`. The default value is `CAP_SQUARE`.
- `round_fn` : When the end-cap style is `CAP_ROUND`, it controlls the `$fn` value used by the `circle` module. The default value is `24`.
- `p1Style` : The end-cap style of the point `p1`. The value must be `"CAP_BUTT"`, `"CAP_SQUARE"` or `"CAP_ROUND"`. The default value is `"CAP_SQUARE"`.
- `p2Style` : The end-cap style of the point `p2`. The value must be `"CAP_BUTT"`, `"CAP_SQUARE"` or `"CAP_ROUND"`. The default value is `"CAP_SQUARE"`.
- `round_fn` : When the end-cap style is `"CAP_ROUND"`, it controlls the `$fn` value used by the `circle` module. The default value is `24`.
## Examples
@@ -17,10 +17,10 @@ Creates a line from two points.
translate([0, -2, 0])
line2d(p1 = [0, 0], p2 = [5, 0], width = 1,
p1Style = CAP_ROUND, p2Style = CAP_ROUND);
p1Style = "CAP_ROUND", p2Style = "CAP_ROUND");
translate([0, -4, 0])
line2d(p1 = [0, 0], p2 = [5, 0], width = 1,
p1Style = CAP_BUTT, p2Style = CAP_BUTT);
p1Style = "CAP_BUTT", p2Style = "CAP_BUTT");
![line2d](images/lib-line2d-1.JPG)

View File

@@ -7,8 +7,8 @@ Creates a 3D line from two points.
- `p1` : 3 element vector `[x, y, z]`.
- `p2` : 3 element vector `[x, y, z]`.
- `thickness` : The line thickness.
- `p1Style` : The end-cap style of the point `p1`. The value must be `CAP_BUTT`, `CAP_CIRCLE` or `CAP_SPHERE`. The default value is `CAP_CIRCLE`.
- `p2Style` : The end-cap style of the point `p2`. The value must be `CAP_BUTT`, `CAP_CIRCLE` or `CAP_SPHERE`. The default value is `CAP_CIRCLE`.
- `p1Style` : The end-cap style of the point `p1`. The value must be `"CAP_BUTT"`, `"CAP_CIRCLE"` or `"CAP_SPHERE"`. The default value is `"CAP_CIRCLE"`.
- `p2Style` : The end-cap style of the point `p2`. The value must be `"CAP_BUTT"`, `"CAP_CIRCLE"` or `"CAP_SPHERE"`. The default value is `"CAP_CIRCLE"`.
- `fn` : It controlls the `$fn` value used by the `circle` or `sphere` module. The default value is `24`.
## Examples
@@ -25,8 +25,8 @@ Creates a 3D line from two points.
p1 = [0, 0, 0],
p2 = [10, 2, 10],
thickness = 1,
p1Style = CAP_BUTT,
p2Style = CAP_BUTT
p1Style = "CAP_BUTT",
p2Style = "CAP_BUTT"
);
![line3d](images/lib-line3d-2.JPG)
@@ -35,8 +35,8 @@ Creates a 3D line from two points.
p1 = [0, 0, 0],
p2 = [10, 2, 10],
thickness = 1,
p1Style = CAP_SPHERE,
p2Style = CAP_SPHERE
p1Style = "CAP_SPHERE",
p2Style = "CAP_SPHERE"
);
![line3d](images/lib-line3d-3.JPG)

View File

@@ -6,9 +6,9 @@ Creates a polyline from a list of `x`, `y` coordinates. It depends on the `line2
- `points` : The list of `x`, `y` points of the polyline. : A vector of 2 element vectors. The points are indexed from 0 to n-1.
- `width` : The line width.
- `startingStyle` : The end-cap style of the starting point. The value must be `CAP_BUTT`, `CAP_SQUARE` or `CAP_ROUND` (defined in line2d.scad). The default value is `CAP_SQUARE`.
- endingStyle : The end-cap style of the ending point. The value must be `CAP_BUTT`, `CAP_SQUARE` or `CAP_ROUND` (defined in line2d.scad). The default value is `CAP_SQUARE`.
- `round_fn` : When the end-cap style is `CAP_ROUND`, it controlls the `$fn` value used by the `circle` module. The default value is `24`.
- `startingStyle` : The end-cap style of the starting point. The value must be `"CAP_BUTT"`, `"CAP_SQUARE"` or `"CAP_ROUND"`. The default value is `"CAP_SQUARE"`.
- endingStyle : The end-cap style of the ending point. The value must be `"CAP_BUTT"`, `"CAP_SQUARE"` or `"CAP_ROUND"`. The default value is `"CAP_SQUARE"`.
- `round_fn` : When the end-cap style is "CAP_ROUND", it controlls the `$fn` value used by the `circle` module. The default value is `24`.
## Examples
@@ -17,11 +17,11 @@ Creates a polyline from a list of `x`, `y` coordinates. It depends on the `line2
![polyline2d](images/lib-polyline2d-1.JPG)
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1,
endingStyle = CAP_ROUND);
endingStyle = "CAP_ROUND");
![polyline2d](images/lib-polyline2d-2.JPG)
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1,
startingStyle = CAP_ROUND, endingStyle = CAP_ROUND);
startingStyle = "CAP_ROUND", endingStyle = "CAP_ROUND");
![polyline2d](images/lib-polyline2d-3.JPG)

View File

@@ -6,8 +6,8 @@ Creates a polyline from a list of `[x, y, z]` coordinates. It depends on the `li
- `points` : The list of `[x, y, z]` points of the polyline. : A vector of 3 element vectors. The points are indexed from 0 to n-1.
- `thickness` : The line thickness.
- `startingStyle` : The end-cap style of the starting point. The value must be `CAP_BUTT`, `CAP_CIRCLE` or `CAP_SPHERE` (defined in line3d.scad). The default value is `CAP_CIRCLE`.
- endingStyle : The end-cap style of the ending point. The value must be `CAP_BUTT`, `CAP_CIRCLE` or `CAP_SPHERE` (defined in line3d.scad). The default value is `CAP_CIRCLE`.
- `startingStyle` : The end-cap style of the starting point. The value must be `"CAP_BUTT"`, `"CAP_CIRCLE"` or `"CAP_SPHERE"`. The default value is `"CAP_CIRCL"`.
- endingStyle : The end-cap style of the ending point. The value must be `"CAP_BUTT"`, `"CAP_CIRCLE"` or `"CAP_SPHERE"`. The default value is `"CAP_CIRCLE"`.
- `fn` : It controlls the `$fn` value used by the `circle` and `sphere` module. The default value is `24`.
## Examples
@@ -32,7 +32,7 @@ Creates a polyline from a list of `[x, y, z]` coordinates. It depends on the `li
[5, 5, 4]
],
thickness = 1,
endingStyle = CAP_SPHERE
endingStyle = "CAP_SPHERE"
);
![polyline3d](images/lib-polyline3d-2.JPG)
@@ -45,8 +45,8 @@ Creates a polyline from a list of `[x, y, z]` coordinates. It depends on the `li
[5, 5, 4]
],
thickness = 1,
startingStyle = CAP_SPHERE,
endingStyle = CAP_SPHERE
startingStyle = "CAP_SPHERE",
endingStyle = "CAP_SPHERE"
);
![polyline3d](images/lib-polyline3d-3.JPG)