I have ground & ceiling geometrical data given in X, Y coordinates, which I plotted in thick brown in the chart below.
I want to add and plot vertical and horizontal lines (constituting building blocks) in between ground and ceiling; following some rules as follows:
# Vertical Lines
Shall be established every 4 feet apart. The lines' length is an even number with 2 feet increment (i.e. length is 2,4,6, or 8, etc.) as height permits at that location.
The vertical lines should NOT intersect with the ceiling. Each has to stop at least 2 feet before it hits the ceiling.
# Horizontal lines
Shall also be established every 4 feet apart. The lines' length has to be an even number with 4 feet increment (i.e. 4, 8, or 12, etc. …to whatever it takes)
The lines should not intersect with the ceiling's side slopes, at least 5 feet needs to be before hitting sideways
The lines should end up creating a proper outline of building blocks (rectangles/squares) in an organized format.
I manually tried to create some lines (with formulas) for illustration purpose (attached) but I appreciate if I can accomplish this perfectly with VBA.
It would be also fantastic at the end to provide the final number of utilized blocks and the surface area, but this is optional, plotting is more important!
I appreciate any help!
I also posted this in another forums, but I had no luck as I write for over 36 hours:
https://www.ozgrid.com/forum/index.p...ng-some-rules/
https://www.mrexcel.com/board/thread...rules.1167752/
Bookmarks