I am creating an interactive desktop app using .NET 9 and Avalonia for the frontend. The…
- User
I am creating an interactive desktop app using .NET 9 and Avalonia for the frontend. The application will be similar to 2D CAD programs and focus on road designs, essentially a smaller version of 12D Model.
It will primarily focus on 2D sketching such as:
Lines, arcs and polylines Poylgons and calculating properties of these such as area Data will be 3D but height profiles will mostly be linear interpolations Additonally, there will be design capabilities such as calculating a mesh (TIN/DTM) from a set of points, creating alignment profiles, adding designs rules for cross-falls, grade changes, thicknesses etc.
The geometry kernal will be my own wrapper over multiple nuget packages and my own custom types. Geometry in the kernal are immutable (and most are structs). I'm providing these kernal details to help make design decisions, however changes to the geometry kernal are out of scope for this discussion.
Im at the beginning planning stage for the foundational architecture. A program like this needs to be performant but also just as important it needs to be well designed, maintainble and extensible.
Here is a breakdown of a few core aspects of the program:
We need CAD objects to have a framework for defining dependencies, for example a CAD Line will have a dependency on the three points that define it. If these change, the CAD Line needs to be recalculated (or cached, or rerendered etc.) All CAD objects have a unique id and name All CAD objects belong to some layer A layer has its own styling for its CAD objects Not all CAD objects ARE geometry. Think of a CAD object as something that can "live" in the CAD world, with graphics, data and dependencies, but might not necessarily be pure geometry. A CAD program is an very reactive style of program. Really we'd like to be able to know whenever any of these properties change.
So with that, lets dive into the problem we need to solve. Lets focus on the foundational modelling of data types. These include what i've just been placeholder calling "CAD objects", how they react and how the rest of the program reacts to geometry changes but also other types like their name, layer, style etc. Thoroughly explore the problem space. The architecture you produce should be of high quality and comprable to how large scale programs are designed.
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.