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.

Corrupted drawing

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

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Dr PR

V20.0
Vista 64

I have a drawing I have been working on for several years. It originated in V15 and has been edited in V17, V19 and now V20. A few days ago I started working on it again, and had no problems. A number of objects were added and the program operated normally.

Tonight I resumed work on the drawing and added a few simple objects. Then suddenly very strange things started happening. I had an object that could not be selected by gravity snapping to it. I could select it by using "Edit/Select All" and it was highlighted. However I couldn't edit it in Point Select mode. Even though it was selected/highlighted and the points were shown, I couldn't gravity snap to any points.

Then I discovered that if I tried to shade the drawing with Gouraud the program hung. Before the problem appeared the drawing would shade in 30-40 seconds. After the unselectable object occurred the program hung for 15 minutes after I started shading - then I used CTRL-ALT-DEL to open the Task Manager and kill the program. The drawing would shade almost instantly with Quick Shade and Wireframe was OK.

I thought it might be a group related problem so I executed the Group Count macro that is available on the forum. The program hung - after 10 minutes I used CTRL-ALT-DEL again.

I restarted the program, opened the drawing, and moved everything else off the layer with the strange object. Then I deleted the layer. When I tried to resume editing the drawing I found many more objects that could not be selected by gravity snap. The Info Box said everything was a single solid! When I selected everything on the layer with "Edit/Select All" I discovered that everything in the the entire drawing had been selected except the last two objects that I had created, even objects on disabled and locked layers! The Info Box said everything that was selected was a single solid! The backup file was like this also.

I deleted the layer containing all the work I did this evening. After that the Group Count macro executed in less than a minute - only 197 groups in the drawing and Max Group ID 254. Gouraud shading still doesn't work. Everything remaining in the drawing is still a single solid.

Once again it looks like V20 has screwed up a drawing royally!

Has anyone else seen anything like this? Any suggestion how to recover the lost work?

I do have a January 2009 backup (the last time I worked on the drawing before this week) so the entire four years of work are not lost, but many hours of work from the last few days are lost.
DesignCAD user since 1987

Lar

Sounds like your drawing entered... the Twilight Zone.

On a serious note, I do vaguely remember not being able to snap on something once... could it have been something you uploaded on the forum, a curve or something that was acting strangely.  At the moment I can't recall the exact problem and if there was a solid solution.

Here's another idea: is it possible that any of your macros that employ GetAttr and PutAttr unintentionally change the value of the 'type' parameter. This can seriously corrupt the program and afterwards it will tolerate certain actions but eventually it will crash.

Lar

dcadRob

I find that when a program goes crazy, the safest way to deal with it is to shutdown and restart the computer. Killing the program through task manager and then rerunning it seems to make it more unstable and causes more damage.  

Rick V.

Dr PR,

That is the nightmare.

Do you still have v15 on your system? I'm curious as to how the drawing behaves with v15.

Any dimensions you've created in the later DesignCAD versions will be toast, but if it will open in v15 and behave it might be a chance to save the core drawing.

Just a thought.

Also, I know you know to save with a different file name and all that, but others reading might not. As the technology "evolves" I've started saving working drawings every now and then with the current date as part of the file name. It eats HD space and is no guarantee, but helps me sleep better.

Adrian 2.0

You could try exporting to DXF & re-importing as a new drawing.
You will loose ALL your solids & groups, but you may be able to 'clean up' the rogue element, and then cut & paste it into your backup file?

An older DWG format may also kill the bugs.

Dr PR

Thanks for the suggestions. The big problem is that if the single huge solid is exploded all the surfaces fall apart into individual facets (62,789 Grid surface Entities!). The drawing is then essentially uneditable. Fortunately I had added only a few dozen objects to the older drawing, so it will take only a few more days to get back to where I was.

What I really worry about is whether there is something in the original V15/V17/V18/V19 drawing that causes V20 to go crazy. Then I really will be screwed.

I wondered if possibly I had selected everything and defined it to be a solid, but I think that is essentially impossible. I was creating new solids just before the problem occurred, but those objects were not part of the single huge solid - everything else in the drawing except the two new solids was lumped together as one solid. The new solids were created on two enabled layers - the other 22 layers were disabled. Some of the objects on one of the enabled layers were lumped into the large solid, but most of the objects were on disabled layers.

The first inkling of trouble came when I used "Edit/Section Trim" to cut off the end of a cylindrical grid. I first created a cylinder with the "Cylinder" tool. Then I selected it and used "Solids/Solid Explode" to break the cylinder into the cylindrical grid and two circular plane ends. I deleted the ends. Then the Surface Intersect function was used to find the intersection of the cylindrical grid with another cylinder. I edited the cylindrical grid in Point Select mode to move the end points of the facets to the intersection points on the other cylinder.

Note: I use this procedure to get smooth intersections between cylinders because "Solid Add" and "Solid Subtract" often screw up the surfaces of cylinders so they render oddly. I exploded the working cylinder so I wouldn't end up with an end plane wrapped around the surface of the second cylinder. Such warped planes cause odd shadows in renderings. Another way to accomplish what I was trying to do would be to make a copy in place of the second cylinder and subtract it from the first.

After editing the cylindrical grid I used the "Edit/Section Trim" function to shorten the other end of the cylindrical grid. It took a very long time for the trim function to execute and after that I couldn't select the cylinder. When I used "Select All" to select the cylinder just about everything in the drawing appeared, even though all other layers (22 of 24) were disabled.

The really odd thing is that the cylinder I was editing was not part of the composite solid.
DesignCAD user since 1987

Rob S

Is it possible that there is some kind of limit relating to solids or facets as there was relating to group ID's?

I'd be careful to save alternately to a couple of different filenames as you go, so you can always at least get back to second last saved version.

You have probably created some of the most complex Designcad drawings of anyone anywhere ever, and pushed it to its limits, regardless of version.
User since forever

Dr PR

Rob S,

You beat me to it!

I just noticed that after I created a new solid (a very simple six sided "nut") I could not select it. I opened the layers dialog and clicked "Unlock All." Then I could select the new solid. I clicked the "Apply Layer to Selection" icon to move the selected object to the current active layer (where it already was). Then when I used "View/Fit to Window" the view expanded to show another solid that was also highlighted as selected. Both were lumped together as one solid. It looks as if when I created the new solid it was lumped together with an existing solid.

This is exactly what happened when new groups were created and the Max Group ID overflowed. The new group was assigned the same Group ID as an existing group, causing both to be lumped together as one group.

****

DT,

Do solids have "Solid IDs" and is there a "Max Solid ID"? If so, what is the maximum, and is there a way to repack solid IDs similar to repacking Group IDs?

Does anyone have a "Solid Count" macro like the "Group Count" macro?

****

I think this drawing is jinxed! This is the same drawing where the Max Group ID overflow first raised its ugly head back in V17 days. When that happened the drawing was corrupted so the program crashed every time I tried to edit it. Again, I had a backup but a lot of work was lost when that happened.

This drawing is not too large, 26.417 Mbytes. It has 67,219 Grid Surface Entities, 32,960 Planes, 727,416 Points and a total of 103,900 Entities. It has been edited many times over the last five years, with many solids and groups created and then deleted as the drawing was refined, so the Max IDs could easily have overflowed.

Right now the drawing has 217 groups (Max Group ID = 487). This is a drawing where the Max Group ID exceeded the 16,000 maximum a few years ago! If there is a Max Solid ID I can understand how it would be astronomical by now.

Maybe I will try the old Max ID repacking trick - copy the entire drawing into a new file with a single solid in it.
DesignCAD user since 1987

paulerens

Dr PR,
With this macro you can check the solid number.

Paul.

Lar

Quote from: Dr PR on July 21, 2010, 11:43:11 PM
Do solids have "Solid IDs" and is there a "Max Solid ID"? If so, what is the maximum, and is there a way to repack solid IDs similar to repacking Group IDs?

My investigations show that defining solids has the same effect as defining groups. I guess we all just use far less solids than groups.

I'm sure there's no 'pack solid' function... yet.

Lar

paulerens

#10
Dr PR,
This macro does the job

This macro select all solids, one by one, create a group with their.
Then PackGroupIDs the groups and the group number is assigned to the solid numbers.


Will you try, he does it for me.

Paul.

Rob S

Could be subsequently pasting contents into new drawing will reset max group ID number??
User since forever

Lar

Maybe using the 'fix-group' trick by creating solid #1 in the new file before pasting in the stuff from the other file.

Lar

DrollTroll

I suspected we might also need a "Pack Solid IDs" command sometime. Looks like this is a good time.
25 years with DesignCAD

Rob S

Hey DT, long time no hear from...

Does that mean we're looking forward to a v20.01   :)
User since forever