Skip to main content

My goal is a colored 3D DWG. This is my current workflow:

  1. Read a SHP (containing polygon features) and an Excel file
  2. Join them to give the SHP features a color attribute
  3. Use the color attribute with DWGStyler to color the features
  4. Save as DWG

This works.. somewhat. When I don't color anything, the result turns out as expected. When I color just the lines, I get the expected result as well. However when I fill the polygons, some of them end up flat at height 0. What could be causing this?

Hi,

can it be that Autocad doesn't understand surface of polygons if all points of polygon aren't coplanar (in same plane)? If so, than you should create TIN from those polygons (with Triangulator or TINGenerator).

The other problem that might occur is that polygon isn't closed, so you should check that first point coor. = last point coor.


That is really weird. Can you put an Inspector transformer after the DWGStyler to inspect the data? It would help to track down the error if I can tell if the DWGStyler drops the Z values (ie the features sent to the Data Inspector are 2D) or if it is something in the writer (ie the features sent to the Data Inspector are 3D).


I discovered that multipart polygons were the cause - Deaggregator fixed that. However it looks like I have to triangulate the polygons or else they end up flat at what I'm guessing is the minimum height of the lowest polygon. Unfortunately this leads to a file that makes ACAD eat 11+GB RAM. For some reason I also can never get filled mpolygons or polygons to work. Only hatches with a solid pattern, which might be part of the RAM eating problem as well.


Reply