Pattern hatch gets messed up when exporting to DWG

I've created a batten cell and used it for pattern hatching. As you can see in the screenshots something weird is happening with the pattern when exporting the file to dwg format. When the cell is placed as a single cell it doesn't get corrupted.

Maybe someone could please enlighten me about the under-the-hood-process of transforming hatch pattern to dwg format as I would like to know how I could optimize the batten cell for export.

By the way: the same things happen when I try to use batten linestyles. In Microstation everything looks great but after exporting it to dwg the linestyle looks the same as the broken pattern.

Regards
Stephan

Parents
  • If your patterned element is placed afar from the world origin I might have an answer, but since you have seen the same problem with linestyle this could be a completely different issue than we know of. Can you please upload a simple test file so we can try to reproduce the bad result you have had?



  • Thank you for your answer. I've created a service ticket for this one. So I'll send the files to the support team. Should I also post the files to the forum or maybe if your interested I could give you the ticket number?
  • Found your files. Thanks!

    There appears to be a problem with the cell you used for patterning, although I have not looked at what the errors might be. If you place "SchraffDammung" as a cell in active model and keyin "set range on", you will see the element range to be incorrect. We will look at this more and will likely end up with a Defect. In the mean while, you may try to recreate this cell with a valid range then create your patterns again.



  • To reanimate this thread:

    Yes, I had tried to recreate a cell with a valid range. But unfortunately not very successful. Mainly because I don't know how a valid range is defined. What is a valid range? I thought maybe it is not valid because the ranges of individual elements are overlapping? But I'm not sure. It would be nice if you could please explain to me how a valid range would look like and after that I would try to create a cell with valid ranges one more time...
  • Perhaps a simple way of achieving that is to place your existing cell at scale of 1.0, drop the cell, select dropped elements and create a new cell with a different cell name.  To verify the new cell, you can place it and then keyin "set range on" followed by a view update. You can remove the range display by keyin "set range off".  Presumably, the new cell will have a correct range.  Then you can use it to create your pattern.  If you still get the same error using the new cell for patterning, please upload your test files again so we can take a look.



  • I did not directly answer your question about what a valid range is - if you place your cell in the model, keyin "set range on", followed by a view update, you will see all elements in the model, including your newly placed cell, to have a boundary (a box) displayed.  That boundary is the range.  You should see that your new cell to have a bigger box than its geometry.

    I have located your DGN file and looked at it a bit more.   While your cell does have a range problem and it is still a good idea to get that fixed, this problem alone may not be all that have caused your problem.  You have placed your pattern into a rectangle to precisely align pattern edges against the rectangle.  Your pattern cell uses arc elements but DWG hatch pattern can only use linear segments.  Therefore your arcs in the pattern cell must be stroked into lines when your pattern gets saved as a DWG hatch.  You can see those stroked lines in your previously captured image.  A known limitation with AutoCAD/RealDWG is that the accuracy of these pattern strokes wholly depends on an ASCII text file that defines the pattern (aka .pat file).  I'm not sure if you have ever created a pattern in AutoCAD.  If you have, you'd know that in this .pat file you must tell ACAD the precise lengths of solid lines & gaps that compose your pattern.  The .pat file, however, has a limitation of maximum of 80 characters per ASCII line, effectively limiting number of decimal places that can be used for a pattern, hence resulting in loss of accuracy.  Your case presents this problem.  MicroStation uses the same RealDWG that ACAD uses, therefore inherited the same limitation ACAD has.  Yes, it is a known problem and is so 70's.  The good news is that Autodesk has agreed to improve the accuracy by increasing the maximum number of characters per ASCII line in a .pat file, but the promised improvement won't be available until next release of RealDWG.

    What that all means to you is that you can either wait till Autodesk has fixed this problem (in a year?) or you can work around this by creating a new pattern cell that has a range size of one unit.  That is, make your cell to have one unit in width and one unit in height, and use only line elements in the cell (i.e. no curves).  The DWG strokes created from this new cell will most likely to fit in 80-character per line with a reasonable accuracy.



    Answer Verified By: Sjanku 

  • Thank you very much for your help. That was the information I was looking for!
    I tried your suggestions and the pattern looks much nicer now. But as you said the accuracy is still not very good. But good enough...

    Regards
    Stephan
Reply Children
No Data