Question

DWG to DWG Writer Error

  • 24 January 2019
  • 9 replies
  • 9 views

Badge

Hello,

 

I am trying to reproject a .dwg file and write it in .dwg format as well. I am using a GeometryValidator and a SnakeGrid transformer. The workbench runs fine, until I connect a .dwg writer, where I get the error as shown in figure.

Any ideas more than welcome.

 

Thank you for your time.

Kind regards,

George Floros

 

 


9 replies

Badge +16

Hi @georgefloros,

Do you have the same error when using the Autodesk AutoCAD DWG/DXF writer?

Badge

Hello @itay ,

 

Thank you for your reply. Apologies I should ave clarified:

 

I am using the Autodesk AutoCAD DWG/DXF Writer and I have also tried the real DWG/DXF Writer. When I tried to write in .shp for instance, it worked fine. If I do not attach a Writer, process works fine. Therefore, I believe that the problem is writer related, even though it is the same format.

 

Hope that clarifies things a little.

 

Kind regards,

 

George Floros

Badge +3

@georgefloros

 

The writer has a problem with at least one area object. Created by the snakegridtransformer I presume (as I don't know if you have more geometric operations in the workbench).

I guess it is probably one area posing as a line, a 3 vertex object with vertices extremely close to one another. Or maybe even a NULL object posing as a area

After geometry validator, check for objects with really small areas. (with writer disconnected, sort them by area and see what the smallest is). Filter them out and see if it writes.

 

NullEntityPointer suggests such .

Maybe post a sample with the flaw?

You can check at which object it crashes in the log and use a counter to select it is (usually recordnr +1)

Badge +16

Hello @itay ,

 

Thank you for your reply. Apologies I should ave clarified:

 

I am using the Autodesk AutoCAD DWG/DXF Writer and I have also tried the real DWG/DXF Writer. When I tried to write in .shp for instance, it worked fine. If I do not attach a Writer, process works fine. Therefore, I believe that the problem is writer related, even though it is the same format.

 

Hope that clarifies things a little.

 

Kind regards,

 

George Floros

Hi @georgefloros, I think you are on the right track and as @gio suggest it a good idea to evaluate the validity of the features going into the writer.

Badge

Hello @gio

 

Thank you for your feedback. I believe we have done some progress. I used an AreaCalculator and a Sorter. Apparently there were rows with negative values (!) which I removed by using a Tester. The result was promising as we reach the 18000 features of writing (compared to earlier error that popped at 7000), but there is another error again as attached of similar context.

Any ideas?

 

Thank you for your time.

 

Regards,

 

George Floros

 

P.S: I will also test the functionality with the log you proposed, I was not aware of this and thank you very much!
Badge +3

Hello @gio

 

Thank you for your feedback. I believe we have done some progress. I used an AreaCalculator and a Sorter. Apparently there were rows with negative values (!) which I removed by using a Tester. The result was promising as we reach the 18000 features of writing (compared to earlier error that popped at 7000), but there is another error again as attached of similar context.

Any ideas?

 

Thank you for your time.

 

Regards,

 

George Floros

 

P.S: I will also test the functionality with the log you proposed, I was not aware of this and thank you very much!

@georgefloros

Seems still not able to create a region from some area.

 

I suggest to create a counter after the sorter.

Then capture (using a tester) item 18275 or 18276 and check it out. (maybe post that piece of data so we can check it)

 

Assuming the Validator removed or repaired all self-intersections, I still think these might be objects with 3 vertices where two vertices are extremely close to one other. This would look like a line (in case of 4 vertices 2 pairs close to on other, very rare though)

 

Or maybe a donut with touching boundary. In that case you need to set the self-intersection testing in the validator to "check self touching polygon"

 

The index failure might suggest self-intersection or boundary self touching.

 

 

Badge

Hello @gio

 

Thank you for your reply.

So let me explain things a little bit more; I should have thought of that in the first place.

 

So in the Geometry Validator I am testing only for Basic Integrity. I did however added the extra tests you mentioned, but the result did not change.

Moving on, I realised that the error comes when feature 17564 is about to be written. So I isolated this one and there is the result

 

Applying the same mindset, I removed 18025 (similar point) and 17564 (a line with tiny area). It looks like though it keeps crashing.

 

Could you please advise me how to move forward?

 

Thank you for your time.

 

Regards,

 

George Floros

Badge +3

Hello @gio

 

Thank you for your reply.

So let me explain things a little bit more; I should have thought of that in the first place.

 

So in the Geometry Validator I am testing only for Basic Integrity. I did however added the extra tests you mentioned, but the result did not change.

Moving on, I realised that the error comes when feature 17564 is about to be written. So I isolated this one and there is the result

 

Applying the same mindset, I removed 18025 (similar point) and 17564 (a line with tiny area). It looks like though it keeps crashing.

 

Could you please advise me how to move forward?

 

Thank you for your time.

 

Regards,

 

George Floros

@georgefloros

 

Hi,

I think I would need sample data to help. Is it possible to post it?

Maybe also your workbench if possible.

 

If you read and write without using a SnakeGridProjector I assume no error would occur,yes?

 

 

Badge +3

@georgefloros

 

Hi,

did you manage to solve the problem?

 

I was wondering, because I found a possible problems wich might cause the index failure.

What I encountered was donut_hole with non dropped holes wich had another object in the same position.

This was caused by deconstructing objects and rebuilding them (needed for topology corrections and using snappers )

Identifying them and removing (or sidetracking) "duplicate" geometries solved the problem.

 

Also I encountered crashes on snappers/anchored snapper caused by feeding it polylines with paths.

So adding a path splitter solved that.

 

Maybe this info might be of use to you.

 

Greets.

 

 

Reply