How to paint the overlapped area of two faces?

How to paint the overlapped area on the target face (below are some screen shots) between two faces (flatten/Cylinder/Surface). ?

Would you masters help to provide some idea if you handle this case? Or advise what API hints I should use like what members of IFace are fit for it ?

thanks a lot. (Hi Mr Artem, excuse me , this case become a little urgent ....  )

SolidworksApi macros