Arches and columns#
Arches that stand in a wall, and columns.
arch() builds a round or a pointed arch between two
blocks at its feet, and can cut its opening through a wall that is already
there. column() builds a square column, with an
optional plinth and capital. Both return the bounding box of the blocks
they placed, as a Volume.
An arch has short legs, so a tall archway is an arch on top of walls or
columns: start the arch at the height where the curve should begin (the
springing line). arch_profile() works out the shape of
an arch without building it, for example to find its height first.
- mciwb.builders.arch(start, end, block=Item.STONE_BRICKS, *, style=ROUND, thickness=1, depth=1, clear=False)[source]#
Build an arch standing in a vertical wall plane.
start and end are the two outermost blocks at the foot of the arch, on the same y and in a line along x or along z. The arch rises from there: a 7 block span with the default thickness of 1 looks like this (
#is the arch,.the opening):### y = start.y + 3 ###.### #.....# #.....# y = start.y: start and end are the # at each end
Its legs are short: build walls or a
column()under it for a taller opening (or start it higher up).arch_profile()gives the shape of any arch without building it.- Parameters:
start (Vec3) -- The block at one foot of the arch.
end (Vec3) -- The block at the other foot, in line with start along x or z.
block (Item | str | BlockState) -- The block to build the arch from.
style (str) --
"round"(semicircular) or"pointed"(gothic).thickness (int) -- The thickness of the ring of the arch, in blocks.
depth (int) -- How many blocks thick the arch is through the wall. The extra blocks go south of start and end (for an arch along x) or east of them (for an arch along z).
clear (bool) -- Also set the opening under the arch to air, for example to cut an arched doorway through an existing wall.
- Returns:
The bounding box of the arch. The opening is inside it.
- Raises:
ValueError -- If start and end are at different heights, are not in a line along x or z, or are the same block, if depth is less than 1, or if
arch_profile()rejects the span, thickness or style.BuildError -- If the server rejects a command, for example for an unknown block or an unloaded chunk.
- Return type:
Example:
from mciwb.imports import Item, Vec3, Volume, arch, get_client # a wall 9 wide and 6 high, with a pointed doorway cut through it wall = Volume.from_corners(Vec3(0, 70, 0), Vec3(8, 75, 0)) wall.fill(get_client(), Item.STONE_BRICKS) arch(Vec3(2, 70, 0), Vec3(6, 70, 0), Item.CHISELED_STONE_BRICKS, style="pointed", clear=True)
- mciwb.builders.arch_profile(span, thickness=1, style=ROUND)[source]#
Work out the shape of an arch, without building it.
The shape is given as
(u, v)cells, where u counts across the span from 0 tospan - 1and v counts up from the springing line, the row of the feet of the arch (v = 0). Nothing is sent to the server.- Parameters:
- Returns:
A tuple
(ring, opening)-- the cells of the ring of the arch, and the cells of the opening under it.- Raises:
ValueError -- If style is not
"round"or"pointed", thickness is less than 1, or span is less than2 * thickness + 1(which leaves no opening).- Return type:
Example
>>> ring, opening = arch_profile(7) >>> max(v for u, v in ring) + 1 # the height of the arch 4 >>> sorted(u for u, v in opening if v == 0) [1, 2, 3, 4, 5]
- mciwb.builders.column(base, height, block=Item.QUARTZ_PILLAR, *, width=1, plinth=None, capital=None)[source]#
Build a square column standing at base.
- Parameters:
base (Vec3) -- The bottom block in the middle of the column.
height (int) -- The total height of the column in blocks, including any plinth and capital.
block (Item | str | BlockState) -- The block for the shaft.
width (int) -- The width of the shaft, in blocks. An odd width is centred on base, an even width has its extra block to the east and south.
plinth (Item | str | BlockState | None) -- If given, the bottom layer is this block, one block wider than the shaft on every side.
capital (Item | str | BlockState | None) -- If given, the top layer is this block, one block wider than the shaft on every side.
- Returns:
The bounding box of the column, including its plinth and capital.
- Raises:
ValueError -- If width is less than 1, or height is too small to hold one block of shaft as well as the plinth and capital asked for.
BuildError -- If the server rejects a command, for example for an unknown block or an unloaded chunk.
- Return type:
Example:
from mciwb.imports import Item, Vec3, column column(Vec3(0, 70, 0), 6, plinth=Item.QUARTZ_BRICKS, capital=Item.CHISELED_QUARTZ_BLOCK)