tpaviot / pythonocc-core

Python package for 3D geometry CAD/BIM/CAM
GNU Lesser General Public License v3.0
1.37k stars 378 forks source link

how to read step faster #1244

Open 1997coda opened 1 year ago

1997coda commented 1 year ago

an example at https://github.com/dblanding/kodacad @dblanding

i try to open a 20MB stp file, it cost about 50s and using threading cannot shorter that time.

Are there any known algorithms that can improve this reading speed?

Thank you very much for your great contributions

1997coda commented 1 year ago

stepanalyzer.txt and his step read code

dblanding commented 1 year ago

I'm sorry cadazq, but I don't have a way to make the read proceed more quickly. Have you tried opening your step file with Cad_Assistant? One thing you might try is first loading your step file into Cad_Assistant, then saving it back again (either in AP-214 or AP-203), then try loading the newly saved file to see if that makes it load more quickly.

1997coda commented 1 year ago

I'm sorry cadazq, but I don't have a way to make the read proceed more quickly. Have you tried opening your step file with Cad_Assistant? One thing you might try is first loading your step file into Cad_Assistant, then saving it back again (either in AP-214 or AP-203), then try loading the newly saved file to see if that makes it load more quickly.

very thanks for reply. CAD Assistant work really fast. it count 16s to open a same stp. i just wondering how to make it happen.:)

1997coda commented 1 year ago

I'm sorry cadazq, but I don't have a way to make the read proceed more quickly. Have you tried opening your step file with Cad_Assistant? One thing you might try is first loading your step file into Cad_Assistant, then saving it back again (either in AP-214 or AP-203), then try loading the newly saved file to see if that makes it load more quickly.

really cool. it cost 28s after i loading & saving. more curious...

tpaviot commented 1 year ago

CAD Assistant is built on opencascade as well. I think there should be some kind of multitask optimizations at CAD Assitant.

dpasukhi commented 1 month ago

CAD Assistant has no optimization for ImportStep file. The difference are ShapeHealing parameters. In python case that parameters can be missed.