Is it Possible to read 75MB Stl file through opencascade...
Is it Possible to read 75MB Stl file through opencascade...
suman
2008/12/19 07:59
Hi...
I am able to read 2.7MB STL file by using my application which is using opencascade API.But I need to read 75MB Stl file..Is it possible?
If I'm trying to read through Read() method in StlAPI_Reader,I,m getting a cascade error while reading..How can I come out of that error...
I am in a hurry..If you know the solution,Can you please respond me immediately....
Thanks in Advance
Suman
Mikael Aronsson
2008/12/19 08:25
What kind of error do you get ?
suman
2008/12/19 08:41
Hello Mikael..
I am getting an empty Message box with a title "Cascade Error" while reading an STL file..
When I'm debugging,I have traced out the error where it's encountered...
The error is coming when the Read() function of StlAPI_Reader()...
Please help me out to solve this error...
Thanks in Advance
suman
ANANTH
2008/12/19 08:43
Error may be from
Read(TopoDS_Shape& aShape,const Standard_CString aFile);
in the StlAPI_Reader class.
while you are trying to read the data from "aFile" and getting out the result in to TopoDS_Shape object.
Have you checked the instance of TopoDS_Shape object....!
Roman Lygin
2008/12/19 08:50
You likely run out of memory, don't you ? On my laptop reading a 100Mb binary STL file (meaning that ascii would be even bigger) with 2Gb RAM took 1.5Gb and put the entire OS into swapping and I had to stop it without waiting. So converting that size of files into shapes (TopoDS_Shape) is useless, it creates about dozens of thousands faces which cannot be usable.
Reading into MeshVS structure finished in a few dozen seconds with Standard_OutOfMemory exception.
So, try to read into some compact data structure first. Did you try StlMesh_Mesh and use RWStl::ReadFile()?
Roman
P.S. Why are still in a hurry after a few days ;-) ? If you have to deal with new software in your project, you rather have to plan more buffers into your project schedule ;-)
The key problem, in my opinion, is in your concept of translating STL to IGES. Are you familiar with these formats ? STL is a set of plain triangles while IGES is aimed at containing precise geometry (NURBS, cylinders, etc). STL is used to dump a result of tessellation (triangulation) of the 3D model (that could originally come from IGES or other similar CAD format). Storing thousands/dozens of thousands of triangles in IGES (e.g. as Trimmed Surfaces, IGES type 144) has no sense. What will the receiving application do with it ? An IGES file itself would be of hundreds of megabytes and would be unreadable by most software, not saying a word about usability of the model in it.
So you better work on your concept than trying to fight a wrong target.
Hi Roman...
I have studied about both the files...
But my customer needs IGES file to do reverse engineering...
If you provide your personal mail ID,I will send you both the STL and IGES files (Conversion has been done through opencascade for file less than 3MB)to your mail...Such that you will get clear picture.....
Thanks for our support....
Suman
suman
2008/12/22 06:55
Hi Roman...
I have studied about both the files...
But my customer needs IGES file to do reverse engineering...
If you provide your personal mail ID,I will send you both the STL and IGES files (Conversion has been done through opencascade for file less than 3MB)to your mail...Such that you will get clear picture.....
Thanks for our support....
Suman
Roman Lygin
2008/12/22 07:19
Suman,
My email is roman dot lygin at gmail dot com (now also visible on my blog). But let's stay on this thread meanwhile, so that others can read.
If it's critical for your customer to use IGES for reverse engineering, you might agree to transfer only a point set, so that every triple corresponds to an STL triangle. This will reduce your file size.