I did not describe clearly, my faultHello @sjwa
Could you please give more details about the matter. Which data you'd like to export? Is it the geometrical polygonal data or hierarchy of STEP file or attributes like color/others?
The matter is that the STEP file has geometrical and attributes information. Sample of one of STEP file imported is on the tree below:View attachment 390
Is my understanding correct that you're already able to solve the initial request? And the rest point is your concern about the size of result file? Regarding the file size, without initial step and result obj files we could hardly work out any worth ideas -)I did not describe clearly, my fault
My idea is to export all the parts in the xde tree from the step file as obj files
According to my previous understanding, there are not so many attributes in the step file (such as size or multi-layer shape relationship) in the obj file, so I want to export all of them as obj files, so that after lightweight processing, they can be delivered to other projects for them to convert These obj files are displayed on other platforms.
So the question is, my 80mb step file is 50mb after exporting, is this normal? Or did I not add some options when exporting?
Thank you for your answer, my code and parts are as follows:
//---------------------------------
if (m_seqRootLabel.IsEmpty()) {
return writer.Perform(m_document, fileInfo, occProgress->Start());
}
else {
return writer.Perform(m_document, m_seqRootLabel, nullptr, fileInfo, occProgress->Start());
}
(obj file doesn't seem to upload...)
Yes, JSlyadne, my original problem is solved, now I'm a little confused about the size of the file after conversion, this forum seems to be unable to upload obj files (or it's a problem with my browser) I uploaded it to gitlab, you can do it when you get off work Or download it during coffee time, thank youIs my understanding correct that you're already able to solve the initial request? And the rest point is your concern about the size of result file? Regarding the file size, without initial step and result obj files we could hardly work out any worth ideas -)
I guess that the uploading fault could be because of files size - they are > 60mb in total. Anyway, I downloaded the files from GitLab and will take a look when a chance.Yes, JSlyadne, my original problem is solved, now I'm a little confused about the size of the file after conversion, this forum seems to be unable to upload obj files (or it's a problem with my browser) I uploaded it to gitlab, you can do it when you get off work Or download it during coffee time, thank you
Thank you very much for your reply, looking forward to your replyI guess that the uploading fault could be because of files size - they are > 60mb in total. Anyway, I downloaded the files from GitLab and will take a look when a chance.
Thanks for your answer, JSlyadneHey, siwa! Sorry for a delay with answer - the things piled up here.
I took a look at the obj file, what is your concern about? The generated file looks Ok, however I noticed it contains less number of parts than in original step file - 70 vs 77. It might be good to check whether everything is in place. I also generated the obj file and it resulted in ~ 5mb. It should be because of less detailed tesselation. Might it be a matter?
You may examine how the OBJ writer is implemented in Analysis Situs, namelly asiAlgo -> interoperability -> asiAlgo__OBJ.cpp.My question is: how to make the exported obj file as small as possible, you said that the obj file you exported is only 5mb, I would like to know how you exported it?
thanks for your answerYou may examine how the OBJ writer is implemented in Analysis Situs, namelly asiAlgo -> interoperability -> asiAlgo__OBJ.cpp.
The size of result OBJ file depends on how detailed triangulation of surfaces is. The rougher triangulation is, the less size of OBJ file. What algorithm do you utilize to generate the triangulation? Supposing it's default OCCT's faceter, BRepMesh_IncrementalMesh, you need to play with linear and/or angular deflections to influnce on the quality of triangulation.