Skip to content

Procedure to convert from ASCII to Binary ? #50

Answered by smoluck
smoluck asked this question in Q&A
Discussion options

You must be logged in to vote

_Hi Dranjan.

Thanks for your feedback.
Best regards,_

I've found my errors.

As i've modified the amount of lines for the data values, i was getting an error too.

        ### Important ###
        # As an empty line will always been added in the RAW ASCII file,
        # it's important to remove one to correctly count the Point Count.
        # "element vertex" count will be used by the Binary Encoding at the end of this script

Here is the update code that is now working.
rb and wb flags have also helped here.

import os, plyfile

# Code for converting ASCII back to Binary (little_endian)
inputfile = r"C:\TEMP\T\dat_ASCII.ply"
inputfile = os.path.abspath(inputfile)
print(inputfile)

output…

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@smoluck
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dranjan
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants