Imagine a program that designs plates with geometric cutouts. You start with a rectangular plate. A plate can have one or more rectangular depressions carved out of it. Each of these can have one or more circular holes cut out of it. I have attached an image with a few sample plates to illustrate what I'm talking about.
Each of these plates is defined by it's width and height. Each rectangular cutout is defined by its position, width and height. Each Circle is defined by it's position and radius. For the sake of simplicity, assume that nothing overlaps or hangs off of edges.
Here is a very basic UML diagram of the class structure:
In order to draw this in 3D you have to generate geometry from the hierarchy starting at the bottom and then working up, so first generate the inner hole surfaces, then generate the depression faces, and finally generate the plate faces. It seems like all of the code that generates these vertices and triangles should be in view models, not in the model. What does that class structure look like?
Here are a few thoughts I've had:
Any thoughts on how best to mesh these models with their view models? All of the MVVM articles I've found are either very high-level and talk about application level architecture where the view model is a single box or they are very low-level and talk about databinding and commands.