feature requests for control system block diagrams

292 views
Skip to first unread message

Jason Sachs

unread,
May 22, 2014, 5:49:49 PM5/22/14
to blockdia...@googlegroups.com
Hi there--

I do a lot of control system block diagrams. For now I'm stuck using Simulink but it has some real drawbacks (one of which is that you need to have Simulink on your computer :-) and I'd like to use blockdiag instead. But there are a few features I need. Here's a sample block diagram:


Here's my attempt at doing the same topology in the interactive blockdiag viewer:

- Influencing the layout: I can't seem to influence the automatic layout to put the feedback loops where I want. The "folded" attribute doesn't do the right thing unless you specifically want a linear flow to "wrap" to the next row.
- Circle shapes don't get affected by the "length" and "width" attributes; I need a way to make the circle the side that I want
- It would be really nice to have a way to create a summing node with configurable "+" and "-" signs (Simulink uses a string "|+-" where the symbols are spaced evenly around the 270degree point, and "|" is a space. So "+|-" would give you a "+" symbol at the top, nothing at the left, and a "-" symbol at the bottom.
- It would be really nice to automatically draw junction dots for output branches
- It would be really nice to have a way to include a caption (centered under a block in a slightly smaller typeface) in addition to a label

--Jason

shirou

unread,
May 22, 2014, 10:33:45 PM5/22/14
to blockdiag-discuss
Hi Sachs,


Sorry, I could not answer the layout issue about influencing and feedback loop.

But I can answer some of others.

> - It would be really nice to have a way to create a summing node with configurable "+" and "-" signs

How about prepare such icon and use "background" ?

- It would be really nice to have a way to include a caption

--
このメールは Google グループのグループ「blockdiag-discuss」に登録しているユーザーに送られています。
このグループから退会し、グループからのメールの配信を停止するには blockdiag-disc...@googlegroups.com にメールを送信してください。
その他のオプションについては https://groups.google.com/d/optout にアクセスしてください。

Komiya Takeshi

unread,
May 23, 2014, 9:59:43 AM5/23/14
to blockdia...@googlegroups.com
Hi Sachs,
 
- Influencing the layout: I can't seem to influence the automatic layout to put the feedback loops where I want. The "folded" attribute doesn't do the right thing unless you specifically want a linear flow to "wrap" to the next row.

At present, there is no way to enhance or replace layout algorithm.
 
- Circle shapes don't get affected by the "length" and "width" attributes; I need a way to make the circle the side that I want

it seems like a bug. I'll check it.
 
- It would be really nice to have a way to create a summing node with configurable "+" and "-" signs (Simulink uses a string "|+-" where the symbols are spaced evenly around the 270degree point, and "|" is a space. So "+|-" would give you a "+" symbol at the top, nothing at the left, and a "-" symbol at the bottom.

Easy way, you can use background attribute to paste image.

Another way, you can implement custom shape.
This is example for UML-class shape::


- It would be really nice to automatically draw junction dots for output branches

It's good idea.
I want to implement it in future version.


Regards,

Takeshi KOMIYA 

Jason Sachs

unread,
May 23, 2014, 2:28:18 PM5/23/14
to blockdia...@googlegroups.com
Thank you for the quick response!


On Friday, May 23, 2014 6:59:43 AM UTC-7, Komiya Takeshi wrote:
 
- It would be really nice to have a way to create a summing node with configurable "+" and "-" signs (Simulink uses a string "|+-" where the symbols are spaced evenly around the 270degree point, and "|" is a space. So "+|-" would give you a "+" symbol at the top, nothing at the left, and a "-" symbol at the bottom.

Easy way, you can use background attribute to paste image.

Another way, you can implement custom shape.
This is example for UML-class shape::



Oh -- I see, so I can create a custom shape by writing a Python class? That sounds promising. I will look into it -- thanks!

Also one last thing -- is there an example of how to use the blockdiag library from within Python? I know how to use the blockdiag program from the system console, but I would like to write a Python script that uses blockdiag to convert from a string containing the ".diag" format, to an image (I am interested in SVG).

Komiya Takeshi

unread,
Jun 7, 2014, 1:43:06 AM6/7/14
to blockdia...@googlegroups.com
Hi Sachs,

Sorry for late response. I had a wedding party last week.


And then, I just fix a bug of circle shape.
it changes behavior of width and height attributes for circle shape.
please check it.
https://bitbucket.org/blockdiag/blockdiag/commits/287464b7a37fd34a09509a21c3abde35ad4dbd13


>Oh -- I see, so I can create a custom shape by writing a Python class? That sounds promising. I will look into it -- thanks!

Yes, you can do it :-)
All shapes of blockdiag are implemented by python codes.
there is no documents to create custom shapes,
but bundled shapes will help you, I think.

>Also one last thing -- is there an example of how to use the blockdiag library from within Python?

"interactive shell" is good example for you.
https://bitbucket.org/blockdiag/blockdiag_interactive_shell/src/aded93e902d3fadb13b1e4ef19385fc355320ac1/app/apps/blockdiag_main.py?at=default#cl-45

Regards,

Takeshi KOMIYA
Reply all
Reply to author
Forward
0 new messages