Better HN
topnewbestaskshowjobs
Log inSign up

mmiscool

6 karma · joined Sep 14, 2021 (5y ago) · 20 submissions

Submissions

comment 2mo ago · link · parent

Live link to the application https://v2.brep.io/public/app/master/web/index.html

2.

Building the CAD application of my dreams(v2.brep.io ↗)

2 points · by mmiscool · 2mo ago · 1 comment

comment 9mo ago · link · parent

Hey HN,

I’ve been building BREP.io, a parametric CAD system that runs entirely in the browser.

https://BREP.io

https://github.com/mmiscool/BREP.io

The core idea is applying a B-Rep-style topology layer on top of a 3D mesh representation.

Instead of treating the mesh as the model itself, the mesh is just the geometric carrier. On top of that, there’s an explicit topology layer that tracks: - Faces as structured surface regions - Edges as shared boundaries - Vertex connectivity and adjacency - Ownership relationships between elements

The mesh handles rendering and geometric evaluation. The topology layer handles structure.

This separation makes it possible to: - Perform parametric edits against stable topological entities - Run boolean operations while preserving structural relationships - Maintain a consistent model even as geometry changes

It’s been an interesting exercise in bridging two worlds: the performance and simplicity of mesh engines, and the structured consistency of boundary representation modeling.

If you’re into CAD kernels, computational geometry, or browser-based engineering tools, I’d love feedback especially on architectural tradeoffs when layering topology over meshes.

Happy to answer questions about how it works.

- mmiscool

4.

Brep.io A new browser based parametric CAD modeler with custom BREP kernel(brep.io ↗)

2 points · by mmiscool · 9mo ago · 1 comment

5.

New Browser-Based CAD System Is Best Friends with Triangle Meshes(hackaday.com ↗)

4 points · by mmiscool · 11mo ago · discuss

6.

New parametric CAD BREP kernel attempt(github.com ↗)

7 points · by mmiscool · 1y ago · discuss

comment 1y ago · link · parent

Currently the way that most AI assisted code editing systems work is they send the complete source code of the file being edited to the LLM and request that the LLM reply with the complete code file back with the modifications made. This works fine for very small code files but breaks down rather quickly as the amount of source code in the file grows.

To solve this problem I implemented the snipSplicer npm package.

This library allows you to pass the content of an original code file with a properly formatted snippet and return the file modified applying the code from the snippet.

It works by parsing the original code and the snippet in to an AST and then uses a deterministic process to surgically replace existing functions or class methods with the ones in the snippet.

It also handles cases where the function or method dose not currently exist by either appending the function to the code file or inserting any new methods in to the proper class if it exists.

This approach is extremely reliable and consumes significantly fewer output tokens.

Here is a slide deck that discusses this approach and how it was implemented. https://docs.google.com/presentation/d/1xdX09ELgW7lMU1E9KWIr...

I am very interested in feedback and the possibility of supporting more languages in the future. Every thing is open source and I am happy to accept pull requests from the community to support more languages.

https://www.npmjs.com/package/snipsplicer https://github.com/mmiscool/snipsplicer

8.

Better way to have LLMs modify existing code using ASTs(npmjs.com ↗)

1 points · by mmiscool · 1y ago · 1 comment

comment 1y ago · link · parent

I have been working on a new approach to using LLMs for software development. Currently with most of the AI coding tools out there you are either using a fancy autocomplete mode in the IDE like copilot or some sort of conversational mode like chat GPT or copilot chat.

It seems to me that when changes are suggested in the chat mode it frequently erases code or otherwise mangles the existing source code in the file being edited. In the case of using chatGPT I find that you have to do a lot of manual copying and pasting of snippets between the chat UI and the IDE.

This workflow is not ideal.

I started looking at the problem and came to the conclusion that the right method to use excising LLMs in a coding workflow was to solve the merging problem. If the merging problem could be solved and snippets produced by the LLM could reliably be applied to an existing file you could prompt your way to building a complete application.

To solve the merging problem I decided to look at how code is actually structured. ASTs (abstract syntax trees) are able to parse a source code file and represent the actual structure of the code as nodes and branches in a tree structure. While the code is in the tree structure it can be manipulated in a robust fashion and then the whole code file can be regenerated from the tree structure.

By breaking the file down in to the tree structure I can surgically replace functions or methods that are provided in properly formatted snippets provided by LLMs. We parse both the original file and the new snippet and identify duplicate definitions. In the case of a function we simply replace the existing function with the new one from the snippet. In the case of a class we find the existing class and replace or add the methods provided in the snippet to the existing code.

Working with the code in this fashion guarantees that new code being inserted is syntactically correct and the existing structure of the code being edited is retained over multiple editing iterations.

The result of this experiment is this this tool. It works only for JavaScript but the same methodology could be applied to other languages by implementing similar intelligent merging functionality and a bit of prompt engineering to tailor the approach to other languages. https://github.com/mmiscool/aiCoder

Currently it supports using the following LLMs: Local Ollama (no api key needed if running locally and you have a GPU) OpenAI Anthropic google gemini

10.

New aiCoder tool for JavaScript using ASTs for merging(aicoderproject.com ↗)

3 points · by mmiscool · 1y ago · 1 comment

comment 1y ago · link · parent

Been working on a little tool for doing LLM powered code generation.

The aiCoder project introduces a cutting-edge approach to AI-assisted software development by integrating advanced Abstract Syntax Tree (AST) manipulation for intelligent code merging. Unlike traditional tools, aiCoder utilizes ASTs to parse, analyze, and seamlessly integrate AI-generated snippets into existing codebases, ensuring syntactic and semantic coherence.

Merging using ASTs prevents code from being accidentally deleted or mangled like in other tools that take a line based approach. Currently it only supports JavaScript but the same approach could be applied to other languages.

https://github.com/mmiscool/aiCoder

12.

New AI code development tool that uses ASTs for merging snippets(github.com ↗)

1 points · by mmiscool · 1y ago · 1 comment

comment 4y ago · link · parent

There is a new CAD modeler in town called JSketcher. https://github.com/xibyte/jsketcher

A hosted version a recent build is available to try here. https://autodrop.cloud/jsketcher/

It is in early beta and is usable. No assembly support yet but it is planned for.

comment 4y ago · link · parent

JSketcher is a browser based parametric 3D modeler. It runs completely client side in the web browser.

A new feature has been recently added that allows JSketcher to import .FCStd models directly in to the environment.

Not only can JSketcher build 3D models from scratch using the sketch and feature history metaphors but it can now interoperate with FreeCAD on a new level.

As with many open source project this one is available on github so give it a try and have fun.

15.

Native FreeCAD importer added to JSketcher (browser based modeler)(github.com ↗)

2 points · by mmiscool · 4y ago · 1 comment

16.

The Noble Effort to Put OpenSCAD in the Browser(hackaday.com ↗)

1 points · by mmiscool · 4y ago · discuss

comment 5y ago · link · parent

Let me know what you think.

18.

Multi-color 3D prints using the hot end temperature to define the final colors(autodrop3d.com ↗)

1 points · by mmiscool · 5y ago · 1 comment