def makeShelfDouble(rotation: float, color: int, moveBy: List[float]): components = aecSpaceGroup(); base = aecSpace(); length = 200 base.boundary = shaper.makeBox(aecPoint(), 100, length) base.height = 25 divider = aecSpace(); divider.boundary = shaper.makeBox(aecPoint(), 4, length - 10) divider.height = 125 divider.moveTo(fromPnt = aecPoint(), toPnt = aecPoint(48, 5, 25)) lowShelfFront = aecSpace(); lowShelfFront.boundary = shaper.makeBox(aecPoint(), 43, length - 10) lowShelfFront.height = 2 lowShelfFront.moveTo(fromPnt = aecPoint(), toPnt = aecPoint(52, 5, 65)) lowShelfBack = spacer.copy(lowShelfFront) lowShelfBack.mirror([aecPoint(50, 0), aecPoint(50, 500)]) highShelfFront = spacer.copy(lowShelfFront, z = 40) highShelfBack = spacer.copy(lowShelfBack, z = 40) components.add([base, divider, lowShelfFront, lowShelfBack, highShelfFront, highShelfBack]) components.moveBy(moveBy[0], moveBy[1]) components.rotate(uniform(0, rotation), base.center_floor) color = getColor(color) for component in components.spaces: mesh = component.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, color)
def siteDevelopment(diameter: float = 100, targetArea: float = 100000): spacer = aecSpacer() sitWest = aecSpace() sitEast = aecSpace() sitWest.boundary = siteWest sitEast.boundary = siteEast sitWest.height = 20 sitWest.level = -20 sitEast.height = 20 sitEast.level = -20 mesh = sitWest.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorSand) mesh = sitEast.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorSand) spcGroup = aecSpaceGroup() allLevels = 0 area = 0 for building in buildings: if randint(0, 1) == 0 : site = sitWest else: site = sitEast boundary = site.points_floor point = site.point_ceiling xSize = diameter * uniform(1, 3) ySize = diameter * uniform(1, 3) targetArea = uniform((targetArea - 20000), (targetArea + 20000)) space = None while not space: space = makeSpace(building, point, xSize, ySize) if not space.fitWithin(boundary): point = site.point_ceiling space = None space.height = 15 build = [space] + spacer.stackToArea(space, targetArea) spcGroup.clear() spcGroup.add(build) levels = spcGroup.count allLevels += levels area += spcGroup.area if building['name'] != 'parking': if levels >= 10: index = 10 while index < levels: spcGroup.scale(0.8, 0.8, 1, index = index) index += 1 if levels >= 20: index = 20 while index < levels: spcGroup.scale(0.8, 0.8, 1, index = index) index += 1 if levels >= 30: index = 30 while index < levels: spcGroup.scale(0.8, 0.8, 1, index = index) index += 1 build = spcGroup.spaces color = building['color'] for space in build: mesh = space.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, color) return {"model": model.save_base64(), 'computed':{'floors':allLevels, 'area':area}}
def makeSpace(building, point, xSize, ySize): try: spcType = randint(building['plan'][0], building['plan'][1]) space = aecSpace() shaper = aecShaper() if spcType == 1: space.boundary = shaper.makeBox(point, xSize, ySize) space.rotate(randint(0, 360)) x = 0 boundaries = randint(1, 5) tempFloor = aecSpace() while x < boundaries: if xSize <= ySize: tempFloor.boundary = \ shaper.makeBox(point, uniform(xSize, ySize), uniform(xSize, ySize)) else: tempFloor.boundary = \ shaper.makeBox(point, uniform(ySize, xSize), uniform(ySize, xSize)) tempFloor.rotate(uniform(0, 360)) space.add(tempFloor.points_floor) x += 1 if spcType == 2: space.boundary = shaper.makeCylinder(point, (xSize * 0.5)) if spcType > 2 and spcType < 9: space.boundary = shaper.makePolygon(point, (xSize * 0.5), spcType) if spcType == 9: space.boundary = shaper.makeCross(point, xSize, ySize) if spcType == 10: space.boundary = shaper.makeH(point, xSize, ySize) if spcType == 11: space.boundary = shaper.makeL(point, xSize, ySize) if spcType == 12: space.boundary = shaper.makeT(point, xSize, ySize) if spcType == 13: space.boundary = shaper.makeU(point, xSize, ySize) return space except Exception: traceback.print_exc() return None
def placeBath(space: aecSpace): origin = space.origin_floor point = aecPoint(origin.x + 1, origin.y + 2750) bath = aecSpace() bath.boundary = shaper.makeBox(point, 2750, 1380) bath.height = 2749 bath.level = origin.z bath.color = aecColor.blue bath.color.alpha = 125 point = aecPoint(point.x, point.y + 390) tank = aecSpace() tank.boundary = shaper.makeBox(point, 200, 600) tank.height = 330 tank.level = origin.z + 400 tank.color = aecColor.white point = aecPoint(point.x + 400, point.y + 300) bowl = aecSpace() bowl.boundary = shaper.makeCylinder(point, 270) bowl.height = 410 bowl.level = origin.z bowl.color = aecColor.white point = aecPoint(origin.x + 2270, origin.y + 2750) vanity = aecSpace() vanity.boundary = shaper.makeBox(point, 480, 1380) vanity.height = 780 vanity.level = origin.z vanity.color = aecColor.white return [bath, tank, bowl, vanity]
def placeBathFixtures(space: aecSpace): origin = space.origin_floor point = aecPoint(origin.x + 1, origin.y + 3129) tub = aecSpace() tub.boundary = shaper.makeBox(point, 2000, 1000) tub.height = 450 tub.level = origin.z tub.color = aecColor.white point = aecPoint(origin.x + 1, origin.y + 150) tank = aecSpace() tank.boundary = shaper.makeBox(point, 200, 600) tank.height = 330 tank.level = origin.z + 400 tank.color = aecColor.white point = aecPoint(point.x + 400, point.y + 300) bowl = aecSpace() bowl.boundary = shaper.makeCylinder(point, 270) bowl.height = 410 bowl.level = origin.z bowl.color = aecColor.white point = aecPoint(origin.x + 1, origin.y + 1000) vanity = aecSpace() vanity.boundary = shaper.makeBox(point, 480, 1500) vanity.height = 780 vanity.level = origin.z vanity.color = aecColor.white mirror = aecSpace() mirror.boundary = shaper.makeBox(point, 10, 1500) mirror.height = 1500 mirror.level = point.z + 1000 mirror.color = aecColor.white return [tub, tank, bowl, vanity, mirror]
def placeBed(space: aecSpace, rotation: float = 0, bedBath = 0): origin = space.origin_floor center = space.center_floor if bedBath == 1: placeBath(space, rotation) space.boundary = shaper.makeBox(space.origin_floor, 4130, 2750) space.rotate(rotation, center) mesh = space.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorGreen) point = aecPoint(origin.x + 1500, origin.y + 1) bed = aecSpace() bed.boundary = shaper.makeBox(point, 1500, 2000) bed.height = 600 bed.rotate(rotation, center) mesh = bed.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorWhite) point = aecPoint(origin.x + 1600, origin.y + 20) pillows = aecSpace() pillows.boundary = shaper.makeBox(point, 1300, 400) pillows.height = 150 pillows.level = origin.z + 600 pillows.rotate(rotation, center) mesh = pillows.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorWhite)
def placeFurniture(space: aecSpace, rotation: float = 0): origin = space.origin_floor mesh = space.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorAqua) point = aecPoint(origin.x + 1032.5, origin.y) couchSeat = aecSpace() couchSeat.boundary = shaper.makeBox(point, 2000, 800) couchSeat.height = 370 couchSeat.rotate(rotation, space.center_floor) mesh = couchSeat.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorWhite) couchBack = aecSpace() couchBack.boundary = shaper.makeBox(point, 2000, 200) couchBack.height = 330 couchBack.level = origin.z + 380 couchBack.rotate(rotation, space.center_floor) mesh = couchBack.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorWhite) point = aecPoint(point.x + 300, point.y + 1200) table = aecSpace() table.boundary = shaper.makeBox(point, 1400, 600) table.height = 370 table.rotate(rotation, space.center_floor) mesh = table.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorWhite)
def placeBuilding(): spacer = aecSpacer() shaper = aecShaper() site = aecSpace() sitePoints = siteBoundary["coordinates"] sitePoints = [aecPoint(pnt[0], pnt[1], 0) for pnt in sitePoints] site.boundary = sitePoints site.color = aecColor.green site.height = 0.1 site.level = -0.1 spaces = [site] building = buildings[0] xWidth = building['diameter'][random.randint(0, 1)] yDepth = xWidth * 1.618 space = aecSpace() space.boundary = shaper.makeCross(origin = aecPoint(0, 0, 0), xSize = xWidth, ySize = yDepth) space.rotate(random.uniform(0, 270)) orientation = [ aecGeometry.NW, aecGeometry.NNW, aecGeometry.NW, aecGeometry.N, aecGeometry.NNE, aecGeometry.NE, ] if spacer.placeOnLine(space, site, orientation): space.height = building['height'] space.level= building['level'] space.color = building['color'] spaces += [space] space2 = spacer.stackToArea(space, building['area']) spaces += space2 return spaces
def randomFloor(point): try: floor = aecSpace() shaper = aecShaper() floorSizeX = uniform(60, 100) floorSizeY = uniform(60, 100) floorHeight = uniform(10, 20) floorType = randint(1, 11) width = uniform(33, 45) depth = uniform(33, 45) xOffset = uniform(10, 90) yOffset = uniform(10, 90) if floorType == 1: floor.boundary = shaper.makeBox(point, floorSizeX, floorSizeY) floor.rotate(uniform(0, 360)) x = 0 boundaries = uniform(1, 5) tempFloor = aecSpace() while x < boundaries: tempFloor.boundary = shaper.makeBox(origin=point, xSize=uniform(65, 100), ySize=uniform(65, 100)) tempFloor.rotate(uniform(0, 360)) floor.add(tempFloor.points_floor) x += 1 if floorType == 2: floor.boundary = shaper.makeCylinder( aecPoint(point.x + (floorSizeX * 0.5), point.y + (floorSizeY * 0.5)), (floorSizeX * 0.5)) if floorType > 2 and floorType < 9: floor.boundary = shaper.makePolygon( aecPoint(point.x + (floorSizeX * 0.5), point.y + (floorSizeY * 0.5)), (floorSizeX * 0.5), floorType) if floorType == 9: floor.boundary = shaper.makeCross(point, xSize=floorSizeX, ySize=floorSizeY, xAxis=xOffset, yAxis=yOffset) if floorType == 10: floor.boundary = shaper.makeH(point, xSize=floorSizeX, ySize=floorSizeY, xWidth1=width, xWidth2=depth, yDepth=depth) if floorType == 11: floor.boundary = shaper.makeU(point, xSize=floorSizeX, ySize=floorSizeY, xWidth1=width, xWidth2=depth, yDepth=depth) floor.rotate(uniform(0, 360)) floor.height = floorHeight return floor except: return False
def develop(): spacer = aecSpacer() sitWest = aecSpace() sitEast = aecSpace() sitWest.boundary = siteWest sitEast.boundary = siteEast sitWest.color = aecColor.sand sitEast.color = aecColor.sand spaces = [sitWest, sitEast] spcGroup = aecSpaceGroup() for building in buildings: if randint(0, 1) == 0: site = sitWest else: site = sitEast boundary = site.points_floor point = site.point_ceiling xWidth = randint(building['diameter'][0], building['diameter'][1]) yDepth = randint(building['diameter'][0], building['diameter'][1]) space = None while not space: space = makeSpace(building, point, xWidth, yDepth) if not space.fitWithin(boundary): point = site.point_ceiling space = None space.height = building['height'] space.level = building['level'] space.color = building['color'] area = randint(building['area'][0], building['area'][1]) if building['name'] == 'parking': build = [space] + spacer.stackToArea(space, area) else: build = [space] + spacer.stackToArea(space, area) spcGroup.clear() spcGroup.add(build) levels = spcGroup.count if building['name'] != 'parking': if levels >= 10: index = 10 while index < levels: spcGroup.scale(0.8, 0.8, 1, index=index) index += 1 if levels >= 20: index = 20 while index < levels: spcGroup.scale(0.8, 0.8, 1, index=index) index += 1 if levels >= 30: index = 30 while index < levels: spcGroup.scale(0.8, 0.8, 1, index=index) index += 1 build = spcGroup.spaces spaces += build return spaces
def placeBed(space): origin = space.origin_floor point = aecPoint(origin.x + 1500, origin.y + 1) bed = aecSpace() bed.boundary = shaper.makeBox(point, 1500, 2000) bed.height = 600 bed.color = aecColor.white point = aecPoint(origin.x + 1600, origin.y + 20) pillows = aecSpace() pillows.boundary = shaper.makeBox(point, 1300, 400) pillows.height = 150 pillows.level = origin.z + 600 pillows.color = aecColor.white return [bed, pillows]
def placeBathFixtures(space: aecSpace, rotation: float = 0): origin = space.origin_floor mesh = space.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorBlue) point = aecPoint(origin.x + 1, origin.y + 3129) tub = aecSpace() tub.boundary = shaper.makeBox(point, 2000, 1000) tub.height = 450 tub.level = origin.z tub.rotate(rotation, space.center_floor) mesh = tub.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorWhite) point = aecPoint(origin.x + 1, origin.y + 150) tank = aecSpace() tank.boundary = shaper.makeBox(point, 200, 600) tank.height = 330 tank.level = origin.z + 400 tank.rotate(rotation, space.center_floor) mesh = tank.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorWhite) point = aecPoint(point.x + 400, point.y + 300) bowl = aecSpace() bowl.boundary = shaper.makeCylinder(point, 270) bowl.height = 410 bowl.level = origin.z bowl.rotate(rotation, space.center_floor) mesh = bowl.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorWhite) point = aecPoint(origin.x + 1, origin.y + 1000) vanity = aecSpace() vanity.boundary = shaper.makeBox(point, 480, 1500) vanity.height = 780 vanity.level = origin.z vanity.rotate(rotation, space.center_floor) mesh = vanity.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorWhite) mirror = aecSpace() mirror.boundary = shaper.makeBox(point, 10, 1500) mirror.height = 1500 mirror.level = point.z + 1000 mirror.rotate(rotation, space.center_floor) mesh = mirror.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorWhite)
def stackTower(): spacer = aecSpacer() levels = randint(5, 70) floor = randomFloor(aecPoint(0, 0, 0)) if not floor: return height = floor.height floors = [floor] + spacer.stack(floor, levels - 1) if uniform(1, 3) == 1: plinth = aecSpace() plinthLevels = randint(1, 3) plinthHeight = height * plinthLevels plinth.wrap(floor.points_floor) plinth.height = plinthHeight pScale = uniform(1, 2) plinth.scale(pScale, pScale, 1) floors = floors[plinthLevels:] floors = [plinth] + floors colors = [aecColor.blue, aecColor.green] tower = aecSpaceGroup() tower.spaces = floors tower.setColor(colors[randint(0, 1)]) tower.rotate(uniform(0, 360)) if levels >= 10: index = 10 while index < levels: tower.scale(0.8, 0.8, 1, index=index) index += 1 if levels >= 30: index = 30 while index < levels: tower.scale(0.8, 0.8, 1, index=index) index += 1 return tower.spaces
def full(point, xWidth, yDepth, zHeight, level): floor = aecSpace() floor.boundary = shaper.makeBox(point, xWidth, yDepth) floor.height = zHeight floor.level = level setColors([floor]) return [floor]
def makeRackRound(): components = aecSpaceGroup() base = aecSpace() base.boundary = shaper.makeCylinder(radius=40) base.height = 5 support = aecSpace() support.boundary = shaper.makeCylinder(radius=5) support.height = 125 support.moveBy(0, 0, 5) top = aecSpace() top.boundary = shaper.makeCylinder(radius=50) top.height = 3 top.moveBy(0, 0, 130) components.add([base, support, top]) components.setColor(aecColor.sand) return components
def placeCloset(space): origin = space.origin_floor point = aecPoint(origin.x + 1, origin.y + 1) closet = aecSpace() closet.boundary = shaper.makeBox(point, 700, 2750) closet.height = 2749 closet.color = aecColor.orange return [closet]
def makeSpaceTower(stories: int = 5, mostRooms: int = 4): x = 0 y = 0 z = 0 rows = 1 columns = 1 spaces = [] vector = [0, 0, 0] xOffset = 100000 yOffset = 90000 zOffset = 3500 while y < rows: while x < columns: rotate = 0 while z < stories: spcGroup = aecSpaceGroup() offset = 0 if z == 0: southRooms = 0 zOffset = 10000 else: zOffset = 3500 southRooms = randint(1, 2) shell = makeFloor(offset = offset, rotation = rotate, roomsSouth = southRooms, roomsEast = randint(1, mostRooms), roomsNorth = 1, roomsWest= randint(1, mostRooms), roomsNorthSize = randint(8000, 15000), roomsSouthSize = randint(8000, 15000)) spcGroup.add([shell.corridor.space]) spcGroup.add(shell.rooms.spaces) spcGroup.moveBy(vector[0], vector[1], vector[2]) vector[2] += zOffset spaces += spcGroup.spaces z += 1 z = 0 x += 1 vector[2] = 0 vector[0] += xOffset x = 0 vector[0] = 0 vector[2] = 0 vector[1] += yOffset y += 1 xCoord = 10000 yCoord = 70000 point = aecPoint(xCoord, yCoord, 0) core = aecSpace() shaper = aecShaper() core.boundary = shaper.makeBox(point, 10000, 10000) core.height = ((stories - 1) * 3500) + 15000 core.color = aecColor.granite core.name = 'Shaft' spaces += [core] return spaces
def placeCloset(space: aecSpace, rotation: float = 0): origin = space.origin_floor point = aecPoint(origin.x + 1, origin.y + 1) closet = aecSpace() closet.boundary = shaper.makeBox(point, 700, 2750) closet.height = 2749 closet.rotate(rotation, space.center_floor) mesh = closet.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorYellow)
def makeSite(): site = aecSpace() site.points_floor = [ aecPoint(coord[0], coord[1]) for coord in siteBoundary["coordinates"] ] site.color = aecColor.green site.level = -20 site.height = 20 return site
def halfWidth(point, xWidth, yDepth, zHeight, level): width = xWidth * 0.5 half1 = aecSpace() half1.boundary = shaper.makeBox(point, width, yDepth) half1.height = zHeight half1.level = level halfSpaces = [half1] + spacer.row(half1) setColors(halfSpaces) return halfSpaces
def makeCore(point, xWidth, yDepth, zHeight): xCoord = (point.x - 5) + (xWidth * 0.5) yCoord = (point.y + (yDepth * (randint(0, 9) * 0.1))) point = aecPoint(xCoord, yCoord, point.z) core = aecSpace() core.boundary = shaper.makeBox(point, 10, 20) core.height = zHeight core.color = aecColor.gray return core
def placeFurniture(space): origin = space.origin_floor point = aecPoint(origin.x + 1032.5, origin.y) couchSeat = aecSpace() couchSeat.boundary = shaper.makeBox(point, 2000, 800) couchSeat.height = 370 couchSeat.color = aecColor.white couchBack = aecSpace() couchBack.boundary = shaper.makeBox(point, 2000, 200) couchBack.height = 330 couchBack.level = origin.z + 380 couchBack.color = aecColor.white point = aecPoint(point.x + 300, point.y + 1200) table = aecSpace() table.boundary = shaper.makeBox(point, 1400, 600) table.height = 370 table.color = aecColor.white return [couchSeat, couchBack, table]
def makeShelfSingle(length=200): components = aecSpaceGroup() base = aecSpace() base.boundary = shaper.makeBox(aecPoint(), 50, length) base.height = 25 divider = aecSpace() divider.boundary = shaper.makeBox(aecPoint(), 4, length - 10) divider.height = 125 divider.moveTo(fromPnt=aecPoint(), toPnt=aecPoint(0, 5, 25)) lowShelfFront = aecSpace() lowShelfFront.boundary = shaper.makeBox(aecPoint(), 43, length - 10) lowShelfFront.height = 2 lowShelfFront.moveTo(fromPnt=aecPoint(), toPnt=aecPoint(4, 5, 65)) highShelfFront = spacer.copy(lowShelfFront, 0, 0, 40) components.add([base, divider, lowShelfFront, highShelfFront]) components.rotate(uniform(0, 360), base.center_floor) components.setColor(aecColor.sand) return components
def makeRackCross(rotation: float, moveBy: List[float]): components = aecSpaceGroup(); base = aecSpace(); base.boundary = shaper.makeCylinder(aecPoint(), radius = 40) base.height = 5 support = aecSpace() support.boundary = shaper.makeCylinder(aecPoint(), radius = 5) support.height = 157 support.moveBy(0, 0, 5) top = aecSpace(); top.boundary = shaper.makeCross(aecPoint(-50, -50), 100, 100, xWidth = 10 , yDepth = 10) top.height = 4 top.moveBy(0, 0, 162) components.add([base, support, top]) components.moveBy(moveBy[0], moveBy[1], moveBy[2]) components.rotate(uniform(0, rotation), base.center_floor) for component in components.spaces: mesh = component.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, colorSilver)
def makeRackRound(color: int, moveBy: List[float]): components = aecSpaceGroup(); base = aecSpace(); base.boundary = shaper.makeCylinder(radius = 40) base.height = 5 support = aecSpace(); support.boundary = shaper.makeCylinder(radius = 5) support.height = 125 support.moveBy(0, 0, 5) top = aecSpace(); top.boundary = shaper.makeCylinder(radius = 50) top.height = 3 top.moveBy(0, 0, 130) components.add([base, support, top]) components.moveBy(moveBy[0], moveBy[1]) color = getColor(color) for component in components.spaces: mesh = component.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, color)
def __init__(self): self.__corridor = aecCorridor() self.__floor = aecSpace() self.__rooms = aecSpaceGroup() points = self.__shaper.makeBox(xSize=15000, ySize=10000) if points: self.__floor.boundary = points self.__floor.height = 4000 self.__floor.level = 0.0 self.__corridor.space.height = 4000
def makeCheckOut(): components = aecSpaceGroup() base = aecSpace() base.boundary = shaper.makeBox(aecPoint(), 75, 150) base.height = 100 top = aecSpace() top.boundary = shaper.makeU(aecPoint(), xSize=170, ySize=80, xWidth1=20, xWidth2=20, yDepth=20) top.height = 30 top.rotate(90) top.moveBy(-25, 50, 100) components.add([base, top]) components.setColor(aecColor.sand) return components
def __init__(self, corridor: int = 1, origin: aecPoint = aecPoint(), xSize: float = 5, ySize: float = 5, persons: int = 3): """ Constructor """ self.__compass = self.__geometry.compass self.__corridor = aecSpace() self.__persons = self.__minPersons self.__shape = self.Unknown self.__width = self.__minPersons * self.__personWidth if persons > self.__minPersons: self.__persons = persons = int(persons) persons -= self.__minPersons self.__width += (persons * self.__personWidth) self.__space = aecSpace()
def makeCheckOut(color: int = 0): components = aecSpaceGroup(); base = aecSpace(); base.boundary = shaper.makeBox(aecPoint(), 75, 150) base.height = 100 top = aecSpace(); top.boundary = shaper.makeU(aecPoint(), xSize = 170, ySize = 80, xWidth1 = 20, xWidth2 = 20, yDepth = 20) top.height = 30 top.rotate(90) top.moveBy(-25, 50, 100) components.add([base, top]) components.moveBy(70, 70) color = colorBrown for component in components.spaces: mesh = component.mesh_graphic model.add_triangle_mesh(mesh.vertices, mesh.normals, mesh.indices, color)
def makeRackCross(): components = aecSpaceGroup() base = aecSpace() base.boundary = shaper.makeCylinder(aecPoint(), radius=40) base.height = 5 support = aecSpace() support.boundary = shaper.makeCylinder(aecPoint(), radius=5) support.height = 157 support.moveBy(0, 0, 5) top = aecSpace() top.boundary = shaper.makeCross(aecPoint(-50, -50), 100, 100, xWidth=10, yDepth=10) top.height = 4 top.moveBy(0, 0, 162) components.add([base, support, top]) components.rotate(uniform(0, 360), base.center_floor) components.setColor(aecColor.sand) return components