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.

ENORMOUSLY BAD BUG!!!!!

Started by Dr PR, August 26, 2009, 03:11:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dr PR

DesignCAD V19.0 and V19.1
Vista 64 SP1
XP SP3

I have a file that was generated from XYZ data from an industrial scanning application. It has 332 lines.

I created a surface (Surface Connect) using all the lines, with the maximum number of points (198) per line that the program allows.

The program generated the surface. We looked at it, rotated it, changed color, etc. I exported images of the surface, and exported the file as a DWG and DXF. AutoDesk's DWG TrueView shows the surface in the DWG/DXF files.

I saved the file from DesignCAD and closed DesignCAD. When I restarted the program and loaded the file the surface was not there! The drawing preview showed the surface, but after the file opened it wasn't there.

The original XYZ data scan lines are there, and the layer labels are there, but the surface is missing. I have repeated this three times on two different machines with the same results.

THIS IS VERY VERY BAD!

"Help/Drawing Info" reports only 332 lines in the file. No surfaces, grids, etc.

I imported the DWG file.

"Help/Drawing Info" reports 332 lines and 333 grid surface entities.

I saved this test file in DesignCAD V19 format and closed DesignCAD.

I restarted DesignCAD and opened the DesignCAD format test drawing. The grid surface is there. When I select it it highlights as a single surface grid.

BE WARNED! V19 MAY NOT SAVE ALL OF YOUR DRAWING!

DesignCAD user since 1987

DrollTroll

Dr PR, please see if you get the same result using the attached macro (Note: the macro assumes the drawing contains nothing but the imported xyz lines).

If the same thing happens, can you share your xyz data?
25 years with DesignCAD

Dr PR

DT,

What do you want me to do with the macro?
DesignCAD user since 1987

DrollTroll

#3
Import your xyz data into a blank drawing, then run the macro, save, close, and reload the file. Check for same problem as before.

To clarify, the macro should simply select all the lines and run a surfaceconnect operation on them automatically (sparing you the manual clicking on 332 lines).
25 years with DesignCAD

Dr PR

DT,

1. I started V19.1 and imported the XYZ data.

2. Then I ran the macro. A surface was generated.

3. The file was saved and V19.1 was shut down.

4. I restarted V19.1 and loaded the file. The surface was there, on layer 1 with the original lines.

5. I selected the surface, opened the Info Box, and moved the surface to layer 2.

6. The surface color was changed from the default black to cyan. It rendered OK with Gouraud shading.

7. I saved the file and shut down V19.1.

8. DesignCAD was restarted and I opened the file. The surface was gone.

9. I tried to send the XYZ data but it is 5 Mbytes.
DesignCAD user since 1987

DrollTroll

Can you email the xyz data to me?
25 years with DesignCAD

Dr PR

DesignCAD user since 1987

DrollTroll

Thanks for the data. Very strange behavior indeed. That *is* one honkin' big grid, though. I'm not sure what triggers the deletion -- I'll have to put that question to programming.
25 years with DesignCAD

Dr PR

DT,

I'll venture a guess, though I haven't tried to test the hypothesis.

When creating grids we are limited to no more than 198 points along the template lines. As the number of lines increases the total number of points allowed along the line decreases. I posted something about this a while back. So it looks like there is a maximum total number of points allowed in a grid (2^16 = 65,536). Maybe the gridding code is written with word variables instead of longs?

In the example grid 332 lines x 198 points = 65,736. This exceeds 2^16. Even though the grid was created, displayed and saved as a DXF, maybe DesignCAD just won't save or open a grid with more than 2^16 points.

For what it is worth, I have run into grid size limits a number of times when trying to model ship hulls. I typically have to use multiple grids because 198 points are insufficient to model small radius curves in large surfaces. You need at least half a dozen points along the sharp radius segment of the surface to get a smooth grid.
DesignCAD user since 1987

DrollTroll

I've reached the same conclusion. As an experiment, I modified the connection macro to connect all but the last line, and the resulting grid can be opened and saved at will.

It's attached here if you want to try it out -- connector2.d3m

Again, import your xyz data, then run connector2.d3m. It'll connect all but one of the lines.

If that's the problem, at least a warning that "This grid has too many points" would be of some help, no?
25 years with DesignCAD

Dr PR

DT,

The warning would be nice.

This only came up with the machine produced XYZ file. I don't think I would have the patience to try to create a drawing manualy with 300+ lines to connect in a single grid - although I have worked with files with as many as 150 template lines.

I don't recall anyone else ever reporting this problem, so I wouldn't put it high on the lists of things to fix.
DesignCAD user since 1987

DrollTroll

Thread necromancy rules!

DP, I was just revisiting this while we're looking at 20.1, and I can't seem to reproduce the problem in V20. Can you?
25 years with DesignCAD