Importing Points Data or Point Cloud

Dear BlenderArtist,

I am doing something that’s a little bit experimental.

Basically I would like to import point data from outside into Blender as polygon. The format is simple Unicode as below:

//===========================================================================
// Script data follows:
//===========================================================================

<Events>
<StrokeEvent>
<StrokeHeader>
<EventPt> Wait: 0.000s Loc: (369, 196) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO </EventPt>
<Recorded> Yes </Recorded>
<RandSeed> 0x000000000, 0x000000000 </RandSeed>
<Smooth> Count: 3
Loc: (0, 0) Pr: 0 Ti: 1 Ro: 0
Loc: (0, 0) Pr: 0 Ti: 1 Ro: 0
Loc: (0, 0) Pr: 0 Ti: 1 Ro: 0
</Smooth>
<PrevA> Loc: (0, 0) Pr: 0 Ti: 1 Ro: 0 </PrevA>
<PrevB> Loc: (0, 0) Pr: 0 Ti: 1 Ro: 0 </PrevB>
<OldHd> Loc: (0, 0) Pr: 0 Ti: 1 Ro: 0 Dr: (0, 0) Hd: (0, 0) </OldHd>
<NewHd> Loc: (0, 0) Pr: 0 Ti: 1 Ro: 0 Dr: (0, 0) Hd: (0, 0) </NewHd>
</StrokeHeader>
Wait: 0.000s Loc: (372, 195) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.031s Loc: (376, 194) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (383, 192) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.022s Loc: (389.5, 190) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.028s Loc: (399.25, 186.5) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.030s Loc: (411.625, 182.25) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (425.312, 177.625) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (440.656, 172.312) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.018s Loc: (452.328, 168.156) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.030s Loc: (467.164, 163.078) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (482.082, 157.539) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (496.541, 152.27) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (510.771, 147.135) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (523.885, 142.567) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (535.943, 137.784) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (547.471, 132.392) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (556.736, 128.196) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (563.868, 124.598) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (568.934, 122.299) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.064s Loc: (571.467, 120.649) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.128s Loc: (572.733, 120.325) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.064s Loc: (573.367, 122.662) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (571.683, 126.331) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (569.342, 133.166) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (565.171, 142.583) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (560.085, 154.291) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (554.543, 168.646) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (548.271, 183.823) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (542.136, 200.411) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (536.568, 216.706) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (531.284, 233.853) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.031s Loc: (526.142, 252.426) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.033s Loc: (521.071, 272.713) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (516.036, 292.357) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (511.518, 311.178) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (507.759, 330.089) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (504.379, 349.045) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (500.69, 368.522) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (497.345, 385.261) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (494.672, 401.631) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (491.336, 416.315) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (488.668, 428.658) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (486.334, 438.329) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (484.667, 445.164) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (483.833, 449.582) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.080s Loc: (482.917, 452.291) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.031s Loc: (478, 456) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
</StrokeEvent>
<StrokeEvent>
<StrokeHeader>
<EventPt> Wait: 1.937s Loc: (455, 293) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO </EventPt>
<Recorded> Yes </Recorded>
<RandSeed> 0x000000001, 0x000000000 </RandSeed>
<Smooth> Count: 3
Loc: (483.866, 448.055) Pr: 1 Ti: 1 Ro: -0.75
Loc: (481.596, 451.561) Pr: 1 Ti: 1 Ro: -0.75
Loc: (479.327, 455.068) Pr: 1 Ti: 1 Ro: -0.75
</Smooth>
<PrevA> Loc: (482.917, 452.291) Pr: 1 Ti: 1 Ro: -0.75 </PrevA>
<PrevB> Loc: (483.833, 449.582) Pr: 1 Ti: 1 Ro: -0.75 </PrevB>
<OldHd> Loc: (481.596, 451.561) Pr: 1 Ti: 1 Ro: -0.75 Dr: (-0.249038, 0.968494) Hd: (-0.968494, -0.249038) </OldHd>
<NewHd> Loc: (479.327, 455.068) Pr: 1 Ti: 1 Ro: -0.75 Dr: (-0.249038, 0.968494) Hd: (-0.968494, -0.249038) </NewHd>
</StrokeHeader>
Wait: 0.000s Loc: (463.5, 292) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (480.25, 288.5) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (501.625, 284.75) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (525.312, 280.375) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.032s Loc: (546.656, 276.188) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.033s Loc: (565.328, 273.594) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.031s Loc: (581.664, 272.297) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
Wait: 0.017s Loc: (599, 272) Pr: 1 Ti: 1 Ro: -0.75 Rv: NO Iv: NO
</StrokeEvent>

//===========================================================================
// End of Script
//===========================================================================

That script is actually recorded and generated by this app “ArtRage” for iPad that allow for ArtRage on desktop to be read back. Their script documentation is as below:
http://www.artrage.c…iptingguide.pdf

Actually for my case, I just need Blender to read back the Loc: (X, Y) and connect them as curve, if it is within 1 Stroke Event.

My question is:
How to import point data like above Loc: (X, Y) into Blender? I supposed this script is really simple to import using Python?

Thank you.

  • Jimmy