Full CAD
Core Tools
- Auth
- Either open, password or user.
- Circuits
- Simulates circuits, perform analysis, list parts
- Boards
- Takes a circuit and lays it out onto a board, either bread, perf, vero or pc.
- Vectors
- A purely mathematical model of geometry. Handles both 2d and 3d
- Link
- Gives physical properties to solids and allows them to be linked together and exposed to forces to simulate motion.
- CAM
- Takes solids and produces G-Code for machining, 3d-printing or milling
- Control
- Takes G-code and sends it to a machine, 3d-printer, milling.
- MCU
- This would be pretty advanced, but simulate micro-controller code. Could even work with Link, if that allowed switches, sensors and motors.
Architecture
Runs as a Go server, use browser and UI. Can run locally or as a remote server. Server configuration will be stored in a Bolt database, projects will be saved in directories.
Circuits
At it's core, this is going to be like spice. However, I want the UI to feel more like the web UI I've used a few times. It should feel like breadboarding.
Components
A component is a set of leads, configuration values and a function that mathematically represents their relationship.
At the root, is a component family which holds the function. Different members of the family can have different configuration settings. Each family has a default which is either the most common instance or an ideal instance. This way, a circuit can be done quickly and simulated without needing to pick out an exact part for each component.
We can also have sub-families (like power-transistor) that still use the same function, but provide new defaults for the configurations and have a different default instance.
At the lowest level, there will be a list of components.
Sub-Circuits
For many IC's, there's a standard circuit. Rather than defining the behavior with a function, we can build the circuit.
Noise
The default setting will introduce a small amount of noise into the circuit. Many circuits (like multi-vibrators) only work with this. It's far more friendly for a beginner to start with a semi-realistic config and have experienced users need to change the settings to simulate true ideal circuits.
Architecture
Of course, the UI is separate from the simulator. I'm not sure what the best format is for circuit files. It may be good to use a Spice format, or it may make more sense to have our own with a converter.
Layout
Advanced feature, but there should be a way to provide some physical description of the board layout to simulate wire resistance, heat and RF.
Boards
Boards lays out parts on a circuit board. I want to focus on homebrew, so breadboards, veroboard, perfboard and pcb's with toner transfer or UV. Most boards will be created from circuits, but a board can also be created directly.
Each component has a package. There is a physical description of the part above the board and a description of the position and type of each connection. A connection is either a lead or a pad. And there is a definition of all the nodes.
After the Solids component is working, we should be able to export a board as a solid and import a package from a solid.
Breadboard
Shows a picture of the breadboard with the components labeled and placed. Need a way to describe the breadboard; holes per row, pitch, rails. The router will try and minimize the number of leads needed, the number of overlapping leads and there will be an option to avoid short leads.
Jumper Patterns
Sort of an off the cuff idea; if we had a huge database of projects, we might be able to come up with a few jumper patterns that are common. Using some header pins and perfboard, users could make a few of these to speed up breadboarding.
Perfboard
Places the objects on the perfboard and lays out where wire jumpers need to go. Again, need a way to describe the board.
There should be a silkscreen option here. Users can do toner transfer, or just glue the paper to the back of the board.
I'd also like a way to do "header stacks", layout multiple boards that connect with header pins (like an arduino shield), if that will simplify the board design. Needs to take into account the physical size of the components.
Veroboard
Much like perfboard. In addition, it shows where to cut.
PCB
The assumption here is either toner transfer or UV transfer, but it's pretty much the same thing either way. Boards are defined as either single or double layer. Can produce silk screens for each side.
Needs to define wires vs regions.
Maths
I'll need something that can define and solve equations dynamically, and therefore, might as well be exposed as a calculator. I could embed either Lua or Python, more power but also more risk. There are also libraries for expression evaluation.
Vectors
2D
Package for 2D primitives.
Shapes
Package for 3D primitives.
Parametric
Uses parameters to build up contextual scenes.
Box(boardThickness, w, d, h) {
l = rect({0,0},{boardThickness, d})
f = rect({boardThickness, 0},{w-boardThickness, boardThickness})
r = l.Add({w-boardThickness, 0})
b = f.Add({0, d-boardThickness})
e = {0,0,h}
Insert(Extrude(XYPlane, e, l, f, r, b)...)
}
where
Extrude( s Surface3, extrusion V3, shapes... Surface2) []Solid Insert( SceneElement )
I'm also kind of thinking that variables will be stored and can be read. So you could grab the l rect and use that.
This is going to need it's own language and environment. I want the ability to show a graphic window representing the work and do work there. Set a workspace as 2d or 3d, move a cursor around.
Assembly
Once a model is designed, it can be broken down into components and a set of assembly steps created. This needs to be easy to do, because it's the easiest step to dismiss as not important. But it can produce very useful outputs.
The most obvious value is that it shows how to assemble the piece. This can create a nice animation, or be broken down into something like a PDF.
But the more valuable is that it can serve as an automated test. During assembly we can automatically check for collision. If no path can be resolved, assembly may not be possible (imagine an instruction to install a piece inside an already closed assembly). We can also simulate tools and make sure there is room for them.