Arc
Arc
The Arc is a graphical shape object that allows you to draw curved lines, arcs, or circular sectors (“pie” shapes) on your screen.
Beyond being a static image, it can change dynamically based on the instantaneous value of a tag.
Common Use Cases
- Circular Gauges: Displaying the progression of an analog value (e.g., 0-100%) around a circle (e.g., 0-360 degrees).
- “Pie” Slices: Visualizing a tank’s fill percentage as a circular slice.
- Radar Animations: Creating a rotating “radar” line effect by dynamically changing the Start Angle property.
Properties Panel – Key Properties
The power of this object comes from its ability to bind its angles directly to tags.
Value
- Sweep Angle:
- Function: This is the object’s most important dynamic property. It overrides the static ArcSweepAngle value in the Advanced panel, binding the length of the arc (how many degrees it spans) to a tag.
- Use Case: Converting a Tank_Level (0-100) tag into an ArcSweepAngle between 0-360 degrees to create a dynamic circular gauge.
- Start Angle:
- Function: Dynamically binds the starting point of the arc (ArcStartAngle) to a tag.
- Use Case: Creating a “Radar” effect by using a script to continuously increase the connected tag value from 0 to 360.
- Fill Color / Fore Color
- Function: Used to dynamically change the arc’s line (Fore Color) or fill (Fill Color) color based on a tag’s status (e.g., Level > 90 implies “Red”).
Advanced Panel – Key Properties
The Advanced panel defines the default (static) appearance and style of the arc.
- ArcStartAngle (Default Start Angle)
- The default starting point of the arc (in degrees). 0 = 3 o’clock direction.
- ArcSweepAngle (Default Sweep Angle)
The default length of the arc (in degrees).
- FillColor
- Transparent (Default): The object draws only a curved line (arc).
- Solid: The object connects the center of the arc with the start and end points to draw a “pie” slice or sector and fills the interior with this color.
- LineWidth
- Sets the thickness of the arc (or line if fill is not used) in pixels. A thick LineWidth can create a gauge effect.
- LineStyle
- Determines the style of the line (Solid, Dash, Dot, etc.).
- AntiAlias True (Recommended)
- prevents the curved line from looking “pixelated” or jagged, providing a much smoother appearance.
Common Usage Example
Example: Circular Level Indicator (“Pie” Slice)
To show a tank’s 0-100% fill level as a 0-360 degree “pie” slice.
- Add an Arc to the screen.
- Go to the Advanced panel:
- ArcStartAngle: 0 (Start from 3 o’clock).
- ArcSweepAngle: 0 (Default to 0, as it will be bound dynamically).
- FillColor: Blue (This is required to draw a “pie” slice).
- AntiAlias: True.
- Go to the Properties panel:
- Bind Value -> Sweep Angle property to the Tank_Level (0-100) tag.
- Note: If the tag is 0-100 but you want 0-360 degrees, you must perform a conversion (e.g., Tank_Level * 3.6) via a script or an intermediate tag.
Result: When the tag value is 50, the object draws a 180-degree (semicircle) blue pie slice. When 25, it draws a 90-degree (quarter circle) slice.
