DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Multiple Re-Paints on large drawing? ***FIXED***

Started by corlett, April 15, 2019, 03:52:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

corlett

Hi

I have noticed an issue with my large drawings.
If I load some drawings, typically large ones, the drawing loads and then re-paints and then re-paints and then re-paints.
With some drawings repainting 4 times.

After this some zoom in zoom out events also re-paint more than once.
Change window to a browser, then return, re-paint, re-paint.

One of these re-painting drawings has 33000 entities and 177000 points.
So 9Meg file and an 18 Meg .bak

Have I just over stepped the available space and its file swapping?

Clive

64 bit Win7, i5, 8Gb Ram, DCAD 26.1

Adrian 2.0

I get the same issue a lot.
I can often stop the redraw with the escape key and regenerate manually - then it only redraws once.

Some of my files regenerate tens of times if left to their own devices & can take forever - not to mention start epileptic fits for anyone watching. Very annoying.

Adrian

corlett

Hi adriank

Yes I found the escape key; made more functional with multiple pressing and a cry of "Stop!" and bad language.

Clive

Dr PR

#3
I have been reporting this BUG for years - ever since V16 I think!

In 3D under some circumstances every redraw due to a change in the drawing follows this sequence:

1. main window
2. main window
3. front window
4. top window
5. side window
6. main window
7. front window
8. top window
9. side window
10. main window
11. front window
12. top window
13. side window
14. main window
15. front window
16. top window
17. side window

If you have additional windows open the sequence will be extended for each additional window.

If you have Point Select Mode enabled, and some points are visible (objects selected) each of the redraws repeats twice - first to redraw the drawing objects in the window and then again to draw the selection boxes.

****

In some cases it isn't necessary to make changes to the drawing to trigger the repeating sequence. If you change the main window from OpenGL Gouraud shading to Wireframe all four windows are redrawn - over, and over, and over, and over ... Even though NOTHING in the other three windows needs to be redrawn! Switching back to OpenGL Gouraud from Wireframe in the main window causes only one redraw of the main window.

On my system (4.3 GHz 6 core i7 and very fast RAM), working with a 50 megabyte drawing the redraw sequence lasts 25 seconds. With very large drawings up to 750 megabytes each redraw takes several minutes, and a complete sequence can take an hour or more.

In order to make the program usable with very large drawings I work with only the main window open and disable all layers not necessary for the immediate drawing operations.

When I have multiple windows open with the main window shaded, and want to switch to Wireframe, I first open the Layers dialog, switch to an unused layer, and then hide all other layers. Then I switch to Wireframe view, open the Layers dialog and display the necessary layers.

If I ever do accidentally start the entire redraw sequence with a very large drawing I immediately press CTRL-ALT-DEL to open Task Manager and kill DesignCAD. Then I restart the program, reload the drawing (that can take up to half an hour) and restart. Of course any unsaved drawing elements will be lost. So, again in self defense, I normally save the drawing after every operation (and that can take a minute or more)!

****

And, if all this isn't ridiculous enough, occasionally when I am working with OpenGL Gouraud shading in the main window, and I delete an object containing a grid, all windows are redrawn every time for every single facet in the grid! You can watch each facet disappear as the view is redrawn over, and over, and over, and over, and over, ... I let it run for several hours once to see how long it would take, and gave up. Again, CTRL-ALT-DEL is the answer.

In self defense I always switch to Wireframe view before making deletions.

****

I have a theory why we have to deal with this. Version 16 had more bugs than an ant farm. Version 17 added to the mess when shadows were introduced. The video display routines all descend from the original Windows 3 conversion. It took years to fix all the bugs in that code. Over the years, as new versions of Windows came along, changes had to be made to the display routines.

I recall that somewhere after V15 a bug was introduced where some parts of a drawing were not appearing after a screen redraw. One guess is that the programmers never figured out what was causing the problem, but discovered that if you redraw the screen enough times everything will eventually reappear. With small drawings the multiple redraws aren't noticeable, and back then you couldn't create a drawing over 60 megabytes in DesignCAD. That's just a guess.

Another possibility is that somewhere in the code there is a BUG that chases its tail several times before finally escaping the loop and finishing. Faulty loop counter? Errant loop counter pointer?

With the 64 bit code we can create huge drawings (at least 750 megabytes) and the incessant redraws can last for hours.

I had hoped the RedSDK revisions would eliminate the faulty code. That is the main reason I strongly supported RedSDK development - to get rid of the incessant redraws. However, the multiple redraws still happened after RedSDK was introduced, so the problem apparently lies in the code that triggers the redraws and not in the display redraw code itself.

Now that RedSDK has been abandoned (too expensive for a low cost program like DesignCAD?) I have lost hope the BUG will ever be fixed!

Phil

Note: The ESCape key only halts the current display iteration, not the entire sequence - another BUG. And the key doesn't take effect until after the current redraw has completed.

With large drawings CTRL-ALT-DEL is faster.
DesignCAD user since 1987

corlett

Hi Dr PR

Thanks for that as ever a thorough reply. ( I thought I had problems ) with my modest sized files and re-paint times.

My issues were exclusively 2D. However your comment "disable all layers not necessary for the immediate drawing operations" has had an immediate affect.
I Window hop from Explorer to DCAD and no re-paints; In DCAD drawing to drawing to drawing with no re-paints.

It will take time to seen if this is fix works for me in all cases but THANKS for the insight.

Clive