Skip to main content
Solved

Convert DWG solid colors to OBJ


I'm trying to convert a DWG with solids to an OBJ mesh.

The conversion is good but the OBJ doesn't include the color of the solid ("autocad_color").

 

I tried GeometryColorSetter but I can't seem to set it up properly.

geocolsetterI also tried the AppearanceSetter, following this post: https://community.safe.com/s/question/0D54Q000080he8G/how-to-set-the-color-of-an-ifc-objet-ifcproxy but I can't set it up correctly

 

Could you give me some suggestions on how to setup the transformer GeometryColorSetter (or a better one) so that it takes the "autocad_color" of the geometry and gives the same color to the resulting obj.

Best answer by chrisatsafe

Hi @vlabs​ ,

You should be able to set this with the fme_color format attribute since it holds rgb values rather than color index values like the autocad_color format attribute.

 

2021-05-26_9-54-34 

Alternatively, you can use an AppearanceExtractor before the AppearanceSetter. The autocad_color format attribute is an AutoCAD index color between 1 and 255. In order to preserve the actual color, you'll first need to extract it then apply the color properties in the AppearanceSetter.

 

Hope that helps.

View original
Did this help you find an answer to your question?

3 replies

chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • Best Answer
  • May 26, 2021

Hi @vlabs​ ,

You should be able to set this with the fme_color format attribute since it holds rgb values rather than color index values like the autocad_color format attribute.

 

2021-05-26_9-54-34 

Alternatively, you can use an AppearanceExtractor before the AppearanceSetter. The autocad_color format attribute is an AutoCAD index color between 1 and 255. In order to preserve the actual color, you'll first need to extract it then apply the color properties in the AppearanceSetter.

 

Hope that helps.


  • Author
  • May 31, 2021
chrisatsafe wrote:

Hi @vlabs​ ,

You should be able to set this with the fme_color format attribute since it holds rgb values rather than color index values like the autocad_color format attribute.

 

2021-05-26_9-54-34 

Alternatively, you can use an AppearanceExtractor before the AppearanceSetter. The autocad_color format attribute is an AutoCAD index color between 1 and 255. In order to preserve the actual color, you'll first need to extract it then apply the color properties in the AppearanceSetter.

 

Hope that helps.

Thanks this worked well!



Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings