Scripts for Point cloud file generation with I,J,K

 

Are there any publicly available scripts to generate a point cloud data file from a selected array of sections in the format similar to :

Section1_name X,Y,Z I,J,K
                          X,Y,Z I,J,K
                          X,Y,Z I,J,K ...

Section2_name X,Y,Z I,J,K ...

Script would iterate through each section, and each point in that section and output to a CSV file in the above format

Any help or similar examples that could be adapted would be appreciated