Irev-Dev / Round-Anything

A set of OpenSCAD utilities for adding radii and fillets, that embodies a robust approach to developing OpenSCAD parts.
https://kurthutten.com/blog/round-anything-a-pragmatic-approach-to-openscad-design
MIT License
492 stars 48 forks source link

Attachment Point Conundrum #41

Closed RAMilewski closed 2 years ago

RAMilewski commented 2 years ago

I suspect there is no easy answer to this, but it's been more than half a century since my last math class and I wanted to check in case I missed something really obvious.

Given the code below is there a way calculate the location of the point on the curve closest to the black dot ( [20,25] ) for various rounding values?

`use <Round-Anything-1.0.4/polyround.scad>

points = [ [0, 0, 0], [10, 0, 0], [10, 10, 20], [20, 25, 10], [0, 15, 20] ];

$fn = 18; polyline(points, 0.5);
translate([20,25,0]) color("black") circle(0.5);

translate([20,0,0]) { polyline(polyRound(points), 0.5); translate([20,25,0]) color("black") circle(0.5); }`

Screen Shot 2022-04-28 at 3 33 51 PM

Irev-Dev commented 2 years ago

Does this help? https://github.com/Irev-Dev/Round-Anything/blob/master/images/formulas.png

RAMilewski commented 2 years ago

Perfect, Thank you!