Encoding file to Ascii from grasshopper

Hi ,
I want to encode .FBX file to Ascii text file , to write it in MySQL database server from grasshopper . I tried to do it using pancake but failed to do it , any ideas .

regards

test.fbx (26.9 KB)
FBX ascii export test.gh (10.6 KB)

Hi @user883,

You hve to read the file as total file.

afbeelding

instead of per line:

just use right click

1 Like

My apologies Rhino’s FBX exporter plugin has updated so the original Pancake FBX export option component won’t work. I will update it a bit later.

For now you can use the manual option to export ASCII FBX files, which can be stored into Mysql directly.


FBX ascii export test.gh (10.4 KB)

2 Likes

thanks, @gankeyu for your feedback. and thanks again a lot for your extraordinary contributions to making the pancake plugin happen, we owe you a lot for your efforts.
waiting for your updates at the soonest.

big fan of your work

Regards

1 Like

@gankeyu , just quick question , do you know how I can encode 3dm , pdf , dwg , into Ascii format from grashopper ( same like what you done for FBX file) .

Regards

The feature is provided by Rhino’s FBX exporter because the FBX format itself supports ASCII format.

This script encodes any binary into Base64 string, which can be later stored into MySQL’s text field. But when you use the stored file, you need to decode first after retrieving it from the database. (the output string is very large and shouldn’t be previewed) I’d recommend to store file as binary in MySQL, though.

base64_encode.gh (5.5 KB)

1 Like

@gankeyu thanks for the script :pray: :pray: :pray: :pray: :pray: :pray: .

I agree with you it will make my life easier if I can store and retrieve binary files to MySQL from GH directly , but the only plugin I found to connect GH to MYSQL is Ggamagi , which retrieves and write only string data to MySQL , so that why I want to encode data to text format .

SO , do you know any script or plugin that enable to retrieve and write binary files to MySQL from GH directly ?

Apologies I forgot to give you this file for decoding Base64 stream.

base64_encode_and_decode.gh (8.9 KB)

As far as I know there’s no such binary-supporting plugin as GH doesn’t have a built-in support for binary.

1 Like

Hi,
Here is a similar workflow using Serialize & Deserialize components from Human

1 Like