News:

Please note new Forum URL: forum.designcad.com

Main Menu
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.

Group problems V18.0

Started by Dr PR, October 01, 2007, 01:27:07 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

prl

You misunderstood.  I think DesignCAD has the code indexing typo in it.  Why else would the group index numbers top over so fast.

dcadRob

#16
We discussed weird group numbers relating to V16 in July 2005.

http://forums.upperspace.com/topic.asp?TOPIC_ID=3123

Dr PR

gc.d3m and k34.d3m macro tests. The following tests were run with DesignCAD V18.0 on a Vista 64 machine with 4 Gbyte of RAM with about 2.5 Gbytes free after Vista and DesignCAD are started (not resource limited).

To test the group count macro gc.d3m I created an empty file and then added several groups one at a time. I ran gc.d3m and k34.d3m after each step. For 0, 1, 2 and 3 groups the group count and max ID were 0, 1, 2 and 3. In all cases no K34 entities were found.

Then I deleted the second group and got a group count = 2, max ID = 3 and no K34 entities. Then I added another group and got a group count of 3, max ID of 4 and still no K34 entities. Next I duplicated (N) the three groups four times to give a total of 15 groups. Group count = 15, max group ID = 16, and no K34 entities.

This pretty much verifies what has already been stated. Each new group increments the max group ID, and deleting groups does not decrement it.

I copied and pasted everything into an empty V18 file. Group count = 15, max ID = 16, no K34 entities. I then grouped six of the groups together to create a nested group. Group count = 15, max ID = 16, and 3 K34 entities deleted. I repeated the macros, group count = 15, max ID - 16, and no K34 entities.

Nesting groups did not change the group count or max ID, but it did mark three (why only three?) of the groups with K34 markers. Deleting the K34 marks does not change the group count or max ID, and none of the existing groups disappeared.

I then duplicated all the groups 10 times in succession to produce 2^10 groups (15360). I tried to run gc.d3m, but after 15 minutes it stopped - subscript out of range. The ks3.d3m macro reported 15360 entities deleted.

I edited the group count macro to increase the grouplist size from 10,000 to 100,000 and tried again. 50 minutes later (at 2.4 GHz!) it reported group count = 15360 and max ID = 15497. Note: I deleted some group copies during the process by hitting the Undo arrow, and this probably explains the odd max ID number. Once incremented it does not ever get smaller.

I tried to select everything again to duplicate once more, but the selection was picking a group about once per second. Not wanting to wait 15,000 seconds (4 hours), and since ESCape does nothing, I used CTRL-ALT-DEL. In Windows task manager I tried to stop DC V18, but nothing happened
DesignCAD user since 1987

Dr PR

One more time ... Sorry if folks are getting bored with this, but I want to share my observations about this problem.

I opened a large file in V18. I had previously copied this from an earlier file to reduce the max group ID via the procedures described in earlier posts. I executed the group count macro gc.d3m: Group count = 207, max group ID = 372. Then I executed the K34 macro: 1 group entity found and deleted. Looks like I missed a nested macro.

Next I added a line and saved (Save As) to a temporary file. I made the line a group in the temporary file and then copied everything but the line from the original file and pasted it into the temporary file. Group count = 208, max group ID = 415. 415 = 207 x 2 + 1, so V18 doubled the max ID. I executed k34.d3m: 207 group entities found and deleted. Then I ran the macros again: group count = 207, max group ID = 415, and 0 group entities found and deleted.

When you paste groups into a V18 file it seems DesignCAD attaches the K34 tag to each pasted group. Each K34 entity counts as a group and adds to the max ID count. This helps explain why the count skyrockets so fast.

I added a line mark to the temporary file, selected it and copied it to the clipboard. I opened V15 and pasted the line into it. Group count =0, max group ID = 0, and 0 group entities found and deleted.

I made the line a group. Group count = 1, max group ID = 1, and 0 group entities found and deleted.

Then I copied the entire file, less the line, from V18 and pasted it into V15. Group count = 208, max group ID = 415, and 0 entities found and deleted.

V15 does not double the group count when groups are pasted into a file.
DesignCAD user since 1987