4 ms·
> Hacking on a wasm component model and wasi based plugin system these days. Same here! Can you share what you're working on? I'm (slowly) making a 3D CAD mode
by bschwindHN 2y ago
> Hacking on a wasm component model and wasi based plugin system these days.
Same here! Can you share what you're working on? I'm (slowly) making a 3D CAD modeling API, so you write Rust code to define a model, and compile it to WASM so it can hot-reload and let you iterate faster.
https://github.com/bschwind/opencascade-rs/tree/main/crates/wasm-example https://github.com/bschwind/opencascade-rs/tree/main/crates/...
- 1oooqooq 2y agoshape.faces().farthest(Direction::PosZ) nice. is this original from openscad (if that even is your inspiration)?
- bschwindHN 2y agoOpenSCAD is of course the OG for code-based CAD, but this particular syntax came about from converting CadQuery-esque queries into Rust iterators with a bit more type-safety instead of something stringly-typed. Here's a snippet from a CadQuery example: # 3a. The top-most Z face is selected using the >Z selector. # 3b. The lower-left vertex of the faces is selected with the <XY selector. result = result.faces(">Z").vertices("<XY") Right now it just does a naive linear search but at some point I'd like to extend it to use more of OpenCascade's underlying geometric acceleration structures (which I assume exist), and add more and more iterator adapters.