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)

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

View full thread · View on Hacker News

Comment thread (11)

  1. 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.

            Replies (1)
            1. That's not low effort, it's great!
      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)