SuperAPI AI Directory

cadcraft-floor-plan

Design & creation

View repository

Updated 11-04 23:01

About this skill

Room floor plan

Before executing the specific method, read Craft scene commands and parameters, and execute according to the object selection, session, input replacement, and result checking described therein.

Task starting point

First read the assets and confirm the delivery purpose, target dimensions or duration, scope of modification, and required format. Directly adopt reasonable defaults for details that can be determined from the task and assets; only ask about missing conditions that would change the result.

When a visible editor is needed, hand it to the cadcraft-editor skill. Standalone installation:npx skills add full-aigc-skills/cadcraft-skills --skill cadcraft-editor. The currently added skill is a local candidate; before release, use the local companion plugin, and do not treat this installation command as proof of release.

Execution steps

  1. Determine the units, wall thickness, and dimension source; first establish the walls, doors/windows, and annotation layers.
  2. Draw wall lines at actual dimensions, and break wall segments at door openings; the example explicitly provides door leaves and opening arcs, while window openings and wall thickness must be created separately according to confirmed dimensions.
  3. Add door opening directions and fixed facilities; dimension annotations use a unified datum.
  4. Lay out the drawing frame and scale, save the project separately, and output a reading drawing.

Tool implementation

Use open/new_drawing to open or create, query_entities to verify geometry; execute to run commands, save to save, render to preview.

First read the actual tool schema, then fill in the parameters; use the returned values for object or document IDs. Queried commands must be available in the current backend. Before saving, choose a new output path and preserve the input. When the required algorithm, format, or command does not exist, state the gap; do not pass off a similar name as the real thing.

Result checking

  • Check wall line connections and the actual opening of door openings; door openings must not be sealed by closed rectangles; verify that native width/height annotations match entity measurements.
  • Use entity queries to verify key lengths, not just screenshots.
  • Mark unknown dimensions; do not claim a schematic as a construction drawing.

Check the actual content against the user's goal, not just the process exit code. For local edits, inspect local details; for layout tasks, inspect the whole page; for time-based media, inspect the start, end, and key segments. For abnormal results, first check the current project to avoid repeatedly performing irreversible operations.

Delivery

Return the editable project, actual derived files, and a brief explanation: what modifications were made, which steps were not executed due to current capabilities, and what the user needs to judge. List only files that actually exist and have been checked. If the user subsequently requests rework, read this source project and modify locally, preserving accepted content.

Generate a new room plan at actual dimensions

Use the scripts/room_plan.pyincluded with this skill; for input fields, seemillimeter dimension example. width and depth are the room width and depth; door_start is the distance from the left end of the bottom edge to the door hinge, door_width is the opening and door leaf width, and label is the room name kept as-is. The door opens 90 degrees into the room.

python3 <本技能目录>/scripts/room_plan.py --input room.json --output plan.json

Only generate a new drawing plan; do not modify existing drawings. Reject non-finite numbers, boolean dimensions, out-of-bounds openings, door leaves exceeding room depth, empty labels, and labels containing newlines; output uses exclusive creation. Wall lines are segmented by door openings; door leaves, opening arcs, text, and annotations are layered; dimensions use actual endpoints and do not override values. This is only a single-line spatial schematic and does not include wall thickness, windows, equipment, or construction design.

The CLI executes with argv cadcraft-cli run --metric, treating each step as one --cmd parameter, whose content is the command name, a space, and JSON parameters, and finally --save <新路径.dxf>. For MCP in the same viewport, first confirm that the new drawing is used, then call step by step in the same editor session according to the actual execute schema; a standalone CLI will not automatically update an already-open editor. Reopen the DXF to check entities, door openings, and native dimensions, then render to check text and annotations. Existing projects cannot directly apply this new drawing plan.

Observed host boundaries

The CLI has been verified to correctly save Chinese room names. The embedded package in the old enhancement 0.7.0 once displayed the "议" in "会议室" as a missing glyph; the source build candidate with documentation fonts added has passed retesting on a real Codex host: "会议室" is fully displayed, and after calling textedit on the same page it displays "会议室 已复核" and saves the DXF. This conclusion applies only to that new build candidate; it cannot be used to conclude that the old package or all fonts pass, nor should Chinese be arbitrarily replaced with pinyin. The native dimension measurement in the live inspect of that interface once returned 0, while the viewport and the measurement after saving the DXF and reopening were 6000/3500; entity endpoints or the measurement after saving and reopening must be used together, and dimensions must not be judged from cached fields alone. The plan generator itself does not modify the editor's font or dimension cache; embedded Chinese display depends on the installed runtime.

Supplementary actual measurement: the two dimensions in this scenario are orthogonal linear dimensions. After the live inspect returns Dimension, take the actual x and y of its geometry.p13/p14, form the p1/p2 arrays respectively, and then call in the same session execute the dist command, for example {"command":"dist","params":{"p1":[0,0],"p2":[6000,0]}}; these points are only format examples and must come from the current entity; input values must not be reused directly to impersonate readback. Check the returned distance against the target dimension and the result after saving and reopening. Other dimensions such as oblique, angular, and circular diameter cannot directly reuse the algorithm in this paragraph.