STEP reader improvement (Pass 4): Moving to OpenGL 3.2

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
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 4): Moving to OpenGL 3.2

Post by vejmarie »

The setValue of the progress bar is called and act properly, the issue is that the step value (the one who is supposed to update the progress bar) is always equal to 0 :( which explain why the progress bar doesn't move. I am still investigating why, but I think that this value is coming directly from the aReader within OCCT.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: STEP reader improvement (Pass 4): Moving to OpenGL 3.2

Post by triplus »

I wanted to test if i can detect anything when it comes to the load time. But i get this error when compiling against latest OCC:

Code: Select all

/src/Mod/Part/App/ConePyImp.cpp: In member function ‘virtual int Part::ConePy::PyInit(PyObject*, PyObject*)’:
/src/Mod/Part/App/ConePyImp.cpp:134:53: error: no matching function for call to ‘GC_MakeConicalSurface::GC_MakeConicalSurface(gp_Cone, double&)’
         GC_MakeConicalSurface mc(pcone->Cone(), dist);
Therefore i give up for now.
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: STEP reader improvement (Pass 4): Moving to OpenGL 3.2

Post by wmayer »

vejmarie wrote:The setValue of the progress bar is called and act properly, the issue is that the step value (the one who is supposed to update the progress bar) is always equal to 0 :( which explain why the progress bar doesn't move. I am still investigating why, but I think that this value is coming directly from the aReader within OCCT.
For me it was always like this that the progress bar was shown and updating when the file was read in. But then when creating the visualization it was still visible and there it could be that the value was set back to 0.

With your recent change the progress bar was visible but never showed a progress. When reverting your change it is back to normal. So, I doubt that this is related to OCC.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: STEP reader improvement (Pass 4): Moving to OpenGL 3.2

Post by triplus »

OK i managed to workaround the above compile issue and after got some more errors in:

Code: Select all

AppImportPy.cpp
AppImportGuiPy.cpp
ImportOCAF.cpp
At the:

Code: Select all

# include <STEPCAFControl_Writer.hxx>
Of type:

Code: Select all

error: ‘NCollection_Vector’ does not name a type
I managed to workaround that issue too and as for the test. I made sample STEP file and FreeCAD daily from PPA (OCE 0.17) 42s and FreeCAD 0.17 (OCC daily) 38s.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP reader improvement (Pass 4): Moving to OpenGL 3.2

Post by easyw-fc »

wmayer wrote:PR 517 is merged now.

Open points
  • in the past when loading step files a progress bar was shown. At the moment this doesn't work any more
  • when setting a colour per face then it doesn't work when VBO is on
    ....
I can confirm that in win10-64b FC 10084-64b I have
1) when setting a color per face then it doesn't work when VBO is on
2) when setting a color per all Shape then it doesn't work when VBO is on
3) color will be displayed correctly just changing VBO preferences (so it seems they get assigned correctly, but not displayed w VBO)
vejmarie wrote:Your timing i still very disturbing to me. My system is a Macbook Pro Core i5 2.7Ghz .. Not the fastest stuff (this is a laptop), and I am reading this file in 360s everything included with latest build compares to 340s with CAD Assitant on the same machine
new testing results are:
w/out VBO
loading...
Cannot compute Inventor representation for the shape of Part__Feature148.
.....
Cannot compute Inventor representation for the shape of Part__Feature890.
loading time = 925.803999901s
displaying time = 474.888999939s

w/out VBO
875ms/1.1fps
w VBO
170ms/6.2fps
loading time with VBO enabled doesn't change the loading time sensibly
fps is improved a lot! :D

Still I have a lot of errors "Cannot compute Inventor representation for the shape" and loading and displaying time quite high compared to yours
Please let me know if I can do more test to help in find to solve this riddle on slower performance compared to osx...
It would be nice to have a comparison on Linux and Windows pcs with similar hw

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

Re: STEP reader improvement (Pass 4): Moving to OpenGL 3.2

Post by sgrogan »

easyw-fc wrote:Still I have a lot of errors "Cannot compute Inventor representation for the shape" and loading and displaying time quite high compared to yours
Please let me know if I can do more test to help in find to solve this riddle on slower performance compared to osx...
It would be nice to have a comparison on Linux and Windows pcs with similar hw
I'm working on this but it is slow going.
On windows I have 3 versions of OCCT
1) OCCT 7.0 no TBB (This is what the developer builds use)
2) OCCT 7.0 w/ TBB
3) Vejmarie's OCCT w/ TBB

A given version of FreeCAD has to be built against each of these 3 versions. For 2 and 3 a HAVE_TBB boolean has to be created at FreeCAD CMake (it doesn't exist in the gui)
From previous tests the load time improvements are only evident with vejmarie's OCCT fork w/TBB and FreeCAD CMake HAVE_TBB.
On linux I don't have the required OCCT builds. A previous attempt yielded build errors when using vejmarie's fork.
"fight the good fight"
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP reader improvement (Pass 4): Moving to OpenGL 3.2

Post by easyw-fc »

sgrogan wrote: I'm working on this but it is slow going.
Sorry I didn't mean to push you... I mean that would be nice if someone would make a comparison to the actual windows build available at FC releases pages and Linux build both with standard OCC chain, to see if results in Win and Linux are comparable...
Maurice
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: STEP reader improvement (Pass 4): Moving to OpenGL 3.2

Post by sgrogan »

easyw-fc wrote:Sorry I didn't mean to push you... I mean that would be nice if someone would make a comparison to the actual windows build available at FC releases pages and Linux build both with standard OCC chain, to see if results in Win and Linux are comparable...
Maurice
No worries :)
The Ubuntu PPA uses oce 0.17.1 wo/TBB, so that's another variable.
On Win I'm just not getting the fps improvements 1.5 to 2.1-3.0 depending on what mouse model I use. I'm just rotating in the 3D view.
"fight the good fight"
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP reader improvement (Pass 4): Moving to OpenGL 3.2

Post by easyw-fc »

sgrogan wrote: The Ubuntu PPA uses oce 0.17.1 wo/TBB, so that's another variable.
:shock: :lol:
sgrogan wrote: On Win I'm just not getting the fps improvements 1.5 to 2.1-3.0 depending on what mouse model I use. I'm just rotating in the 3D view.
I use this code to test fps in a reproducible mode:

Code: Select all

Gui.activeDocument().activeView().viewAxonometric()
Gui.SendMsgToActiveView("ViewFit")
Gui.ActiveDocument.ActiveView.startAnimating(0,1,0,0.2)
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: STEP reader improvement (Pass 4): Moving to OpenGL 3.2

Post by sgrogan »

easyw-fc wrote: I use this code to test fps in a reproducible mode:
1.5 fps vs 1.8 fps
"fight the good fight"
Post Reply