Unofficial Hacker News companion — get notified on comment replies, and more.

Show HN: ArchLang – floor plans as code, compiled to SVG/DXF/PDF (opens external site)

171 points by chanmeng 3 days ago playground.archlang.uk 54 comments (opens Hacker News) Vote (opens Hacker News)

View full thread · View on Hacker News

Comment thread (18)

  1. This is great if you are designing a house, but less useful for reconstructing an as-built. The main frustration I have is that it's not easy to translate physical measurements into the quantities needed. It's odd to me that rooms are measured from the centerline of the wall, rather than edge to edge, which is what you'd measure with a tape measure or a laser ruler.

    I have been trying to vibe code a proof of concept house-to-cad system where you feed it measurements and it uses a SLAM-like process to reconcile your measurements into a coherent house model. If anyone knows of something, let me know. Or please make it!

    Replies (3)
    1. I've been working on adding a feature like that to my carpentry simulator sawdust.diy (woodworker-native SketchUp, use actual carpentry tools and a global material library instead of extruding rectangles). I've got a feature now where you upload a picture of your scrap wood pile and it solves for the closest match in your materials region and adds all the wood to your scene. I'm trying to extend that to already-built geometry so you can plan a build in your existing space or create a digital twin of your house. I set a constraint on myself of trying to do it without a fancy lidar phone, but the SFM/metric depth models I've tried so far really struggle at the task.
      Replies (2)
      1. Sawdust rules, thank you for building it!
        Replies (1)
        1. Aw man, you made me smile! Thanks for using it.
      2. this is freaking genius! is it one of the old Ruby-based plugins? (circa 2018 user here, refused to go to the cloud)
        Replies (1)
        1. Thank you! It's a full top-to-bottom replacement, inspired by all of the frustration I experienced using SketchUp to design and build my house.

          It's designed with full human/agent parity, so every tool has a human UI and an agent UI that can be driven over MCP.

          It's also user extensible, we have a bunch of tool types supported. You can link your agent to your tool's user manual and your agent will create a tool definition for your particular model's specifications/constraints, and you'll never be shown a cut you can't actually make.

          You can also submit a tool definition for a tool type we don't yet support and I'll get it modeled and rigged and build the ui and animations for it (my target SLA is 48h from me getting the "unsupported tool type definition submitted" page to "tool is live in app"). This is how I discovered people wanted planers and jointers and belt sanders.

    2. What is the problem you're having? I walked around my house with my phone, videoing everything, took a few reference measurements, Codex then derived a 3d model of my house in Blender, and wrote Blender plugins to export per room pdfs with floor layouts. It has layers for my furniture and decorations, detects light switches and lights, etc. It also made hvac and electricity schematics, I had to feed it a bit more info of course, can't derive that only from video.
      Replies (3)
      1. This is such a good idea, did you follow an existing workflow and if so may I have a link?
        Replies (2)
        1. No I just made it up as I went along. I didn't think this would be anything special that anyone else would be interested in. Quite frankly I just speak a half-assed idea into Codex and it filters through my braindump. It corrects the things where I skipped over certain details, and then it comes up with better ways to do it.

          If you want you can email me and I'll send you the Blender file and you can have a look. It did things like program parts of the Blender user interface so that I could have predefined views, and checkboxes or dropdowns (so that I can turn off the front wall or the side wall, so that I could have cutaways through my house, that sort of stuff).

          I wish I could say that I thought of it myself to have it program this sort of stuff into Blender but it actually came up with that itself so I can't even take credit for that.

          One thing that I did do is tell it, "Hey, some of the furniture that you found in these videos is from IKEA. If you recognize those, look on the IKEA website and you can use the dimensions for reference for measurements of the other things." It actually worked quite well even. Amazing.

          Replies (1)
          1. Did you have Codex process the video or did you take stills?
            Replies (1)
            1. Codex took stills. I told it 'analyse the video', it will bisect it with ffmpeg to find cutovers between 'scenes' (in my case, rooms, and specific angles of rooms) so that it has representative stills of everything. Unless I tell it 'go back to this and this door' or whatever, and then it will find specifically that part.

              In fact what I did was even more low-effort. I just took a video with my phone. I have Dropbox on my phone. It automatically uploads and synchronizes with my desktop so I just told Codex, "Look on my camera uploads on my local Dropbox and analyze the latest video I took 10 minutes ago." I use that workflow often nowadays, with photis and videos.

              Continue this thread (1 replies) →

        2. i had similar experience except i sent to codex an ugly 20y.o. floor plan with writings i barely can read myself, as an output i had 3d model, shopping list with prices. all just plain english do me this and that. yeah, ai is that good.
      2. What did you/Codex use to convert the video to a 3d model, or at least 3d data?
        Replies (1)
        1. Codex did the conversion. I told it 'look at the video' and it then drove Blender through a Blender extension I also wrote (which also lets you annotate Blender models in a way so you can have your agents access those annotations, I haven't written up or published that part yet, maybe I should). So Codex basically generates pyblender code which it then executes inside Blender over HTTP.
      3. how intensive was the work for Codex, do you think the $20/MO plan can do this or would it need the Pro?
        Replies (1)
        1. I don't think I could have done this on the $20 plan, I don't really have experience with it. I'm on the $200 and back when I did this (this was with 6 Astra), I only very rarely used up my quota, although with this I may have and used resets, as it's the type of work for which it's very easy to spin up multiple agents (one per room, each working on separate files). Now with 6.2 Astra and heavy use, although coding and not so much 3d the last few weeks, I do tend to hit the limit early if I don't keep an eye on it. I have a little desktop monitor for that though, check out my github :) https://github.com/roel-v/CodexMeter-Companion (fully coded by Codex of course)
    3. I've been working on the exact same thing! Nothing to share yet, but if you find anything great please let me know. If my side project ever succeeds I'll share it.

      I've got blueprints and 3d models from the original design of the house, but there are many discrepancies and I want a system for reconciling things using some sort of probabilistic framework.

      Two semi-relevant projects that caught my eye when researching this:

      https://github.com/pascalorg/editor/tree/main https://arxiv.org/html/2611.34932v1