From b97b3eaab871ad33333efc2e3891fb350d942ed1 Mon Sep 17 00:00:00 2001 From: Adam 'The Guy' Holt Date: Sat, 14 Feb 2026 15:56:19 -0700 Subject: [PATCH] Fix findPoint function to handle is90or270 properly by checking for `undef` rather than 0 --- polyround.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polyround.scad b/polyround.scad index 7d2e587..accf6d4 100644 --- a/polyround.scad +++ b/polyround.scad @@ -348,12 +348,12 @@ function findPoint(ang1,refpoint1,ang2,refpoint2,r=0)= refpoint1.x: is90or270(ang2)? refpoint2.x: - 0, + undef, m1=tan(ang1), c1=refpoint1.y-m1*refpoint1.x, m2=tan(ang2), c2=refpoint2.y-m2*refpoint2.x, - outputX=overrideX?overrideX:(c2-c1)/(m1-m2), + outputX=overrideX!=undef?overrideX:(c2-c1)/(m1-m2), outputY=is90or270(ang1)?m2*outputX+c2:m1*outputX+c1 ) [outputX,outputY,r];