Dear SketchUppers,
playing around with ThomThom’s TrueBend plugin, I cannot understand what exactly the Bend by Distance function does. Hoping for someone to enlighten me on this.
The “Distance” is a bit weird as-is. I’d originally wanted this distance to be the Sagitta of the bend. Sagitta (geometry) - Wikipedia
But it wasn’t as trivial to compute the curve based on the sagitta distance.
I probably should have made bending by degrees the default option.
You can switch to degrees by typing post-fixing “deg” in the VCB - for example: 60deg
You can switch back to Distance by post-fixing a lengt unit. This is similar to how to switch between controlling AOV or Focal Length when operating the Zoom tool.
For those who are curious to what the Distance currently represent:
Given distance of the bending axis - in the example above: 360cm - this becomes the circumference of a max bend (360°). This is then used to compute the radius of the max-bend (in this case 57.296 cm). When you grab the handle to start bending the tool takes the world distance from the first pick and second pick as a reference distance. Let say you drag the Drag Handle 40cm.
It will then take the drag distance * 0.5 and divides that by the max-bend radius to produce a ratio. This ratio is in turn used to produce an angle for the bend (360° * ratio).
Why this random set of numbers and units? Because I wasn’t able to make the Sagitta work. I then just focused on making the dragging experience somewhat sane. I was mainly after setting a degree if I needed precision, so I just called it quits. This was after all an experiment that was suppose to only take half a day - which in the end ate up a few weeks. (Completely spoiling my own promise to myself of not starting a new project without finishing the current one.) I also figured this was such a niche thing that no-one would really care and I should just get back to my original project ASAP.
I logged a not for myself to change the default to bend by angle:
Thomas, thanks so much for taking the time and writing all this. I can only imagine what a tedious job creating a plugin is.
That said, I believe the default already is to bend by angle no?
At first I did intuitively think that the distance ought to be something like the sagitta but the measurements didn’t match.
It’s a pity the sagitta intention didn’t work; the plugin is really powerful and really popular in the community as you know.
Actually - you are correct. I’d read my own code wrong.
I’m not that great at math, and it took me a long time to realize that resolving a circle of a given circumference and a given sagitta is non-trivial. I might return to this and try to resolve it by iterative approximation, but… time will tell…
I hadn’t really expected it to be seen as particularly useful. Especially since you already had Shape Bender and FredoScale’s Radial Bend. Guess it was a good thing I released it instead of just leaving it on the shelf.
Have you come across my post back from November? I was trying to model a meticulously perfect spiral stairwell with its edges aligned to the axes. None of the plugins you mentioned really helped to achieve the perfectly aligned look I was going after (you can see the screenshots displaying each problem every individual plugin brought with itself). I think I also used your TrueBend somewhere in-between the experiments because it’s one of the very rare plugins that would allow me to align the stair edges properly. However, because you can’t specify a radius, the plugin didn’t do much help in that particular mission. I did use a lot of Clean-Up though. I think TrueBend has a massive potential. Glad you released it.
I do have an issue logged to be able to enter Radius. But with a note that I thought it might be similar challenge as entering sagitta. Enter radius · Issue #23 · thomthom/true-bend · GitHub
(That kind of surprises me reading it now - but it’d been a while since my head was in this, so its a good chance former-me knows best on this one.)
Once you decide Arc Length is to be fixed and you have sagitta then you can get radius or circumference.
Circumference = 2PI()r
You can get Angle by imagining a right triangle under the Arc with one corner at one end of the arc and the other at the center of the circle associated with the arc.
a = top side = half Arc Length
b = left side = Radius - Sagitta
Angle = atan(a/b)
if this is true then
def angle4tt(length, sagitta)
#length = Arc length
#formula from https://en.wikipedia.org/wiki/Sagitta_(geometry)
radius = (sagitta / 2) + ((length * length) / 2 * sagitta)
#right triangle maths to calc Angle . triangle between circle center and one arc end point where a is length of topside and b is other non hypotenuse side
a = length / 2 #length of topside od triangle
b = radius - sagitta # length of downward side of triangle
angle4tt = Math.atan(a/b).radians
end
Sorry … that code doesnt implement the theory which appears to be tru by my testing.
this code does better to allow the Arc Length and Arc Sagitta as an input and get the full wide Angle as an output
def angle4tt(length, sagitta)
#length = Arc length
l = length / 2
#formula from https://en.wikipedia.org/wiki/Sagitta_(geometry)
radius = ((sagitta * sagitta) + (l*l)) / (2 * sagitta)
#radius = (sagitta / 2) + ((l * l) / (2 * sagitta))
#puts radius
#right triangle maths to calc Angle . triangle betwwen circle center and one arc end point where a is length of topside and b is other non hypotenuse side
a = length / 2 #length of topside od triangle
b = radius - sagitta # length of downward side of triangle
angle4tt = 2 * Math.atan(a/b).radians
end
Hi,
it seems like it’s not possible to enter a precise value in the PCB.
For example if I enter “127,3deg” I end up with “127,00”.
While it seems possible to have decimals by using the red handle… but it’s almost impossible to be accurate this way.
Can anyone confirm that it’s not just me ?
I can confirm that it’s you. Or at least it is the Display Precision you have set for Angle units. You can set the precision higher in Model Info>Units.