STEP file read might be crazy long ...

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
cafrax69
Posts: 3
Joined: Wed Nov 02, 2016 10:43 am

Re: STEP file read might be crazy long ...

Postby cafrax69 » Wed Nov 16, 2016 4:09 pm

Hello :)

Do you have any updates about the STEP import wIth the assembly structure ?
How did you managed to read the assembly Structure ? Did you just modify the existing importer or did you create your own importer ?

Did you use the OpenCascade library in order to read the STEP file ?

Thanks
User avatar
vejmarie
Posts: 680
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: STEP file read might be crazy long ...

Postby vejmarie » Fri Dec 02, 2016 8:09 pm

sorry guys I have been very long on this. I had to manage a lot of things and didn't had time to push for the patches. I do have STEP import which works with assembly structure. I need to clean up my repo first because this is a big mess as I am working also on an alternate project http://lists.opencompute.org/pipermail/ ... 00403.htmland made the stupid things to include some fixes for it into the same branch than the STEP.

By the way I am back online !
User avatar
easyw-fc
Posts: 2915
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP file read might be crazy long ...

Postby easyw-fc » Fri Dec 02, 2016 8:52 pm

vejmarie wrote:By the way I am back online !
Hi @vejmarie !
Welcome Back! :D
vejmarie wrote:I do have STEP import which works with assembly structure. I need to clean up my repo first because this is a big mess as I am working also on an alternate project
looking forward to see it!!! :D

Maurice :)
cafrax69
Posts: 3
Joined: Wed Nov 02, 2016 10:43 am

Re: STEP file read might be crazy long ...

Postby cafrax69 » Mon Dec 05, 2016 8:47 am

vejmarie wrote:I do have STEP import which works with assembly structure. I need to clean up my repo first because this is a big mess as I am working also on an alternate project
That's a pleasant things to read on a Monday morning ! I hope it will be available soon :)
vejmarie wrote: By the way I am back online !
Welcome back then !
User avatar
vejmarie
Posts: 680
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: STEP file read might be crazy long ...

Postby vejmarie » Thu Jan 19, 2017 6:17 pm

Hi Guys,

So I have made some progress. It is not an ideal situation but at least with the tree patch I submitted a few weeks ago and the TBB support turned on in OCCT and the patches I made in my OCCT branch available there https://github.com/vejmarie/occt-7/tree/parallel_step, the whole opening process went from 42 minutes on my machines to 8 minutes and 40 seconds using multithreading. I totally dislike how this stuff works as I am chasing parallelism into OCCT 7 code which is a crazy piece of code to read STEP (roughly your can process in parallel sub assembly and direct shape into the Product Definition section of STEP file). What is the most funny thing was to read the french comments into the code where developpers look like to implement stuff without even knowing if it will work ;). By the way, this is a difficult stuff to do.

So now the challenge is to know how to have OpenCascade re-integrate such patch, wish me good luck on that. If you want give it a try I am curious.
So to test the code, compile latest freeCAD. Compile my OCCT branch with TBB turned on. Give it a try. Make the same test without parallelism support in OCCT.

By the way, we need to have TBB support in OCCT, Boolean operation are really accelerated with that.
User avatar
easyw-fc
Posts: 2915
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP file read might be crazy long ...

Postby easyw-fc » Thu Jan 19, 2017 7:45 pm

vejmarie wrote:Hi Guys,
So I have made some progress. It is not an ideal situation but at least with the tree patch I submitted a few weeks ago and the TBB support turned on in OCCT and the patches I made in my OCCT branch available there https://github.com/vejmarie/occt-7/tree/parallel_step, the whole opening process went from 42 minutes on my machines to 8 minutes and 40 seconds using multithreading. ...
Hi and thanks so much for your results in this field that I consider very important for CAD interoperability and conseguentely for FreeCAD to increase its popularity and becoming a reference sw in mechanical CAD designing :D
vejmarie wrote:So to test the code, compile latest freeCAD. Compile my OCCT branch with TBB turned on. Give it a try. Make the same test without parallelism support in OCCT.
hoping may be @ sgrogan could put a windows build available on that :D
vejmarie wrote: By the way, we need to have TBB support in OCCT, Boolean operation are really accelerated with that.
I think @triplus has already done something valuable :D
viewtopic.php?f=10&t=18179&p=143867&hilit=tbb#p143867
User avatar
vejmarie
Posts: 680
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: STEP file read might be crazy long ...

Postby vejmarie » Thu Jan 19, 2017 8:12 pm

easyw-fc wrote: Hi and thanks so much for your results in this field that I consider very important for CAD interoperability and conseguentely for FreeCAD to increase its popularity and becoming a reference sw in mechanical CAD designing :D

hoping may be @ sgrogan could put a windows build available on that :D
Are you running only on Windows (don't worry this is fine with me, but I am a "unix" guy and never wanted to make the effort to build stuff on Windows). So if you are on Linux or MacOS, I can provide you packaging option for these stuff. If Windows we definitly need to rely on sgrogan.

I am curious to have results on higher and faster CPU than my Macbook Pro. It is a dual core stuff with small cache. I am betting that a core i7 Desktop CPU might be not bad for such things.

We need to find a way to make the UI more responsive when a STEP is open, as even optimized bareleye need a lot of time.

easyw-fc wrote: Hi and thanks so mucI think @triplus has already done something valuable :D

viewtopic.php?f=10&t=18179&p=143867&hilit=tbb#p143867
I see the same kind of benefit on MacOS. I spent some time discussing with OpenCascade folks, and we probably need to find a way to have our integration folks turning that switch on at build time ;).
User avatar
sgrogan
Posts: 6166
Joined: Wed Oct 22, 2014 5:02 pm

Re: STEP file read might be crazy long ...

Postby sgrogan » Thu Jan 19, 2017 10:46 pm

vejmarie wrote:I see the same kind of benefit on MacOS. I spent some time discussing with OpenCascade folks, and we probably need to find a way to have our integration folks turning that switch on at build time ;).
For win OCCT w/TBB is in the works. My experiments using triplus's draft array example don't show a big difference between OCCT 7.0 with or with out TBB (after he added multi-threading support to multiFuse). I'm working on 7.1 w/TBB because maybe TBB will be needed stand alone.

OSX is already 7.0 w/ TBB.

On Ubuntu the problem is a proper OCCT7 deb package. User @gdo was helping but we're a bit stalled at the moment. oce 6.9 has been released and this might me a possibility, except for vejmarie's patches. Adding TBB as a dependencey for FreeCAD is straight forward. Building a newr version of oce/OCCT is more complicated.

@easy-fc, your 64 bit right? I may be able to package something with stuff I already have for 7.0, if your interested.
"fight the good fight"
User avatar
easyw-fc
Posts: 2915
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP file read might be crazy long ...

Postby easyw-fc » Thu Jan 19, 2017 10:51 pm

sgrogan wrote: @easy-fc, your 64 bit right? I may be able to package something with stuff I already have for 7.0, if your interested.
positive: win 64bits!
I'm very interested on :D
Thx so much! ;)
Maurice
User avatar
sgrogan
Posts: 6166
Joined: Wed Oct 22, 2014 5:02 pm

Re: STEP file read might be crazy long ...

Postby sgrogan » Thu Jan 19, 2017 11:38 pm

easyw-fc wrote:positive: win 64bits!
Looks like the 7.0 stuff w/ TBB on my system is a mess. You will be the first tester with 7.1 ;) Probably will take a couple of days.
"fight the good fight"