// Attributes
attr carportWidth = 5.0 // Width of the carport
attr carportDepth = 3.0 // Depth of the carport
attr carportHeight = 0.2 // Thickness of carport roof
attr poleHeight = 2.0 // Height of poles
attr poleWidth = 0.1 // Thickness of poles
attr carportColor = "#313333" // Color for roof and poles
// Start Rule
Footprint -->
s('1, 0, '1) // Normalize size (1x1 base)
PlaceCornerPoles // Place poles first
t(0, poleHeight, 0) // Move up to top of poles
Roof // Add roof directly at top of poles
// Roof definition
Roof -->
color(carportColor)
s(carportWidth, carportHeight, carportDepth)
center(y)
primitiveCube()
// Place poles at the four corners (aligned to roof corners)
PlaceCornerPoles -->
CornerPole(0, 0)
CornerPole(carportWidth, 0)
CornerPole(0, carportDepth)
CornerPole(carportWidth, carportDepth)
// Corner pole placement (centered on corner point)
CornerPole(xPos, zPos) -->
t(xPos - poleWidth/2, 0, zPos - poleWidth/2)
Pole
// Pole definition
Pole -->
color(carportColor)
s(poleWidth, poleHeight, poleWidth)
center(y)
primitiveCube()
Rule 2:

// Attributes
attr carportheight = 2.0 // Height of carport roof
attr poleheight = 2.0 // Height of support poles
attr polewidth = 0.1 // Thickness of poles
attr carportColor = "#313333" // Color for both roof and poles
// Start Rule
Footprint -->
s('1, 0, '1) // Normalize size (1x1 base)
extrude(carportheight)
comp(f) { top: Roof | side: NIL }
PlaceCornerPoles
// Roof definition
Roof -->
color(carportColor)
// Place poles at the four corners
PlaceCornerPoles -->
CornerPole(0, 0)
CornerPole(0, 1)
CornerPole(1, 0)
CornerPole(1, 1)
// Corner pole placement
CornerPole(xPos, zPos) -->
t(xPos, 0, zPos)
Pole
// Pole definition
Pole -->
s(polewidth, poleheight, polewidth)
center(y)
primitiveCube()
color(carportColor)