mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-03-14 02:59:42 +01:00
refactor out ptf_circle
This commit is contained in:
parent
5033c415db
commit
4316b5dc61
@ -1,16 +1,7 @@
|
||||
use <hull_polyline2d.scad>;
|
||||
use <experimental/mz_blocks.scad>;
|
||||
use <experimental/mz_walls.scad>;
|
||||
|
||||
function ptf_circle(point, offset) =
|
||||
let(
|
||||
p = [point[0] - offset, point[1] - offset],
|
||||
n = max(abs(p[0]), abs(p[1])),
|
||||
r = n * 1.414,
|
||||
a = atan2(p[0], p[1])
|
||||
)
|
||||
[r * cos(a), r * sin(a)];
|
||||
|
||||
use <experimental/ptf_circle.scad>;
|
||||
|
||||
module circle_maze(start, r_blocks, block_width, wall_thickness, origin_offset) {
|
||||
double_r_blocks = r_blocks * 2;
|
||||
|
8
src/experimental/ptf_circle.scad
Normal file
8
src/experimental/ptf_circle.scad
Normal file
@ -0,0 +1,8 @@
|
||||
function ptf_circle(point, offset) =
|
||||
let(
|
||||
p = [point[0] - offset, point[1] - offset],
|
||||
n = max(abs(p[0]), abs(p[1])),
|
||||
r = n * 1.414,
|
||||
a = atan2(p[0], p[1])
|
||||
)
|
||||
[r * cos(a), r * sin(a)];
|
Loading…
x
Reference in New Issue
Block a user