Menu

How to filter line breaks?

Michi
2006-11-01
2013-05-20
  • Michi

    Michi - 2006-11-01

    Hello!

    I try to read Collada files, which consist of loads of coordinates:

    <float_array id="geometries_0-ImplicitNormal-array" count="720">
    -0.269132 -0.924735 0.269132
    -0.380611 -0.924735 0.000000
    -0.498494 -0.709230 0.498494
    [...]</float_array>

    Using the GetText() method, it is possible to extract all these numbers into a string:
    "-0.269132 -0.924735 0.269132 -0.380611 -0.924735 0.000000 -0.498494 -0.709230 0.498494 [...]"

    As you can see, the line breaks have gone. As there are not always three numbers but sometimes two or four in a row, I now have no chance to find the right values. :(

    Is there a way to solve this problem?

    Thanks,
    Michi (Ger)

     
    • Michi

      Michi - 2006-11-01

      Ok I found a way to figure out how many numbers belong together so now it works fine. :)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.