edit_project
ChatGPTChanges a plan with a short script of plan operations, which the person's open editors show at once. Returns the IDs that changed, the warnings and a description of every floor. A change is never final: undo_change takes it back and restores what it removed, for the last 50 changes. JavaScript that changes the plan through the global object plan, run as one transaction: when any call fails, nothing changes and the error names the line. return a value to see it in the result. There is no network, clock or randomness. plan.brief() → the answers the person gave when starting the project, or null: {floors, bedrooms, bathrooms, area (living area in m²), kitchen (open or separate), office, roof, plot ([width along the street, depth] in mm), street (the compass side the street runs along), site (flat, slope or water), slope (percent), downhill (the compass side the ground falls toward, where water lies), patio, pool, beds, fence, parking (garage or carport, when they want one), basement, roofTerrace, notes (wishes in their own words)} plan.floors() → [{floor, name, height}] plan.elements(floor) → elements in the file shape plan.get(id) → the element in the file shape, with its floor plan.describe(floor) → rooms with areas and sizes, what each door connects, window directions, routes and warnings plan.warnings() → warnings on every floor plan.check(rules) → [{floor, ids, message}]: the plan checked against a rule set beyond the layout warnings, each warning naming its part of the rules: "din18040-2" (DIN 18040-2, barrier-free dwellings without the wheelchair requirements: door widths and heights without thresholds, bathroom doors that open outward, hallways 1200 wide, 1200 × 1200 free in every room and in front of toilets, basins and showers, 1200 in front of kitchen fittings and 900 in front of cupboards, 1200 along one long side of a bed and 900 along the other, level showers 1200 × 1200, a window sill of 600 or lower in living rooms and bedrooms, straight stairs with handrails on both sides) or "irc2021" (IRC 2021 in part: room areas, widths and ceiling heights, glazing, emergency escape openings from sleeping rooms, the egress door, hallway widths, stair widths, risers, treads, headroom and handrails, spiral stairs, and guards). Rooms are known by their names, such as bedroom, bathroom, kitchen and hall plan.search(words) → catalog items {item, name, category, width, length, height} plan.addFloor(name, height?) → the new top floor's index plan.setFloor(floor, {name?, height?}) plan.wall(floor, from, to, {thickness?, height?, material?, curve?}) → wall id; curve bends the wall into an arc whose middle lies that far from the straight line, to the left of from → to (negative bends it right), at most the wall's length. material Glass makes a wall of glass in a slim metal frame with a mullion at least every 3000, for meeting rooms and offices or a glazed facade plan.walls(floor, points, {closed?, thickness?, height?, material?, curve?}) → wall ids, joined at every corner; curve bends every wall alike plan.circle(floor, center, radius, {thickness?, height?, material?}) → wall ids: four curved walls that close a round room or tower, radius to their centerline; doors and windows fit on them like on straight walls plan.room(floor, name, min, max, {thickness?, floorFinish?, floorColor?, wallFinish?, wallColor?, storeys?}) → {room, walls}: a room of its own with four walls around the inside corners min and max plan.marker(floor, name, at, {floorFinish?, floorColor?, wallFinish?, wallColor?, storeys?}) → room id: names the walled area around at. storeys (1) makes a room two or more storeys high, such as a great room or an entrance hall open to the floor above: the floors above leave its area open as a void, so give the floor above walls or a railing along the void's edge plan.door(wall, offset, {kind?, width?, height?, elevation?, hingeAtEnd?, opensOutward?, head?, open?}) → door id; offset is from the wall's from point to the door's center. kind is standard, glass (a glass leaf in a metal frame, as for a meeting room in a glass partiti…