So, I went through the trouble of identifying multiple VBL objects in a single grid (which ended up being harder than I thought) and I just found out that hollow objects (square, circle, an custom hollow polyline objects) provide vbl data that *looks* like two shapes. And, unfortunately, I don't see a way to identify that the interior "hollow" shape is subtractive from the raw getVBL data while other separate shapes would be additive. That means that I either go with the original method that's more accurate with one contiguous shape (even with hollow spots) or one that's more accurate with multiple shapes (but is additive with hollow shapes.)Full Bleed wrote: ↑Thu Aug 27, 2020 12:26 pmNote2: After just looking at multiple VBL object grids, it looks like the first coordinate pair is used as a kind of "break" between additional shapes. So getting those shapes might not be that hard after all...
Sample Solid Rectangle:
Spoiler
[{
"generated": 1,
"shape": "polygon",
"fill": 1,
"close": 1,
"thickness": 0,
"points": [
{
"x": 6126,
"y": 5127
},
{
"x": 6126,
"y": 5176
},
{
"x": 6177,
"y": 5176
},
{
"x": 6177,
"y": 5127
},
{
"x": 6126,
"y": 5127
}
]
}]
"generated": 1,
"shape": "polygon",
"fill": 1,
"close": 1,
"thickness": 0,
"points": [
{
"x": 6126,
"y": 5127
},
{
"x": 6126,
"y": 5176
},
{
"x": 6177,
"y": 5176
},
{
"x": 6177,
"y": 5127
},
{
"x": 6126,
"y": 5127
}
]
}]
Sample Hollow Rectangle:
Spoiler
[{
"generated": 1,
"shape": "polygon",
"fill": 1,
"close": 1,
"thickness": 0,
"points": [
{
"x": 6281,
"y": 5129
},
{
"x": 6281,
"y": 5175
},
{
"x": 6232,
"y": 5175
},
{
"x": 6232,
"y": 5129
},
{
"x": 6281,
"y": 5129
},
{
"x": 6281,
"y": 5129
},
{
"x": 6230,
"y": 5127
},
{
"x": 6230,
"y": 5177
},
{
"x": 6283,
"y": 5177
},
{
"x": 6283,
"y": 5127
},
{
"x": 6230,
"y": 5127
}
]
}]
"generated": 1,
"shape": "polygon",
"fill": 1,
"close": 1,
"thickness": 0,
"points": [
{
"x": 6281,
"y": 5129
},
{
"x": 6281,
"y": 5175
},
{
"x": 6232,
"y": 5175
},
{
"x": 6232,
"y": 5129
},
{
"x": 6281,
"y": 5129
},
{
"x": 6281,
"y": 5129
},
{
"x": 6230,
"y": 5127
},
{
"x": 6230,
"y": 5177
},
{
"x": 6283,
"y": 5177
},
{
"x": 6283,
"y": 5127
},
{
"x": 6230,
"y": 5127
}
]
}]
Despite wasting a bunch of time identifying multiple shapes in the data I'm probably going to get more accurate usage out of using what works with an expectation of a single contiguous shape in the grid since that's more likely for me.