Can FlexSim read FreeCad files?

Can FlexSim read FreeCad files?

tomi_kosunen
Not applicable
133 Views
5 Replies
Message 1 of 6

Can FlexSim read FreeCad files?

tomi_kosunen
Not applicable

Hi

I have tried to read FreeCad file into FlexSim as object geometry. FlexSim does not support FreeCad native format, but there are many formats I can export. In my experience, .obj format is good for exporting geometry and color. For some reason, FlexSim cannot read .obj file exported from FreeCad. Do you have any idea why? Microsoft 3DBuilder can read the .obj file easily so the file should be ok. (pls find test10.obj attached)

Accepted solutions (1)
134 Views
5 Replies
Replies (5)
Message 2 of 6

support5CRPZ
Advocate
Advocate
Accepted solution

@tomi.kosunen

FlexSim can read obj format file like captured.

14210-2018-09-06-203010.png

I attached the file.

Drag and drop Shape object from Visual group in the library and set the obj file in the filename like above captured.

test-obj.fsm

You can import the file as flowitem and replace the fixed resource with it.

email ID : support@flexsim.co.kr & support@simflex.co.kr
Message 3 of 6

tomi_kosunen
Not applicable

Thanks @david.seo

I did some research. I had done like you wrote but all I got on the FlexSim screen was an empty yellow frame. I noticed that .obj file is linked to a .mtl file when obj file is exported from cad. I had missed the mtl file from my first post. The mtl file contains materials and colors. If the mtl file exists, then FlexSim cannot read the obj file.

The FreeCad has slightly different .mtl file than 3DBuilder. I compared the mtl files (from FreeCad and 3DBuilder) and the difference is the FreeCad has two extra lines "d 0" in lines 5 and 7. If I manually remove those lines in text editor, then FlexSim can read the original .obj file with colors.

Do you know what are those extra lines? Is it something that FlexSim should read.

You can find the original (incorrect) mtl file and the fixed mtl file from the attached zip.

test10.zip

Message 4 of 6

tomi_kosunen
Not applicable

Hi again.

mtl file specification says that "d 0" means transparent and "d 1" means fully opaque (default value is 1). So FlexSim reads the file correctly, only the object is invisible and I have to find out why.

0 Likes
Message 5 of 6

support5CRPZ
Advocate
Advocate

@tomi.kosunen

mtl format file has material and color attribute as you said. And FlexSim shows only the shape of obj file without color without the mtl file.

FlexSim can read obj file and display the shape without or with mtl file.

The reason to show only yellow box in your model is FlexSim can't search the obj file in your model folder. If you set the obj file with the folder name like 'D:\working\14209-test10.obj', FlexSim display the shape of obj file not showing only yellow box.

email ID : support@flexsim.co.kr & support@simflex.co.kr
0 Likes
Message 6 of 6

philboboADSK
Autodesk
Autodesk

If FreeCad is putting d 0 on that material and it isn't supposed to be fully transparent, then that sounds like a bug in FreeCad's obj exporter.

It sounds like FlexSim's obj importer is correctly parsing the material file and rendering that material as fully transparent (invisible).



Phil BoBo
Sr. Manager, Software Development