I used the code and albeit with minor changes could successfully load the StL file. Attaching the full code and a snapshot too :) Refer the Translate.cpp file in the Import/Export Samples. I have just modified one of the import functions (iges) to accommodate the StL code. Hope this helps.
I have done it. The problem was with following line
Standard_Integer NumberDomains = aSTLMesh->NbDomains(); //There is no NbDomains in aSTLMesh
I removed it from my code, then it is working fine
By the way What do you think about the performance. I feel it is really slow. it takes around 2-3 minutes to load a 6 MB binary file. Is it a problem with OCC?
There is definitely a method NbDomains for StlMesh_Mesh, even the documentation mentions that. Which version of OCC are you using? You see the code I sent also has the method call that worked successfully at my end. Regarding performance, yes it is very slow especially for large files but I have no clue why it is so. I am interested to know if you have any findings at your end.
hi,
I have the same question about how to import the format of STL.
Perhaps,you have resolved it,can you help me to do it?
If it is possible can you give me some code of sample in detail.
Thank you in advance!
Fri, 01/14/2011 - 07:47
I remember I had found some code somewhere on this forum long ago. Please see if it works for you. Attaching the source file herewith.
Fri, 01/21/2011 - 07:46
Dear Sharjith Naramparambath,
Thanks for your reply, but I'm having some problems.It is returning an error called
'NbDomains' : is not a member of 'Handle_StlMesh_Mesh.
Why is that?
Please let me know, how to overcome this problem or a small sample application.
Thank you,
Best Regards,
Pahee
Fri, 01/21/2011 - 08:37
Hi Pahee,
I used the code and albeit with minor changes could successfully load the StL file. Attaching the full code and a snapshot too :) Refer the Translate.cpp file in the Import/Export Samples. I have just modified one of the import functions (iges) to accommodate the StL code. Hope this helps.
Fri, 01/21/2011 - 11:20
Thanks Sharjith.
I have done it. The problem was with following line
Standard_Integer NumberDomains = aSTLMesh->NbDomains(); //There is no NbDomains in aSTLMesh
I removed it from my code, then it is working fine
By the way What do you think about the performance. I feel it is really slow. it takes around 2-3 minutes to load a 6 MB binary file. Is it a problem with OCC?
Thanks for your help and time.
Best Regards,
Pahee
Fri, 01/21/2011 - 19:13
There is definitely a method NbDomains for StlMesh_Mesh, even the documentation mentions that. Which version of OCC are you using? You see the code I sent also has the method call that worked successfully at my end. Regarding performance, yes it is very slow especially for large files but I have no clue why it is so. I am interested to know if you have any findings at your end.
Regards,
Sharjith
Mon, 01/24/2011 - 07:10
Hi Sharith,
Thanks
I'm working with open cascade 6.3. It is giving some errors for NbDomains, So I commented out that line and it is working fine.
I'm wondering what is the contribution of NbDomains in STL file loading.If you know, please let me know.
By the way I'm working with performance issues currently, especially level of details (LOD). Let you know, if I find anything
Thanks again,
Regards,
Pahee
Fri, 04/27/2012 - 07:24
hi,
I have the same question about how to import the format of STL.
Perhaps,you have resolved it,can you help me to do it?
If it is possible can you give me some code of sample in detail.
Thank you in advance!