| 1 |
REQUIRE "johnpye/fourbar.a4c"; |
| 2 |
REQUIRE "plot.a4l"; |
| 3 |
|
| 4 |
MODEL plotfourbar; |
| 5 |
|
| 6 |
F IS_A fourbar; |
| 7 |
|
| 8 |
y[pointset] ALIASES (F.y_A, F.y_B, F.y_C, F.y_D, F.y_A) |
| 9 |
WHERE pointset IS_A set OF integer_constant; |
| 10 |
|
| 11 |
x[pointset1] ALIASES (F.x_A,F.x_B, F.x_C, F.x_D, F.x_A) |
| 12 |
WHERE pointset1 IS_A set OF integer_constant; |
| 13 |
|
| 14 |
curve1 IS_A plt_curve(pointset,y,x); |
| 15 |
|
| 16 |
curves[curve_set] ALIASES (curve1) |
| 17 |
WHERE curve_set IS_A set OF integer_constant; |
| 18 |
|
| 19 |
plot1 IS_A plt_plot_integer(curve_set,curves); |
| 20 |
|
| 21 |
METHODS |
| 22 |
|
| 23 |
METHOD values; |
| 24 |
RUN F.values; |
| 25 |
END values; |
| 26 |
|
| 27 |
METHOD default_self; |
| 28 |
RUN plot1.default_self; |
| 29 |
(* RUN curve1.default_self; |
| 30 |
RUN F.default_self; *) |
| 31 |
plot1.title := 'four bar node positions'; |
| 32 |
plot1.XLabel := 'x'; |
| 33 |
plot1.YLabel := 'y'; |
| 34 |
curve1.legend := 'fourbar'; |
| 35 |
END default_self; |
| 36 |
|
| 37 |
METHOD check_self; |
| 38 |
RUN plot1.check_self; |
| 39 |
RUN curv1.check_self; |
| 40 |
RUN F.check_self; |
| 41 |
END check_self; |
| 42 |
|
| 43 |
METHOD scale_self; |
| 44 |
RUN F.scale_self; |
| 45 |
END scale_self; |
| 46 |
|
| 47 |
METHOD bound_self; |
| 48 |
RUN plot1.bound_self; |
| 49 |
RUN curve1.bound_self; |
| 50 |
RUN F.bound_self; |
| 51 |
END bound_self; |
| 52 |
|
| 53 |
METHOD default_all; |
| 54 |
RUN default_self; |
| 55 |
END default_all; |
| 56 |
|
| 57 |
METHOD check_all; |
| 58 |
RUN check_self; |
| 59 |
END check_all; |
| 60 |
|
| 61 |
METHOD bound_all; |
| 62 |
RUN bound_self; |
| 63 |
END bound_all; |
| 64 |
|
| 65 |
METHOD scale_all; |
| 66 |
RUN scale_self; |
| 67 |
END scale_all; |
| 68 |
|
| 69 |
METHOD specify; |
| 70 |
RUN F.reset; |
| 71 |
END specify; |
| 72 |
|
| 73 |
METHOD on_load; |
| 74 |
RUN reset; |
| 75 |
RUN values; |
| 76 |
RUN default_self; |
| 77 |
END on_load; |
| 78 |
END plotfourbar; |