Apparatus and process for creating variably sized block diagrams to accommodate variable text contents while yet retaining overall block shape4891770Abstract A computer aided design system processes input instructions to produce block diagrams. Each block has sub-blocks and text may be placed into each sub-block. The system then automatically draws the blocks to an optimum size. Boundaries defining the edge of a plurality of blocks are moved to accommodate the bounded sub-block requiring the most space. Claims I claim: Description The present invention relates to a computer aided design (CAD) system for displaying block diagrams, the system comprising a data input device, a processing unit, a memory device and an output device for displaying text and graphics.
______________________________________
Boundary A = w
Boundary B = -w
Boundary D = h
Boundary E = -h
Rectangle -w, -h, w, h
End sub-block
______________________________________
Sub-block 2
______________________________________
Boundary B = w
Boundary C = -w
Boundary D = h
Boundary E = -h
Rectangle -w, -h, w, h
End sub-block
______________________________________
Sub-block 3
______________________________________
Boundary A = w
Boundary B = -w
Boundary E = h
Boundary F = -h
Rectangle -w, -h, w, h
End Sub-block
______________________________________
Sub-block 4
______________________________________
Boundary B = w
Boundary C = -w
Boundary E = h
Boundary F = -h
Rectangle -w, -h, w, h
End sub-block
End block 1
______________________________________
The second set of input instructions identify boundaries with respect to parameters and a local origin. Each parameter refers to the size of text to be entered in the respective sub-block and defines the distance between a boundary and the centre of the sub-block, which is adopted as the local origin. An algorithm for generating a set of output instructions from new or amended input instructions is termed a block generation subroutine. The subroutine comprises the steps of: 1. giving values to the parameters in the second set of input instructions from the values indicating the size of character strings in the first set of input instructions; 2. defining boundaries with respect to one origin while following boundary laws; and 3. defining the boundaries with respect to a common origin for the whole frame. The boundary laws ensure that a boundary can only exist as a single straight line at a fixed angle with respect to the frame--ie horizontal or vertical. Furthermore a boundary may only move along an axis which is perpendicular to said boundary and it cannot be rotated, twisted, or bent etc. Thus when a boundary is specified by two or more parameters a relationship is established between these parameters. The block generation subroutine will now be described in detail with respect to the example considered above and shown in FIG. 4. The parameter values from the first set of input instructions are substituted into the second set of input instructions thus: Sub-block 1, w(1)=1/2, h(1)=10 Thus Boundary A(1)=+1/2 Boundary B(1)=-1/2 Boundary D(1)=+10 Boundary E(1)=-10 Sub-block 2, w(2)=7, h(2)=1/2 Thus Boundary B(2)=+7 Boundary C(2)=-7 Boundary D(2)=+1/2 Boundary E(2)=-1/2 Sub-block 3, w(3)=21/2, h(3)=1/2 Thus Boundary A(3)=+21/2 Boundary B(3)=-21/2 Boundary E(3)=+1/2 Boundary F(3)=-1/2 Sub-block 4, w(4)=21/2, h(4)=-11/2 Thus Boundary B(4)=+21/2 Boundary C(4)=-21/2 Boundary E(4)=+11/2 Boundary F(4)=-11/2 Now the system calculates the position of the boundaries and the local origins with respect to the local origin of sub-block 1 identified herein as origin(1). The position of boundary A is defined by A(1) as half a character to the right. The position of boundary B is defined by B(1) as half a character to the left, origin (2) (by B(2)) is (1/2+7) 71/2 characters to the left and boundary C is 141/2 characters to the left (from C(2). Boundary D is 10 characters up, Boundary E is 10 characters down and Boundary F is 11 characters down, E(1)+E(3)+F(3). Thus at this stage: Boundary A(1)=+1/2 Boundary B(1)=-1/2 Boundary D(1)=+10 Boundary E(1)=-10 Expressions for the same boundary but having different signs allow the local origins to be specified with respect to the local origin of sub-block 1, thus Origin 2(1)=-71/2, 0 The system calculates the position of origin (2) relative to origin (1) from the boundary statements, thus: B2(1)=-1/2 C2(1)=-141/2 Now D(2)=+1/2 but D(1)=+10 which violates a boundary law. A relationship between these parameters is therefore established such that D(2)=D(1) and the smaller value is made equal to the larger value. This also applies to E(2) so that: D2(1)=+10 E2(1)=-10 The system now considers sub-block 3. A(3)=+21/2 but A(1)=+1/2 so, as described above, A(1) is made equal to A(3) and: Boundary A3(1)=+21/2 and A(1)=+21/2 Boundary B3(1)=-21/2 and B(1)=-21/2 E3(1)=-10 from which Origin 3(1)=-101/2 and Boundary F3(1)=-11 So at this stage:
______________________________________
Boundary A(1) =
21/2
Boundary B(1) =
-21/2
Boundary D(1) =
+10
Boundary E(1) =
-10
Origin 2(1) =
-71/2, 0
Boundary B2(1) =
-1/2
Boundary C2(1) =
-141/2
Boundary D2(1) =
+10
Boundary E2(1) =
-10
Origin 3(1) =
0, -101/2
Boundary A3(1) =
21/2
Boundary B3(1) =
-21/2
Boundary E3(1) =
-10
Boundary F3(1) =
11
______________________________________
The system now checks to see if any boundary laws have been broken and identifies B(1)=-21/2 but B2(1)=-1/2 therefore the value of B2(1) is changed to -21/2. However moving boundary B compresses sub-block 2 so that it is less than 2w(2) characters wide hence:
______________________________________
Origin 2(1) =
91/2
Boundary C2(1) =
-161/2
hence:
Boundary A(1) =
21/2
Boundary B(1) =
-21/2
Boundary D(1) =
+10
Boundary E(1) =
-10
Origin 2(1) =
91/2, 0
Boundary B2(1) =
-21/2
Boundary C2(1) =
161/2
Boundary D2(1) =
+10
Boundary E2(1) =
-10
Origin 3(1) =
0, -101/2
Boundary A3(1) =
21/2
Boundary 3(1) =
-21/2
Boundary E3(1) =
-10
Boundary F3(1) =
11
______________________________________
The system now considers sub-block 4 Boundary B(4)=+21/2 Boundary C(4)=-21/2 Boundary E(4)=+11/2 Boundary F(4)=-11/2 Boundary C(4) has the same sign as C2(1) therefore Boundary C4(1) is made equal to C2(1) Boundary C4(1)=-161/2 The width is therefore less than that for sub-block 2 so Boundary B4(1)=-21/2 Boundary E(1)=-10 Therefore origin 4(1) is -10-11/2=-111/2 and Boundary F4(1)=-111/2-11/2=-13 thus Boundry B4(1)=-21/2 Boundary C4(1)=-161/2 Boundary E4(1)=-10 Boundary F4(1)=-13 Origin 4(1)=-91/2, -111/2 On checking the boundary laws F3(1) is made equal to F4(1). The system has reached the end of the second input instructions therefore the redundant terms may be removed thus defining the block as: Vertical Boundaries A(1)=21/2 B(1)=-21/2 C(1)=-161/2 Horizontal Boundaries D=+10 E=-10 F=-13 The position of the origin is now shifted to a block entry point. A vector defines the relationship between the two origins and its horizontal and vertical components are added to the values for the vertical and horizontal boundary values respectively. A similar translation allows the block to be positioned within the frame. The complexity of the algorithm depends on the complexity of the block diagrams to be drawn but the same principles are followed. The boundaries are not necessarily coincident with the outline of a block and different shaped blocks are possible, for example circles, parallelograms, hexagons etc. The boundaries define regions into which text may be placed so that a single character string must be placed within one of these regions. Each block is defined by two sets of input instructions which are stored in respective files. Each pair of input instructions are cross referenced by a unique number allowing a plurality of first and second sets of instructions to be loaded and then processed collectively. An output file is then generated containing a plurality of sets of output instructions. Additional features such as the position of entry and exit points and the position of block linkages may be added to the output file or stored in a separate output file and then combined for generating output instructions.
|
Same subclass Same class Consider this |
||||||||||
