For version 0.7.0.
To top.  Up: ..Applications..Blockdraw

bondgraph


Alphabetical index
@bgArrowWidth bgconnect bondgraphArrow effortlabel flowlabel gyjunction hbond junction junctionlbl pjunction putblockTerminal sjunction tbond terminalfrom terminalto tfjunction ubond

Namespace:  ..Applications..Blockdraw

A bond graph is graphical representation of a dynamic model in one of several analogous physical domains. What they look like is best explained by an example.
Bond graph example
Angry
A typical application of the bondgraph extension.

Source: show/hide visit
Unlike the blocks typically used with blockdraw, the corresponding elements here, the junctions, do not have a visible border and their bounding boxes are not used. Instead, a circle of radius @smallblockr, centered at the junction's origin, defines where bonds connect with the junction. The extension also helps with other tasks, such as drawing the unusual arrowheads and putting the effort and flow labels on the correct side of the bond.
Sections:    Junctions    Terminals    Bonds    Effort and flow labels

Junctions

Junctions
Angry
Four types of junctions, clarifying the meaning of the direction parameter for transformers and gyrators.

Source: show/hide visit
pjunction
Type:§Drawable
A parallel (type 0) junction.
See also:sjunction tfjunction gyjunction junction
sjunction
Type:§Drawable
A serial (type 1) junction.
See also:pjunction tfjunction gyjunction junction
tfjunction
arrowdir::§Float lbl::§Drawable §Drawable
Constructs a transformer junction.
The arrowdir value should be one of the constants for non-diagonal directions defined by ..Shapes..Layout / shiftoff, and tells the direction in which the arrow by the transformer is pointing (that is, not in which direction the arrow is located relative to the transformer). The label lbl is placed outside the arrow.
See also:pjunction sjunction gyjunction junctionlbl
gyjunction
arrowdir::§Float lbl::§Drawable §Drawable
Constructs a gyrator junction.
This is almost like tfjunction, but the symbol is different, and the little arrow is never drawn; arrowdir is only used to control the position of lbl relative to the gyrator.
See also:pjunction sjunction tfjunction junctionlbl
junction
txt::§Drawable §Drawable
This function is low-level and should not be used directly in standard applications.
Centers the argument at the origin, and sets a suitable bounding box.
See also:pjunction sjunction junctionlbl
junctionlbl
txt::§Drawable arrowdir::§Float lbl::§Drawable doArrow::§Boolean §Drawable
This function is low-level and should not be used directly in standard applications.
Extends junction by also adding a label, and possibly a small arrow between the junction mark and the label.
The arrowdir value should be one of the constants for non-diagonal directions defined by ..Shapes..Layout / shiftoff.
See also:tfjunction gyjunction

Terminals

Terminals
Angry
Terminals with bonds. The terminal, positioned at the plus mark, is connected with the serial junction. The non-pure fuctions terminalto and terminalfrom will add the terminal label to a §•Group state and return the path for the bond. The path is then stroked with an arrowhead to indicate its extent and direction.

Source: show/hide visit
terminalfrom
•dst::§•Group oldBlock::§Drawable pos::§Coords newBlock::§Drawable §Path
Places newBlock near pos in such a position that it can be beautifully connected to oldBlock, and adds it to •dst as a side effect.
The newBlock will typically be just a label, while oldBlock is an existing junction.
The result is a path for the bond from oldBlock to newBlock.
See also:putblockTerminal bgconnect
terminalto
•dst::§•Group oldBlock::§Drawable pos::§Coords newBlock::§Drawable §Path
Places newBlock near pos in such a position that it can be beautifully connected to oldBlock, and adds it to •dst as a side effect.
The newBlock will typically be just a label, while oldBlock is an existing junction.
The result is a path for the bond to oldBlock from newBlock.
See also:putblockTerminal bgconnect
putblockTerminal
newBlock::§Drawable pos::§Coords oldBlock::§Drawable §Drawable
This function is low-level and should not be used directly in standard applications.
Places newBlock near pos in such a position that it can be beautifully connected to oldBlock.
See also:terminalto terminalfrom

Bonds

Painting bonds
Angry
Various means to paint a bond path. In the top row, the extent and direction of the path is indicated using a standard stroke with an arrowhead. The second row shows how bondgraphArrow may be used to produce arrowheads suited for bond graph bonds, but note that direct use of these arrowheads is considered low-level, and the user should use the convenience function illustrated in the last row instead.

Source: show/hide visit
bgconnect
pica::§Drawable picb::§Drawable §Path
Dynamic references:none
Constructs the path that shall be used for drawing the bond between junctions.
If terminal points are involved, the convenience functions terminalto or terminalfrom may produce the path instead.
ubond
p::§Path §Drawable
Dynamic references:none
Draws a bond along the path p, with undetermined causality (that is, without a causality mark).
The size of the arrowhead may be changed using , see .
hbond
p::§Path §Drawable
Dynamic references:none
Draws a bond along the path p, placing a causality mark at the head of the path.
The size of the arrowhead may be changed using , see .
tbond
p::§Path §Drawable
Dynamic references:none
Draws a bond along the path p, placing a causality mark at the tail of the path.
The size of the arrowhead may be changed using , see .
@bgArrowWidth
Used by:
Type:§Length
Default binding:4 bp
The width of the half arrowhead used for bonds.
See also:bondgraphArrow
bondgraphArrow
p::§Path doHook:false::§Boolean doCausal:false::§Boolean ahAngle:30°::§Float fillAsStrokeing:true::§Boolean (> picture::§Drawable cut::§Length <)
Dynamic references:Whole graphics state and
This function is low-level and should not be used directly in standard applications.
Arrowhead for bond graph junctions. All arguments but doHook and doCausal have the same meaning as for ..Shapes..Graphics..MetaPostArrow.
When doHook, the half arrowhead is produced, and when doCausal, the causality mark is produced. This is like two different kinds of arrowheads combined in one function.
See also:hbond tbond

Effort and flow labels

Positioning labels
Angry
Positioning effort and flow labels on the correct side of a bond, as defined by the side of the asymmetric arrowhead.

Source: show/hide visit
flowlabel
p::§Path lbl::§Drawable §Drawable
Places lbl on the flow side of the bond along p.
effortlabel
p::§Path lbl::§Drawable §Drawable
Places lbl on the effort side of the bond along p.
Get Shapes at SourceForge.net. Fast, secure and Free Open Source software downloads