Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asciio/AACircuit integration/compatibility (was: Join under common ASCII umbrella project) #8

Open
nkh opened this issue Jul 1, 2023 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@nkh
Copy link

nkh commented Jul 1, 2023

Hi, we're https://github.com/nkh/P5-App-Asciio

You probably know of https://josoansi.de/download.php and its python clone.

After I saw the project above I though of making an Asciio mode to handle electronic components; but I have little electronics knowledge so my requirements may fall short. I have also been looking for something to export the ASCII to that would generate some png/svg and by pure luck I found your project.

Gains for Asciio

  • new types of components
  • fun factor (that's why we do all this, right?)

Gains for schemascii

  • not having to draw stuff by hand
  • a place where to put a library of components
  • add requirements for the ASCII editor
  • have specific ASCII components developed
    • one that can rotate in all directions
    • component with arrows that can't be detached

You don't have to develop anything in Asciio, except if you want to, only cooperate on common requirements and formats.

Let us know if this would be of interest to you.

@dragoncoder047
Copy link
Owner

  1. I didn't know of either of those two libraries, so thanks for sharing them.

My inspiration was actually SVGBob and the "circuit diagram" example from that page.

Schemascii was designed with two goals in mind: 1. to create legible circuit diagrams (duh), and 2) to force myself to use the correct reference designators. My main use for it is embedding it in Python-Markdown-rendered web sites like my blog, where I've used it a few times.

Schemascii's internal representation is pretty much just the raw text, no structure or anything, and any coordinate information is thrown out after rendering each component or line to a string. If you connect two separate wires using the G symbols, electrically, they are connected (both ground), but Schemascii has no idea and ends up making them appear as two separate wires when you hover over them. So I doubt I'd be able to add any thing to export a Schemascii diagram to any of the other formats.

What would probably wok better is adding compatibility to Asciio/AACircuit to draw stuff in Schemascii format, so you could have an easier time editing it. We'll see how that goes. I know nothing about Perl so I'd be no help with the code.

@nkh
Copy link
Author

nkh commented Jul 1, 2023

if you like SvgBob you will like Goat https://github.com/blampe/goat which I used to generate this https://raw.githubusercontent.com/nkh/P5-App-Asciio/801164e39f63011c71074f50bb54e6f578187549/documentation/mdbook_asciio/src/examples/screenshot_2023-06-25_17-45-31.png

if you render each comonent separately there must be some kind of structure otherwise you couldn't

U1:NE555,7,6,2,1,5,3,4,8

and have it at the right place

Asciio is all about an easier time editing, ASCII editing is fun 2 minutes otherwise.

What do you think would be necessary in Asciio to draw in Schemascii format? And what's the format?

No need for coding help :)

@dragoncoder047
Copy link
Owner

if you render each comonent separately there must be some kind of structure otherwise you couldn't

U1:NE555,7,6,2,1,5,3,4,8

and have it at the right place

WHat you pasted there is a "BOM data" which is pulled out separately before components are rendered, and Schemascii matches them up using the reference designator. That is how it knows when you write R1 in a circuit it is 10kΩ, because you wrote R1:10k somewhere else. The full format is described in format.md but there's not much to it either way.

I think that the easiest thing to do at least for Asciio is you could have a "Schemascii mode" where it draws boxes using . for corners and :~ for sides (what Schemascii expects) and line corners using * exclusively, or some way to export to that even if it doesn't show it onscreen. Schemascii's box format is just a way to make components bigger so you can put more terminals on them. You can draw a resistor with a box if you want, Schemascii won't care.

@dragoncoder047 dragoncoder047 changed the title Join under common ASCII umbrella project Asciio/AACircuit integration/compatibility (was: Join under common ASCII umbrella project) Aug 11, 2023
@dragoncoder047 dragoncoder047 added enhancement New feature or request question Further information is requested labels Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants