Step import: keep colors

Hello, I’m getting STEP AP214 files from my customers and need to keep surfaces colors. Looks like the import plugin join everything together and set everything to 1 color. Is there a way to get the surfaces with correct color?
THank you

The import plug-in offers you the choice to join surfaces or not on import (check the options). If you have join unchecked, Rhino will not join anything that is not already joined in the original exporting program.

As far as colors are concerned, if the color is attributed to the objects individually, they should be preserved on import in Rhino. However, original file layer colors do not seem to transfer, so if the objects are colored by layer in the original program, they will most likely be black in Rhino (layer color will be black).


Joining is unchecked so I must assume the color is set on layers because I always get 1 color model. If I open the same model with a viewer like IDA Step I see correct colors on every surface. It comes to my mind that even is join surfaces is uncheck I always get a joined model that I need to explode when importing in rhino. Could I have a issue or is it normal?

That is normal behavior. The surfaces are not joined but when you import a STEP file, it will be turned into a block. When you try to select a surface, the entire block is selected. To get rid of the block, you can use Explode as you did but that only explodes the top-level block. If there are nested blocks you would have to select the lower-level blocks and explode these as well. Or you could just use the ExplodeBlock command that will get rid of all levels at the same time.

And remember to run Purge to get rid of block definitions.

Ok, I have no problem to get all the surfaces with explode but… any suggestion for getting the colors?

I tend to get the colors when importing STEP files. Since that means that Rhino is capable of doing so, this must be something in the originating software. Then again, the STEP format might support different ways of assigning colors and perhaps Rhino could only be using one of them?

@chuck might have some thoughts on this…

I’ll wait for suggestions by Chuck :smiley:
Maybe I can edit the step somehow to get surfaces… but I don’t know Step structure so don’t know is everything is mixed up.

Unfortunately, there is not much you can do with the existing files to get the surface colors into Rhino. You may be able to read the files into another program that supports different colors per surface in a solid, explode in that program and write out as a new STEP file to be read into Rhino.

In Rhino, colors are only assigned to high level objects or layers. A polysurface can have a color, but a surface within a polysurface cannot. On the other hand, surfaces within a polysurface can have different material assignments. We’ve considered assigning material based on STEP surface color, but that can lead to confusion since material is only visible in a rendered view. We’re still thinking about the best way to do that.

When you open a STEP file in Rhino with Join unchecked, Rhino just skips the joining when building the polysurface. The color assignment is still done the same as if the surfaces were joined into a polysurface. I’ll see if I can rearrange things so surface colors are used instead when not joining. This is more difficult technically than it sounds, but it should be possible.

I’m close to having something for you. If possible, please send me ( a typical file to test. The smaller the better. If you are worried about confidentiality, I will delete any copy of the file as soon as I’m done testing.


I’ve made it so that now the colors will come in as long as you uncheck “Join surfaces” The change will be in the next v5 service release if there is one, otherwise in v6. I could only find one step file with multiple colors per solid, so I was not able to do much testing. Since different step exporters can have different ways of indicating colors, it would be really helpful to have more examples to test. If you aren’t able to send any files, I may be able to make a plug-in that works in the current service release for you to test.

Hi Chuck thank you so much for help. I’d really like to test your plugin also because I’d like to not wait for a service relase. I can send you a file for testing (confidential) it’s 12MB stp file. Let me know.

I’d like to test the file first. STEP files compress considerably, so if you can make a zip or rar and send it to me at that would be great. It takes a while to build and test a plug-in for a previous (to me) service release, so I’d rather make sure it works in my current code before starting the process.

File sent :wink:

Looks good. See your email.

Thank you Chuck! Looks like it works well! :thumbsup:

Great! If you have any problems before you get the next service release, or v6, be sure to mention that you have a nonstandard STEP import plug-in. I don’t think anything will go wrong, but you never can be sure.

Hi Chuck, I just updated to SR12 and wondering if the STEP import is modified with colors handling or not. I checked changedlog but there are other changes. The plugin proprieties say version Aug 10 2015 but I tried some STEPs and colors looks good.
Thank you

I probably logged the changes for V6, but they are in SR12. I’m glad it works for you.


Hi Chuck, I have again a color issue but I can’t tell if the STEP file is somehow different from the previous ones. Can I send it to your for checking if is a plugin problem or a file problem? With a STEP viewer i get correct colors.
THank you

Yes. Please send it to Step files compress well, so make a zip or similar if it’s large.