mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 06:08:31 +01:00
provided supports for $fa, $fs, $fn
This commit is contained in:
parent
55cece0d1c
commit
4168181377
@ -2,7 +2,7 @@
|
||||
* arc.scad
|
||||
*
|
||||
* Create an arc. You can pass a 2 element vector to define the central angle.
|
||||
* It provides a fn parameter consistent with the $fn parameter of the circle module.
|
||||
* Its $fa, $fs and $fn parameters are consistent with the circle module.
|
||||
* It depends on the circular_sector module so you have to include circular_sector.scad.
|
||||
*
|
||||
* @copyright Justin Lin, 2017
|
||||
@ -12,13 +12,13 @@
|
||||
*
|
||||
**/
|
||||
|
||||
module arc(radius, angles, width, width_mode = "LINE_CROSS", fn = 24) {
|
||||
module arc(radius, angles, width, width_mode = "LINE_CROSS") {
|
||||
w_offset = width_mode == "LINE_CROSS" ? [width / 2, -width / 2] : (
|
||||
width_mode == "LINE_INWARD" ? [0, -width] : [width, 0]
|
||||
);
|
||||
|
||||
difference() {
|
||||
circular_sector(radius + w_offset[0], angles, fn);
|
||||
circular_sector(radius + w_offset[1], angles, fn);
|
||||
circular_sector(radius + w_offset[0], angles);
|
||||
circular_sector(radius + w_offset[1], angles);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user