-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why read .stl file so slow ? #4
Comments
why does the gear.stl file show such fragments of triangles? |
Hi,
Because the algorithm to read a stl file has defects. Would you please try the cutsim-q5 version? https://github.com/KASUYASU/cutsim-q5 It has a little better algorithm with faster and less fragmentation properties. |
thanks a lot,i have used cutsim-q5 ,but it run error,here is my code to show stl file:
please help me to figure it out , i am very appreciated! |
And i have two tips for you in the file volume.cpp line 560 after revised
to |
Hi, Do you have any problems without the definition of "MULTI_THREAD_SUM" ? // Multi Threadings in the file "cutsim_def.hpp". And thank you for your revise about the 'overrun' problems. |
Thanks for your advise!
to like this:
it runs correct with the Gear.stl file (529KB) but i use my .stl file (1040KB), it is not correct fully . This is my stl file , would you like to have a test on it , thank you very much! |
Sorry! I've laid this aside for a long time, because now I'm developing a new CNC simulator which has a new algorithm without Marching Cube method. So please give me a little time to recover the memory of my head. The console messages indicate the correction of calculations and not indicate errors. The algorithm must calculate the distance between the facets and the cube and determine whether the part of facet exists inside the cube or not, so please also note that the algorithm is influenced by the precision of calculation and not robust inherently. |
It’s very kind of you to help me give suggestions. I learn a lot for your codes, i will take more time to do the research on the algorithms in your codes. I am also very expected to hear that you can make greater progress on it. |
Forgive me my late response, because I was hospitalized for pneumonia. I think there are two reason why your stl file will be so fragmented. One is the weakness of my algorithm against the sharp edge of 3D stl data. And another is your stl file contains incorrect data, like unclosed facets, overlapped facets, and upside down normal vector. P. S. If you have some g-code file for this stl data, would you please give me it? My new CNC simulator is now ready for test. |
Sorry for my late response. Are you feeling better?Please take good care of your body. I use your code to simulate the motion of a industrial robot with electrical drill to cut the knee bone, it is a part of surgical robot system for knee replacement, so i don't have the G code file , the data i can get are end positons of the robot hand. The STL file is the model of knee implant to be cutted.
so i am expected to learn about your new algorithm to build the octree, or other new ways with different algorithms to show the realtime simulation of robot motion, such as your new CNC simulator , thank you for the support. |
Hi,
Thank you. I'm now (almost) fine.
Almost all defects exist in the function 'double StlVolume::dist(const GLVertex& p)'. |
OK,i have tested your new version code, while, most of the time it caculates correctly,you can try it with as more as STL files. |
In cutsim-q5, Actually, i have spent 2~3 weeks to read your code in June, and i can understand most of the code. it is really complex. even though , i don't have the ability to modify it. The following png file is my milling simulaiton of knee replacement based on your code. The green part is the area to be removed, but the software seemes not robustly, however, i can't find the reason. The efficiency and acurracy of the simulation are also important and need improving. so i am expected to learn about your new algorithm showed in New-CNC_Sim picture. Would you like to give me a demo if you finish the new algorithm ? |
Hi,
The red or white color pieces indicate that the function 'check_node' has detected those as irregular cubes. Then 'check_node' will force to change the state of cubes from the situation of those surroundings. if (state == Octnode::OUTSIDE) { So after everything is well-done, red or white small pieces will disappear.
Maybe I think you are going to use those for Head/Head type multi-axis machines. https://www.waykenrm.com/5-axis-cnc-machining.html Now, my new algorithm only supports Table/Table type 5-axis machine and you must modify it. But also I think it's more time saving to modify by me than you do.
Anyway, to test my algorithm, I need the data of robot motion, stl file of thighbone and the size of endmill tool. The module which read the G-code file is separated from the core algorithm, so I can make the motion translator easily if your robot's data is readable, understandable,... etc. |
Hi ` cutsim::BallCutterVolume* s0 = new cutsim::BallCutterVolume();
Please take some time to have a try, sorry to trouble you! |
Hi, I've converted your data file to a G-code one and tested it. The next video represents the aspect of milling process. Is it right? By cutsim-q5. By new algorithm. (The endmill is plunged from the different direction, because the new algorithm hasn't provided interpolating smoother for Z axis yet.) |
when i test your project on windows10 , it complied done. but when it read stl, it is very slow, the file size is 6142KB, i need three hours to show it out, so does this program support large stl file (over 10000 triangles ), is there a better way to do this ? thank you
The text was updated successfully, but these errors were encountered: