TIG, Steve: I hadn’t bothered to wrap my code in a module, or a class, since it will only execute standalone on my own machine. However, I suppose with other installed plugins with which it might conflict, it would indeed be better practice to do so, and I shall.
You say (I’m sure rightly!) that the code is ‘poorly formatted’. In what ways could I improve it? I did use the NetBeans IDE to ‘Format code’ to get the indenting regular, but i may have mucked it up since doing that.
Or did you mean ‘poorly structured’ - which it quite likely is!
TIG: you asked “What is it I am trying to do?”
I’m trying to create quarter-elliptical columns and other arched parts of an arched building that Scott Baker (@NewThinking2) is designing, on which I offered to help, out of interest and curiosity.
The overall building looks like this:
A previous version of the program drew one quarter of the arch and the floor levels shown in the image, and later the columns shown in my earlier attachment.
That program drew one face at a time - outer curved face, inner curved face, and side faces. Then drew the floor lines as shown in the image, with their corners exactly on (quarter) elliptical curves.
Optionally, the arch and column faces may slant with a slope of 2 feet in every ten feet.
The building has almost 100 floors, and is 1000’ high and 2000’ overall end to end.
It has variable floor heights, shown in the image above. Most ‘standard height’ floors (variable name std_floor_height
) are 10’ high. The lowest floor in line with the centre of the arch 1 is lower - 9’10", floors 2, 33 and 64 are 15’3, and the first floor (87) that spans all the way across the arch is 20’ high. There’s a hand drawn added floor 0, which is just a projection straight down of floor 1.
We wanted it drawn in ‘slices’ which could have a higher resolution than the floor height.
Near the top, the slice height needs to get smaller to preserve the appearance of curvature rather than just a few very long nearly horizontal straight lines.
There’s a notch 15’ deep and 21’ wide on the inner arch, to carry external elevators.
The shape proved impractical to draw ‘by hand’ with native tools, or even plugins, especially to draw the floor perimeters accurately with corners on the elliptical curve. I first tried by stretching a semicircle with 180 segments, and using Fredo Tools Shear to slant the sides and the notch, which gave the overall shape, but not the floor heights.
As I write, I see Steve Baumgartner has posted that he has identified the bug where my code fails to stop as it goes up the building.
But I’d still welcome further suggestions to improve structure and formatting, TIG, and thanks for looking at the code.