1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-06 14:56:47 +02:00

fix offset sign

This commit is contained in:
Justin Lin
2020-03-11 14:14:39 +08:00
parent a8bed95fb6
commit a4db2b2072
2 changed files with 2 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ module circle_maze(start, r_blocks, block_width, wall_thickness, origin_offset)
walls = mz_walls(blocks, double_r_blocks, double_r_blocks, block_width);
half_width = width / 2;
offset = is_undef(origin_offset) ? [half_width, half_width] : origin_offset;
offset = is_undef(origin_offset) ? [-half_width, -half_width] : origin_offset;
for(wall = walls) {
for(i = [0:len(wall) - 2]) {

View File

@@ -1,6 +1,6 @@
function ptf_circle(point, offset) =
let(
p = [point[0] - offset[1], point[1] - offset[0]],
p = [point[0] + offset[1], point[1] + offset[0]],
n = max(abs(p[0]), abs(p[1])),
r = n * 1.414,
a = atan2(p[0], p[1])