STEP reader improvement (Pass 2)

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: STEP reader improvement (Pass 2)

Post by vejmarie »

easyw-fc wrote:
vejmarie wrote:This will require a Pass 3 of the reader, but this shall be doable ;).
Great! :D
vejmarie wrote:Let's see the positive thing we are progressing.
I'm not underestimating your contribution...
I was waiting for a STEP hierarchy parser since my first approach to FC (0.14 release I think...), and I suppose I'm not the only one!
... so I really appreciate these improvements :D
and there is also multi-threading in STEP reading ;)

Thx
Maurice
Hi,

I have an updated patch which is displaying STEP tree leaf instead of node/roots (aka Compounds vs single Shape). It makes navigation much more easier and with good performances on complex STEP model. I will start chasing the color issue in Compound, I need to make some test before but I got the feeling that there are some bugs with Color affectation to Faces and Compound creations with Shapes that contains Faces which are having different Colors. If that is the case I will need wmayer or some help from somebody else to point me out on where this stands inside the code.

Do you want me to open a new PR with this update ?

My priority at the present time is to understand why the code is running 100% into createIndexArray within SoBrepEdgeSet.cpp when selecting complex Compound coming from STEP files. This is making the navigation very slow and frustrating to me.

vejmarie
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: STEP reader improvement (Pass 2)

Post by sgrogan »

vejmarie wrote:vejmarie
@vejmarie, can you reply in the other thread how exactly to test this. Especially is your OCCT7 fork required and how to set HAVE_TBB
viewtopic.php?f=10&t=16952&start=60
"fight the good fight"
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP reader improvement (Pass 2)

Post by easyw-fc »

vejmarie wrote: I have an updated patch which is displaying STEP tree leaf instead of node/roots (aka Compounds vs single Shape). It makes navigation much more easier and with good performances on complex STEP model.
how is this behavior compared to other CADs?
vejmarie wrote: I will start chasing the color issue in Compound, I need to make some test before but I got the feeling that there are some bugs with Color affectation to Faces and Compound creations with Shapes that contains Faces which are having different Colors.
I don't have problems in Compound colors when making a compound in Part WB or with python code of objects with different colors on faces...
vejmarie wrote: Do you want me to open a new PR with this update ?
+1 on my side

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

Re: STEP reader improvement (Pass 2)

Post by vejmarie »

easyw-fc wrote:
vejmarie wrote: I have an updated patch which is displaying STEP tree leaf instead of node/roots (aka Compounds vs single Shape). It makes navigation much more easier and with good performances on complex STEP model.
how is this behavior compared to other CADs?
vejmarie wrote: I will start chasing the color issue in Compound, I need to make some test before but I got the feeling that there are some bugs with Color affectation to Faces and Compound creations with Shapes that contains Faces which are having different Colors.
I don't have problems in Compound colors when making a compound in Part WB or with python code of objects with different colors on faces...
vejmarie wrote: Do you want me to open a new PR with this update ?
+1 on my side

Thx
Maurice
I just issued the PR https://github.com/FreeCAD/FreeCAD/pull/481 ... I have to resync my repo after integration as I don't know why it kept old stuff... in. Hopefully wmayer will agree to integrate it.

As to answer your question, the behavior shall be closed to other CAD. You will see the part with the color. Compound are hidden by default only leaf shapes are displayed. I have also removed a lot of warning coming from Coin due to bad naming in some STEP file for parts.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP reader improvement (Pass 2)

Post by easyw-fc »

vejmarie wrote: As to answer your question, the behavior shall be closed to other CAD. You will see the part with the color. Compound are hidden by default only leaf shapes are displayed. I have also removed a lot of warning coming from Coin due to bad naming in some STEP file for parts.
Hi Jean-Marie, I tried this PR, and the colors are showed fine now.
But in terms of behavior I think the situation is still different from other CADs... what I noticed is that is not possible to toggle visibility of the full model just acting on root node as it was possible before and as it was normally done with FC compounds...
Moreover, if you keep your compound model closed (I mean displaying only the main root, without displaying the leafs) the compound is greyed as a hidden object, but the leafs are still displayed...
fc-new-show-hide.png
fc-new-show-hide.png (89.09 KiB) Viewed 1952 times
I don't have many examples to compare, but DesignSparks Mechanical and CADAssistance behave opposite to what is now...
ds-show-hide.png
ds-show-hide.png (83.42 KiB) Viewed 1952 times
ca-show-hide.png
ca-show-hide.png (81.97 KiB) Viewed 1952 times
vejmarie wrote:Activate only UI Tree Leaf and hide visibility from Compound created to follow STEP assembly tree. This is currently accelerating browsing of the tree, and allows to display colors from parts and described within STEP files.
in which way the tree browsing is accelerated? If I would want to show/hide the full model/compound I would need to act on all single leaf...
Am I missing something?
Thx again for your work
Maurice
User avatar
vejmarie
Posts: 713
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: STEP reader improvement (Pass 2)

Post by vejmarie »

easyw-fc wrote:
vejmarie wrote: As to answer your question, the behavior shall be closed to other CAD. You will see the part with the color. Compound are hidden by default only leaf shapes are displayed. I have also removed a lot of warning coming from Coin due to bad naming in some STEP file for parts.
Hi Jean-Marie, I tried this PR, and the colors are showed fine now.
But in terms of behavior I think the situation is still different from other CADs... what I noticed is that is not possible to toggle visibility of the full model just acting on root node as it was possible before and as it was normally done with FC compounds...
Moreover, if you keep your compound model closed (I mean displaying only the main root, without displaying the leafs) the compound is greyed as a hidden object, but the leafs are still displayed...
fc-new-show-hide.png
I don't have many examples to compare, but DesignSparks Mechanical and CADAssistance behave opposite to what is now...
ds-show-hide.png
ca-show-hide.png
vejmarie wrote:Activate only UI Tree Leaf and hide visibility from Compound created to follow STEP assembly tree. This is currently accelerating browsing of the tree, and allows to display colors from parts and described within STEP files.
in which way the tree browsing is accelerated? If I would want to show/hide the full model/compound I would need to act on all single leaf...
Am I missing something?
Thx again for your work
Maurice
Hi,

Thanks for the feedback. It is acting exactly like I expected it to act so this is good. And this is still within my step by step approach to improve the Reader. I think you should try with "real" STEP model, the one which are 100MB size, like Bareleye or Zauis model. Just try to copy this repo
https://github.com/opencomputeproject ... .5.3/HW/ME using git lfs pull , the mechanical file are hidden from the web browser due to the use of LFS. There is there 2 archives which contains the last step of my test bench. They are huge files, and this is where you can see the limitation of the STEP viewer.

There are 2 upcoming issues to fix and I'll be done on the STEP reader I think:
- 1 - Shape Color on Compound but might be great if I could discuss with wwmayer on that through IRC or gitter
- 2 - Selection of Compound which contains a huge number of elements which is crazy slow and make navigation painfull if these Compound are active.

From the actual version to the previous one, I implemented a workaround for both issues while waiting for code improvement, but it is touching the signal interface within FreeCAD and I still need to dig into the code.

vejmarie
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP reader improvement (Pass 2)

Post by easyw-fc »

vejmarie wrote:It is acting exactly like I expected it to act so this is good. And this is still within my step by step approach to improve the Reader.
ok, thx for clarification :)
vejmarie wrote:I think you should try with "real" STEP model, the one which are 100MB size, like Bareleye or Zauis model. Just try to copy this repo
https://github.com/opencomputeproject/ ... .5.3/HW/ME using git lfs pull , the mechanical file are hidden from the web browser due to the use of LFS. There is there 2 archives which contains the last step of my test bench. They are huge files, and this is where you can see the limitation of the STEP viewer.
ATM I can test it only on a VM with ubuntu, so the test timing wouldn't adhere to real world...
vejmarie wrote: There are 2 upcoming issues to fix and I'll be done on the STEP reader I think:
- 1 - Shape Color on Compound but might be great if I could discuss with wwmayer on that through IRC or gitter
Great! I would look forward for this :)
vejmarie wrote: From the actual version to the previous one, I implemented a workaround for both issues while waiting for code improvement, but it is touching the signal interface within FreeCAD and I still need to dig into the code.
vejmarie
Thx as always for your valuable work ;)
Maurice
Post Reply