Re: Staircase generator plug-in

by dorin » Mon Feb 03, 2025 6:08 pm

Could someone verify this?
With this input data:
Image
I have this output for cut out shape
Image
I suppose the problem is between lines 1149~1156

Code: Select all

} else if (spiralStaircaseAngle <= Math.PI) {
   float width = (1 - cosAngle) * spiralStairOuterRadius;
   float height = spiralStairOuterRadius + treadDelta;
   cutOutShape = "M 1," + (height - treadDelta) / height
        + " A " + spiralStairOuterRadius / width + "," + (height - treadDelta) / height + " 1 0,0 0," + (1 - sinAngle)
        + " L " + cosAngle * (spiralStairInnerRadius - spiralStairOuterRadius) / width + "," + (spiralStairOuterRadius - sinAngle * spiralStairInnerRadius) / height
        + " A " + spiralStairInnerRadius / width + "," + spiralStairInnerRadius / height + " 1 0,1 " 
           + -cosAngle * (spiralStairOuterRadius + spiralStairInnerRadius) / width + "," + (height - treadDelta) / height
        + " z";
It happened only in this range 90~180 degrees with inner radius > half pole.
As you can see there is a lot of math which I don't know.
Any opinion (or help) is highly appreciated.
Thanks in advance!