7 addPolyline :: String -> String -> (Double,Double) -> [(Double,Double)] -> <Proc> ()
\r
11 addPolyline diagramName name location polylineData
\r
13 It creates a polyline `name` to the diagram `diagramName` at `location`.
\r
14 The polyline should interpolate the points `polylineData`
\r
15 (assumed in this step to contain at most 30 points).
\r
17 You need the following functions:
\r
19 ::value[Apros/Legacy/aadd,Apros/Legacy/amodi]
\r
21 And the following symbol and attributes
\r
24 FUNCTION_X_COORDINATE(i)
\r
25 FUNCTION_Y_COORDINATE(i)
\r
28 Test that your function produces a functional model configuration.
\r
32 Extend your function so that it supports also `polylineList` with more
\r
33 than 30 points. For example
\r
35 addPolyline "Diagram" "PL" (100,100) [(x,sin x) | i <- [0..100], x = 0.1*fromInteger i]
\r
37 might produce the following model configuration:
\r
39 ![](http://www.simantics.org/~niemisto/SCL20150513/Polyline.png)
\r
41 You may implement the polyline using the following symbols and attributes
\r
44 FUNCTION_X_COORDINATE(i)
\r
45 FUNCTION_Y_COORDINATE(i)
\r
48 FUNCTION_OUTPUT_SIGN
\r
63 You need in addition to `aadd` and `amodi` the function
\r
65 ::value[Apros/Legacy/aconnect]
\r
67 Test that your function produces a functional model configuration.