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.

Corrupted drawing

Started by Dr PR, July 20, 2010, 10:51:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lar

Hey, anybody got one'a dem Inception (the movie) machines we could hook up DT to?

Lar

Rob S

Not sure bout that, but I think I may have accidentally discovered his residence the other day

Good thing he didn't recognize me  ;D
User since forever

Dr PR

#17
Paul,

Thanks!

I "poked around" in the drawing with "The solid number.d3m" and found solid numbers as high as 25,000. I sure hope the maximum solid ID isn't 16,000!

I am pretty sure there aren't 25,000 solids in the drawing, but there should be a lot. I once noticed that solids rendered differently from ordinary planes and grids. This produced some annoyingly inconsistent image colorations. If you select a plane or grid and define it to be a solid with "Solids/Solid Define" it will render the same as a true solid. Also, if you define a collection of planes to be a solid they will render smoothly. Consequently, I have a habit of defining just about everything to be a solid.

It appears the macro will not give the number of a solid if it is included within a group. Sorry - I guess the objects just aren't solids - I get a solid number = 0.000.

I tried the "Renumber solids.d3m" macro, but it is reporting over and over:

"Error executing DesignCAD Command: GroupDefine ID:10,190"

Looks like it is hung on something.

Before executing the "Renumber solids.d3m" macro I ran the "Group Count.dw3m" (gc.d3m) macro:

Total group count is: 217
Maximum group ID is: 487

After running the "Renumber solids.d3m" macro the Group Count macro now reports:

Total group count is: 263
Maximum group ID is: 3608

So the macro was doing something with group numbers.
DesignCAD user since 1987

Dr PR

I tried the "copy to a new drawing" trick to repack solid IDs. I opened a new drawing, created a cube, and then copied and pasted the entire problem drawing into the new drawing.

Before doing this I checked a solid in the old drawing with Paul's "The solid number.d3m" macro. It gave a solid number = 20295.

After creating the new drawing with a single cube I tested the cube and it had solid number=1. So far, so good.

After pasting the large drawing into the new file I tested the old solid again: solid number = 13534.

The largest solid number I could find was 13671. It looks like this did the trick and repacked the solid IDs. It also looks like there are more than 13,000 solids in the drawing!

****

DT,

In addition to repacking solid numbers it would be a good idea to expand the maximun solid ID just as you did with maximum group ID.

****

Thanks everyone for the help. I'll let you know if problems pop up again.
DesignCAD user since 1987

dcadRob

I wonder what else is going on. Numbers like 20295 and 13534  don't look like the typical limits you see in software (like 16384 or 32768).

Lar

Don't forget that when you paste in groups the group id's double (leving a gap in the numbering below it). The same thing probably happens with solids when you paste them in.

Lar

Dr PR

dcadRob,

Back when the group ID limit was about 16384 you could get group ID numbers much larger than that by cutting and pasting. If you had 15000 groups in a drawing and copied and pasted them into the same drawing you got 30000 groups. Apparently they all had unique ID numbers. I somehow created a drawing with about 48,000 groups!

Then when you created a new group the new ID number would roll over (essentially subtracting 16384 from the new ID number) to something less that 16384, and the new group would be incorporated with any existing group with the "new" group number.

Looks like solids work this way too.

Lar's comment is worth remembering. When you cut and paste a group into a drawing the Maximum Group ID is incremented twice for some reason. Duplicating it with the "N" function increments the group ID only once.

I added a solid to the drawing I have been working on and then used the "The solid number.d3m" macro: Solid number = 13678.

I duplicated (N) the solid: Solid number = 13679.

Then I copied and pasted the solid: Solid number = 13681.

Looks like Solid IDs work exactly like Group IDs.

In fact there may be only about 6500 to 7000 solids in my drawing.
DesignCAD user since 1987

Dr PR

#22
I modified the group count macro (gc.d3m) to count solids. The macro is attached. It seems to work OK, at least on small files.

I tested it on a file containing three solids, the original solid, a duplicated (N) copy and a clipboard copy/paste copy:

Total solid count is: 3
Max solid ID is: 4

This is what was expected.

I tried it on several files. One small file with only 2752 entities shows how the max solid ID can run away very fast:

Total solid count is: 73
Max solid ID is: 2239

Another larger file (38553 entities) gave these results in about 10 minutes:

Total solid count is: 2102
Max solid ID is: 5115

I tried it on my large file with thousands of solids (103895 entities) - it ran for 30 minutes without ending so I stopped it. Macros are interpreted, and interpreters are notoriously slow.

Edited 26 July: After a little more than an hour the macro reported 6779 solids and max solid ID 14106. This was after I had repacked the solids by copying everything into a new file, and after a little more editing.

****

I wonder if solid ID overflow is the reason I have never been able to edit files much larger than 375 Kbytes even though the machine has almost ten times that amount of free RAM? Back in V17 when the group count overflow gremlin raised it's ugly head I simply added another group to a drawing that I had been working on for some time and it became uneditable. If I tried to modify the drawing the program crashed - in both V15 and V17.

I have tried to put together my entire ship model, cutting and pasting individual structures into one main drawing. When the file size gets larger than about 375 Kbytes the program becomes really squirrely, crashing randomly. I would guess that there are 30000 to 40000 solids in the composite drawing.
DesignCAD user since 1987

Lar

Other things about group id's (and probably solids) to remember:

If you delete a group then 'undo' to bring it back, the 'undid' group takes a new and higher id...

If you create a group in any way (define/ paste/ load, etc) the max id goes up, as it should. If you then Undo the group creation (to get rid of it) then Redo (to bring it back) the 'redid' group takes a new and higher id...

If a Symbol or Block contains groups it adds to the 'Max Group ID'...

If you delete blocks with groups then 'undo', or if you explode such blocks, the max id does something like a hop, step and jump (jumped from 4 to 13 in my undo test and then to 27 in my explode block test. This needs to be tested more thoroughly when I have time).

Groups just go around fathering babies all 'bout the place.

Lar

Dr PR

DT,

What is the maximum solid ID in the current V20.0? Is is about 16384 as in the old Max Group ID?

I just copied and pasted a drawing into a new file with a single solid, and the solid count macro reports 8265 solids and max solid ID =  16552. Looks like copy/paste increments the max solid ID twice for each solid, plus a few extras thrown in from somewhere.

One reason the solid ID grows rapidly is that when you execute a solid boolean function the two original solids disappear and a new solid is created. So even though two solids are replaced by one, the new solid has a new number and the max solid ID is incremented.
DesignCAD user since 1987