Draw really slow

I run DRAW on Linux with an open cascade 7.4

Even a very small script like:

cd CPP/OCCT-7.4.0-Debian90-64-opt/bin
./draw.sh
Hint: use "pload ALL" command to load standard commands
Draw[1]> Draw[2]> pload ALL
1
Draw[3]> vinit
Driver1/Viewer1/View1
Draw[4]> vertex v0 -3 -2.00116 1.03375
Draw[5]> vdisplay v0
Draw[6]> vertex v1 -3 -2.00116 0

can take several minutes to display...
Do you have a clue about such an issue?

Kirill Gavrilov's picture

Your current script basically does:

  • Starts DRAWEXE application.
  • Load all Draw Harness plugins [pload ALL].
  • Creates an OpenGL viewer [vinit]
  • Creates a simple TopoDS shape [vertex]
  • Displays vertex in the viewer [vdisplay]
  • Creates another simple TopoDS shape [vertex]

Could you please check and comment which exactly steps are time consuming on your system, and how long they last?

The only idea I currently have is that your system might have some trouble with OpenGL drivers.

Vins Ocell's picture

Thanks for your answer.
I just ran again the same script:

pload ALL
vinit
vertex v0 -3 -2.00116 1.03375
vdisplay v0
vertex v1 -3 -2.00116 0

Everything's fine until the last line, I decided to kill the process after 5 minutes without any answer from DRAW. It is just that nothing happens and you can't get back to the command line.

Kirill Gavrilov's picture

That something strange. I would expect that there is some problem with terminal / commands input rather than with DRAWEXE itself - "vertex" command does almost nothing that may take any time.

Vins Ocell's picture

On Windows I noticed that DRAW is able to recall the last command with the "arrow up" button, on my Linux version this functionality is not available in the terminal, is it normal?

Kirill Gavrilov's picture

On Windows I noticed that DRAW is able to recall the last command with the "arrow up" button, on my Linux version this functionality is not available in the terminal, is it normal?

Yes, it is a limitation of Linux implementation - you will see the same issue when opening tclsh (Tcl shell).

In the past, developers used Emacs to work with WOK (legacy toolchain for building OCCT) and DRAWEXE, which allowed to use a command input buffer implemented by Emacs itself (or by some extension). There are might be some other solutions to this problem.

Vins Ocell's picture

Thanks again! I think I have a guess: it might be a refreshing problem because when DRAW is "locked" you can unlock it just by moving the mouse into the 3D window. There the command line becomes available for new instructions... Do you have an explanation ?