📜 ⬆️ ⬇️

Help: "nanoCAD sees not everything that is created in AutoCAD"

Waking up in the morning and pouring a cup of coffee, I looked at my favorite forum.nanocad.ru and found a plea for help - they say, nanoCAD does not display a drawing from AutoCAD. More precisely, it displays, but not everything - “who has already struggled with a similar phenomenon, tell me the recipe” ... Suspecting what the matter was, he set the coffee aside and loaded the DWG-drawing for research.



Who cares a little bit of morning tediousness, welcome under Habrakat ...
')
We look in nanoCAD
So, given a DWG drawing of unknown origin, which is poorly displayed in nanoCAD (you can take on the forum: forum.nanocad.ru/index.php?app=core&module=attach§ion=attach&attach_id=5451 ). We need to find out why not everything is displayed and what to do about it ...

First of all I load nanoCAD Plus 6.0, click on open and lift the drawing. Loaded quickly, obviously not everything is displayed:


UPD: If now this drawing is opened in nanoCAD Plus 8.1, then the program immediately reports that there is something wrong with this document. In particular, he writes the following:

Very convenient, because By clicking on the "Fix" button we get a more sane document. But below the article we explain what was and what else to do ....

I'm trying to look at the drawing from the side (view command, standard views, front): bang, the drawing field turns into a white screen, the cursor is not displayed on it. Everything is clear - knocked out the video subsystem of nanoCAD. Returning back to the top view (view command, standard views, top). Close the document.

We look in AutoCAD
For the sake of interest, we look in AutoCAD 2015. Download, it seems to show more. We look from the side: the program displays a vertical bar, the coordinates in the status bar are not displayed. But if you panarize, you can grab the coordinates in the status bar - for a minute there -1.284e + 81 (that is, one with 81 zeros!):


I close the document - everything is clear. Diagnosis: in the file z-coordinates are scattered randomly over a huge range. AutoCAD somehow displays such files (is it all?), NanoCAD honestly shows only reasonable coordinates, hinting at the problem of the document.

Fix in nanoCAD
The DWG document is clearly corrupted, the user usually says: “What am I? I simply discovered it. ” Guilty, of course, not found; it remains to be corrected ...

In nanoCAD Plus 6.0, we entered the PROVGEOM command, which allows you to reset the coordinates: go to File \ Utilities \ Check geometry, select the option "Check z-coordinates", then "Correct errors = Yes" with the default tolerance (1e + 20), Enter … What's happening?

The program runs through all the objects and, if their z-coordinate is knocked out of the specified range, moves the whole object up or down to the z-coordinate that was knocked out. This leads to the fact that the geometry of the object does not change, but the object itself returns from space to earth. Even after such a simple operation, the data in the drawing immediately appears. Plus there is an opportunity to take a look at the drawing from the side - here is the visualization of the problem DWG:


These actions are now on the machine when opening makes nanoCAD Plus 8.0 - i.e. determining that the objects in the document are located in unrealistic coordinates, informs the user about this, and then (when choosing the “Repair” command), returns the problematic elements to reality. But at the same time, the document is still not completely corrected - nanoCAD Plus 8.0 automatically rules only obvious problems.

Another nice look at this in 3D:


Now objects are scattered along the “only” z-height in the range of plus or minus 1e + 20 (that is, one with 20 zeros). It is clear that on such a file neither bindings, nor cropping, nor contour search for hatching work - and nowhere in AutoCAD or in nanoCAD. Well, in nanoCAD Plus 6.0, it is necessary to consistently repeat the operation PROVGEOM, first with a tolerance of 1000, then 100, then 10, then 0 and voila, the drawing is completely fixed (http://forum.nanocad.ru/index.php? app = core & module = attach§ion = attach & attach_id = 5455).


A little bit more about the intricacies
Smart people say that AutoCAD has a similar FLATTEN command (from ExpressTools). Yes, there is, but ... FLATTEN changes the geometry of the drawing, making the projection of the geometry on the zero plane - that’s what it is dangerous for. For example, if a document had 3D objects (for example, a line, one end of which lies at a height of 100, and the second at 3000), flatten completely destroys the 3D representation of the model (that is, lowers the ends of the points to the zero plane), and PROVGEOM transfers it to zero plane only objects that fall outside the specified range! In the example with the line - it has one end lying at zero, and the other end at 2900. Thus, the drawing with 3D data will not be destroyed. There is a difference, and it must be understood.

How to solve the problem in nanoCAD Plus 8.0
And with the eighth version, everything is much simpler: after all, we have implemented the analogue of the FLATTEN team - here it is called CONV2D. We make sure that we are looking at the document from above (TOP-command), calling CONV2D (File-Utility-Converting to 2D), choosing the option "?" and then “EVERYTHING” (i.e., select all data in the drawing) and press ENTER - for all 5 seconds and voila - the document is absolutely flat:


At the same time, if there are objects in the document that still do not need to “cut off” the z-coordinate, then select not all data, but only those that need to be “flattened” - here you can use various selection methods: manual, by criteria , through the Quick selection panel, etc.

What else?
Plus, I also went through the DWG document using the Document Check (AUDIT) utility — very often it fixes database errors. And you can also use the “Purge Document” (PURGE) - in the current document there are a lot of unused layers, types of lines, blocks and so on. But all this is at the discretion of the user.

Conclusion
Well, that's ... coffee is still cold ...

Source: https://habr.com/ru/post/250791/


All Articles