sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.23k stars 619 forks source link

FEATURE-merge two circuits #944

Open arashhabibi opened 1 month ago

arashhabibi commented 1 month ago

Good evening, I was wondering if there is anyway to merge to circuits described by falstad text files. I gather it should be possible to do that by merging both text files (except the first line). Am I wrong ? But in that case, could you please tell me the meaning of the figures on the first line of falstad files ? Or tell me where this information can be found ? Yours A.H.

pfalstad commented 1 month ago

I don't think that would work in general. The circuits might overlap. The easiest way is load one circuit, select all, copy, load the other circuit, paste.

If you wanted to write a script to merge two circuits, you could probably do it by moving one of them if necessary.

The first line is:

$ flags max-time-step speed current-bar-value voltage-range power-bar-value min-time-step

flags is the sum of: 1 for show current, 2 for small grid, 4 for don't show voltage, 8 for show power, 16 for don't show values, 64 for adjust timestep automatically