Whats the best way to draw paths for "unknown" amount of objects?

Hi all experts,

I am currently working on a project where i need to visualize the position and size of a bunch of (almost) rectangular-shaped objects that are automatically detected by a thermal camera.

The amount are somewhere between 0-25 objects and i’m recieving following tagvalues for each one:

Object#
x1 = int ◄─ top left X pos
y1 = int ◄─ top left Y pos
x2 = int ◄─ top right X pos
y2 = int ◄─ top right Y pos
x3 = int ◄─ btm right X pos
y3 = int ◄─ btm right Y pos
x4 = int ◄─ btm left X pos
y4 = int ◄─ btm left Y pos
tempMax = int ◄─ maximum temperature
tempMin = int ◄─ minimum temperature
tempAvg = int ◄─ average temperature
isSame = int ◄─ This automagically checks if the object has been moved or if it is a new one

Object mockup

x1-y1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x2-y2
┌───────────────────────────────────┐
│ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .│
│. . . . .tempMin . . . . . . . .tempAvg. . . . . . . . tempMax . . .│
│ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .│
└───────────────────────────────────┘
x4-y4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x3-y3

What’s the best way to achieve a page that dynamically shows these objects in Ignition?
I would really appreciate if someone had the time to point me in the right direction or even better,
maybe create something that i can try to continue to work with?
(Vision or Perspective does not matter at this moment)

Best regards

When all else fails, get out the Paintable Canvas (Vision). I’d supply the twenty-five-ish entries as a dataset on a custom property. Though a generated SVG for Perspective could be delivered by the WebDev module. (I’m not comfortable enough with SVGs to do the latter just yet, unless I had to.)

1 Like

This would be quite easy to do with the paintable canvass as @pturmel notes. Here's my first experiment with it--not perfect, but gives a quick example of how to draw from coordinates like this, as well as scaling after drawing from coordinates to make everything fit into whatever space you give it.